PageRenderTime 88ms CodeModel.GetById 38ms app.highlight 39ms RepoModel.GetById 1ms app.codeStats 1ms

/apidocs/pyechonest.song-pysrc.html

http://echo-nest-remix.googlecode.com/
HTML | 490 lines | 459 code | 10 blank | 21 comment | 0 complexity | 70944f72821e65e1e1ff44d1ce7a09fa MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1<?xml version="1.0" encoding="ascii"?>
  2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3          "DTD/xhtml1-transitional.dtd">
  4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  5<head>
  6  <title>pyechonest.song</title>
  7  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  8  <script type="text/javascript" src="epydoc.js"></script>
  9</head>
 10
 11<body bgcolor="white" text="black" link="blue" vlink="#204080"
 12      alink="#204080">
 13<!-- ==================== NAVIGATION BAR ==================== -->
 14<table class="navbar" border="0" width="100%" cellpadding="0"
 15       bgcolor="#a0c0ff" cellspacing="0">
 16  <tr valign="middle">
 17
 18  <!-- Tree link -->
 19      <th>&nbsp;&nbsp;&nbsp;<a
 20        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
 21
 22  <!-- Index link -->
 23      <th>&nbsp;&nbsp;&nbsp;<a
 24        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
 25
 26  <!-- Help link -->
 27      <th>&nbsp;&nbsp;&nbsp;<a
 28        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
 29
 30  <!-- Project homepage -->
 31      <th class="navbar" align="right" width="100%">
 32        <table border="0" cellpadding="0" cellspacing="0">
 33          <tr><th class="navbar" align="center"
 34            ><a class="navbar" target="_top" href="http://code.google.com/p/echo-nest-remix/">Project Homepage</a></th>
 35          </tr></table></th>
 36  </tr>
 37</table>
 38<table width="100%" cellpadding="0" cellspacing="0">
 39  <tr valign="top">
 40    <td width="100%">
 41      <span class="breadcrumbs">
 42        <a href="pyechonest-module.html">Package&nbsp;pyechonest</a> ::
 43        Module&nbsp;song
 44      </span>
 45    </td>
 46    <td>
 47      <table cellpadding="0" cellspacing="0">
 48        <!-- hide/show private -->
 49        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
 50    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
 51        <tr><td align="right"><span class="options"
 52            >[<a href="frames.html" target="_top">frames</a
 53            >]&nbsp;|&nbsp;<a href="pyechonest.song-pysrc.html"
 54            target="_top">no&nbsp;frames</a>]</span></td></tr>
 55      </table>
 56    </td>
 57  </tr>
 58</table>
 59<h1 class="epydoc">Source Code for <a href="pyechonest.song-module.html">Module pyechonest.song</a></h1>
 60<pre class="py-src">
 61<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
 62<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"># encoding: utf-8</tt> </tt>
 63<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"> </tt>
 64<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
 65<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">Copyright (c) 2010 The Echo Nest. All rights reserved.</tt> </tt>
 66<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">Created by Tyler Williams on 2010-04-25.</tt> </tt>
 67<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
 68<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring">The Song module loosely covers http://developer.echonest.com/docs/v4/song.html</tt> </tt>
 69<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-docstring">Refer to the official api documentation if you are unsure about something.</tt> </tt>
 70<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
 71<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"> </tt>
 72<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Module pyechonest.util=pyechonest.util-module.html"><a title="pyechonest.util" class="py-name" href="#" onclick="return doclink('link-0', 'util', 'link-0');">util</a></tt> </tt>
 73<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-1" class="py-name" targets="Module pyechonest.proxies=pyechonest.proxies-module.html"><a title="pyechonest.proxies" class="py-name" href="#" onclick="return doclink('link-1', 'proxies', 'link-1');">proxies</a></tt> <tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Class pyechonest.proxies.SongProxy=pyechonest.proxies.SongProxy-class.html"><a title="pyechonest.proxies.SongProxy" class="py-name" href="#" onclick="return doclink('link-2', 'SongProxy', 'link-2');">SongProxy</a></tt> </tt>
 74<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-3" class="py-name" targets="Module pyechonest.results=pyechonest.results-module.html"><a title="pyechonest.results" class="py-name" href="#" onclick="return doclink('link-3', 'results', 'link-3');">results</a></tt> <tt class="py-keyword">import</tt> <tt id="link-4" class="py-name" targets="Class pyechonest.results.Result=pyechonest.results.Result-class.html"><a title="pyechonest.results.Result" class="py-name" href="#" onclick="return doclink('link-4', 'Result', 'link-4');">Result</a></tt> </tt>
 75<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"> </tt>
 76<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
 77<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">json</tt> </tt>
 78<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-keyword">except</tt> <tt class="py-name">ImportError</tt><tt class="py-op">:</tt> </tt>
 79<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">simplejson</tt> <tt class="py-keyword">as</tt> <tt class="py-name">json</tt> </tt>
 80<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line">     </tt>
 81<a name="Song"></a><div id="Song-def"><a name="L21"></a><tt class="py-lineno"> 21</tt> <a class="py-toggle" href="#" id="Song-toggle" onclick="return toggle('Song');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pyechonest.song.Song-class.html">Song</a><tt class="py-op">(</tt><tt class="py-base-class">SongProxy</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
 82</div><div id="Song-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Song-expanded"><a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
 83<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt class="py-docstring">    A Song object</tt> </tt>
 84<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
 85<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt class="py-docstring">    Create a song object like so:</tt> </tt>
 86<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt class="py-docstring">        s = song.Song('SOXZYYG127F3E1B7A2')</tt> </tt>
 87<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
 88<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"><tt class="py-docstring">    Attributes: (**attributes** are guaranteed to exist as soon as an artist object exists)</tt> </tt>
 89<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-docstring">        **id**: Echo Nest Song ID</tt> </tt>
 90<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"><tt class="py-docstring">        **title**: Song Title</tt> </tt>
 91<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"><tt class="py-docstring">        **artist_name**: Artist Name</tt> </tt>
 92<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"><tt class="py-docstring">        **artist_id**: Artist ID</tt> </tt>
 93<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line"><tt class="py-docstring">        audio_summary: An Audio Summary Result object</tt> </tt>
 94<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line"><tt class="py-docstring">        song_hotttnesss: A float representing a song's hotttnesss</tt> </tt>
 95<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line"><tt class="py-docstring">        artist_hotttnesss: A float representing a song's parent artist's hotttnesss</tt> </tt>
 96<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line"><tt class="py-docstring">        artist_familiarity: A float representing a song's parent artist's familiarity</tt> </tt>
 97<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line"><tt class="py-docstring">        artist_location: A string specifying a song's parent artist's location</tt> </tt>
 98<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line"><tt class="py-docstring">        tracks: A list of track result objects</tt> </tt>
 99<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
100<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
101<a name="Song.__init__"></a><div id="Song.__init__-def"><a name="L41"></a><tt class="py-lineno"> 41</tt> <a class="py-toggle" href="#" id="Song.__init__-toggle" onclick="return toggle('Song.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyechonest.song.Song-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">id</tt><tt class="py-op">,</tt> <tt class="py-param">buckets</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
102</div><div id="Song.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Song.__init__-expanded"><a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">        <tt class="py-name">buckets</tt> <tt class="py-op">=</tt> <tt class="py-name">buckets</tt> <tt class="py-keyword">or</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
103<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">        <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-5" class="py-name" targets="Class pyechonest.song.Song=pyechonest.song.Song-class.html"><a title="pyechonest.song.Song" class="py-name" href="#" onclick="return doclink('link-5', 'Song', 'link-5');">Song</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Method echonest.action.Blend.__init__()=echonest.action.Blend-class.html#__init__,Method echonest.action.Crossfade.__init__()=echonest.action.Crossfade-class.html#__init__,Method echonest.action.Edit.__init__()=echonest.action.Edit-class.html#__init__,Method echonest.action.Jump.__init__()=echonest.action.Jump-class.html#__init__,Method echonest.action.Playback.__init__()=echonest.action.Playback-class.html#__init__,Method echonest.audio.AmplitudeFactor.__init__()=echonest.audio.AmplitudeFactor-class.html#__init__,Method echonest.audio.AudioAnalysis.__init__()=echonest.audio.AudioAnalysis-class.html#__init__,Method echonest.audio.AudioData.__init__()=echonest.audio.AudioData-class.html#__init__,Method echonest.audio.AudioData32.__init__()=echonest.audio.AudioData32-class.html#__init__,Method echonest.audio.AudioQuantum.__init__()=echonest.audio.AudioQuantum-class.html#__init__,Method echonest.audio.AudioQuantumList.__init__()=echonest.audio.AudioQuantumList-class.html#__init__,Method echonest.audio.AudioSegment.__init__()=echonest.audio.AudioSegment-class.html#__init__,Method echonest.audio.FileTypeError.__init__()=echonest.audio.FileTypeError-class.html#__init__,Method echonest.audio.LevelDB.__init__()=echonest.audio.LevelDB-class.html#__init__,Method echonest.audio.LocalAnalysis.__init__()=echonest.audio.LocalAnalysis-class.html#__init__,Method echonest.audio.LocalAudioFile.__init__()=echonest.audio.LocalAudioFile-class.html#__init__,Method echonest.audio.ModifiedRenderable.__init__()=echonest.audio.ModifiedRenderable-class.html#__init__,Method echonest.audio.Simultaneous.__init__()=echonest.audio.Simultaneous-class.html#__init__,Method echonest.audio.TimeTruncateFactor.__init__()=echonest.audio.TimeTruncateFactor-class.html#__init__,Method echonest.audio.TimeTruncateLength.__init__()=echonest.audio.TimeTruncateLength-class.html#__init__,Method echonest.modify.Modify.__init__()=echonest.modify.Modify-class.html#__init__,Method echonest.support.midi.EventDispatcher.EventDispatcher.__init__()=echonest.support.midi.EventDispatcher.EventDispatcher-class.html#__init__,Method echonest.support.midi.MidiFileParser.MidiFileParser.__init__()=echonest.support.midi.MidiFileParser.MidiFileParser-class.html#__init__,Method echonest.support.midi.MidiInFile.MidiInFile.__init__()=echonest.support.midi.MidiInFile.MidiInFile-class.html#__init__,Method echonest.support.midi.MidiInStream.MidiInStream.__init__()=echonest.support.midi.MidiInStream.MidiInStream-class.html#__init__,Method echonest.support.midi.MidiOutFile.MidiOutFile.__init__()=echonest.support.midi.MidiOutFile.MidiOutFile-class.html#__init__,Method echonest.support.midi.MidiOutStream.MidiOutStream.__init__()=echonest.support.midi.MidiOutStream.MidiOutStream-class.html#__init__,Method echonest.support.midi.RawInstreamFile.RawInstreamFile.__init__()=echonest.support.midi.RawInstreamFile.RawInstreamFile-class.html#__init__,Method echonest.support.midi.RawOutstreamFile.RawOutstreamFile.__init__()=echonest.support.midi.RawOutstreamFile.RawOutstreamFile-class.html#__init__,Method echonest.video.ImageSequence.__init__()=echonest.video.ImageSequence-class.html#__init__,Method echonest.video.SynchronizedAV.__init__()=echonest.video.SynchronizedAV-class.html#__init__,Method echonest.video.VideoSettings.__init__()=echonest.video.VideoSettings-class.html#__init__,Method pyechonest.artist.Artist.__init__()=pyechonest.artist.Artist-class.html#__init__,Method pyechonest.playlist.Playlist.__init__()=pyechonest.playlist.Playlist-class.html#__init__,Method pyechonest.proxies.ArtistProxy.__init__()=pyechonest.proxies.ArtistProxy-class.html#__init__,Method pyechonest.proxies.GenericProxy.__init__()=pyechonest.proxies.GenericProxy-class.html#__init__,Method pyechonest.proxies.PlaylistProxy.__init__()=pyechonest.proxies.PlaylistProxy-class.html#__init__,Method pyechonest.proxies.SongProxy.__init__()=pyechonest.proxies.SongProxy-class.html#__init__,Method pyechonest.proxies.TrackProxy.__init__()=pyechonest.proxies.TrackProxy-class.html#__init__,Method pyechonest.results.Result.__init__()=pyechonest.results.Result-class.html#__init__,Method pyechonest.song.Song.__init__()=pyechonest.song.Song-class.html#__init__,Method pyechonest.util.EchoNestAPIError.__init__()=pyechonest.util.EchoNestAPIError-class.html#__init__,Method pyechonest.util.attrdict.__init__()=pyechonest.util.attrdict-class.html#__init__"><a title="echonest.action.Blend.__init__
104echonest.action.Crossfade.__init__
105echonest.action.Edit.__init__
106echonest.action.Jump.__init__
107echonest.action.Playback.__init__
108echonest.audio.AmplitudeFactor.__init__
109echonest.audio.AudioAnalysis.__init__
110echonest.audio.AudioData.__init__
111echonest.audio.AudioData32.__init__
112echonest.audio.AudioQuantum.__init__
113echonest.audio.AudioQuantumList.__init__
114echonest.audio.AudioSegment.__init__
115echonest.audio.FileTypeError.__init__
116echonest.audio.LevelDB.__init__
117echonest.audio.LocalAnalysis.__init__
118echonest.audio.LocalAudioFile.__init__
119echonest.audio.ModifiedRenderable.__init__
120echonest.audio.Simultaneous.__init__
121echonest.audio.TimeTruncateFactor.__init__
122echonest.audio.TimeTruncateLength.__init__
123echonest.modify.Modify.__init__
124echonest.support.midi.EventDispatcher.EventDispatcher.__init__
125echonest.support.midi.MidiFileParser.MidiFileParser.__init__
126echonest.support.midi.MidiInFile.MidiInFile.__init__
127echonest.support.midi.MidiInStream.MidiInStream.__init__
128echonest.support.midi.MidiOutFile.MidiOutFile.__init__
129echonest.support.midi.MidiOutStream.MidiOutStream.__init__
130echonest.support.midi.RawInstreamFile.RawInstreamFile.__init__
131echonest.support.midi.RawOutstreamFile.RawOutstreamFile.__init__
132echonest.video.ImageSequence.__init__
133echonest.video.SynchronizedAV.__init__
134echonest.video.VideoSettings.__init__
135pyechonest.artist.Artist.__init__
136pyechonest.playlist.Playlist.__init__
137pyechonest.proxies.ArtistProxy.__init__
138pyechonest.proxies.GenericProxy.__init__
139pyechonest.proxies.PlaylistProxy.__init__
140pyechonest.proxies.SongProxy.__init__
141pyechonest.proxies.TrackProxy.__init__
142pyechonest.results.Result.__init__
143pyechonest.song.Song.__init__
144pyechonest.util.EchoNestAPIError.__init__
145pyechonest.util.attrdict.__init__" class="py-name" href="#" onclick="return doclink('link-6', '__init__', 'link-6');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">id</tt><tt class="py-op">,</tt> <tt class="py-name">buckets</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
146</div><a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">     </tt>
147<a name="Song.__repr__"></a><div id="Song.__repr__-def"><a name="L45"></a><tt class="py-lineno"> 45</tt> <a class="py-toggle" href="#" id="Song.__repr__-toggle" onclick="return toggle('Song.__repr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyechonest.song.Song-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
148</div><div id="Song.__repr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Song.__repr__-expanded"><a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">"&lt;%s - %s&gt;"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">type</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Method echonest.audio.AudioData.encode()=echonest.audio.AudioData-class.html#encode,Method echonest.audio.AudioData32.encode()=echonest.audio.AudioData32-class.html#encode,Method echonest.audio.AudioRenderable.encode()=echonest.audio.AudioRenderable-class.html#encode"><a title="echonest.audio.AudioData.encode
149echonest.audio.AudioData32.encode
150echonest.audio.AudioRenderable.encode" class="py-name" href="#" onclick="return doclink('link-7', 'encode', 'link-7');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf-8'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">title</tt><tt class="py-op">.</tt><tt id="link-8" class="py-name"><a title="echonest.audio.AudioData.encode
151echonest.audio.AudioData32.encode
152echonest.audio.AudioRenderable.encode" class="py-name" href="#" onclick="return doclink('link-8', 'encode', 'link-7');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf-8'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
153</div><a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">     </tt>
154<a name="Song.__str__"></a><div id="Song.__str__-def"><a name="L48"></a><tt class="py-lineno"> 48</tt> <a class="py-toggle" href="#" id="Song.__str__-toggle" onclick="return toggle('Song.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyechonest.song.Song-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
155</div><div id="Song.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Song.__str__-expanded"><a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">title</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name"><a title="echonest.audio.AudioData.encode
156echonest.audio.AudioData32.encode
157echonest.audio.AudioRenderable.encode" class="py-name" href="#" onclick="return doclink('link-9', 'encode', 'link-7');">encode</a></tt><tt class="py-op">(</tt><tt class="py-string">'utf-8'</tt><tt class="py-op">)</tt> </tt>
158</div><a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">     </tt>
159<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">         </tt>
160<a name="Song.get_audio_summary"></a><div id="Song.get_audio_summary-def"><a name="L52"></a><tt class="py-lineno"> 52</tt> <a class="py-toggle" href="#" id="Song.get_audio_summary-toggle" onclick="return toggle('Song.get_audio_summary');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyechonest.song.Song-class.html#get_audio_summary">get_audio_summary</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">cache</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
161</div><div id="Song.get_audio_summary-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Song.get_audio_summary-expanded"><a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">        <tt class="py-docstring">"""Get an audio summary of a song containing mode, tempo, key, duration, time signature, loudness, and analysis_url.</tt> </tt>
162<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
163<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line"><tt class="py-docstring">        Args:</tt> </tt>
164<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line"><tt class="py-docstring">            cache: A boolean indicating whether or not the cached value should be used (if available). Defaults to True.</tt> </tt>
165<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
166<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line"><tt class="py-docstring">        Returns:</tt> </tt>
167<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line"><tt class="py-docstring">            A dictionary containing mode, tempo, key, duration, time signature, loudness, and analysis_url keys.</tt> </tt>
168<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
169<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt class="py-name">cache</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-string">'audio_summary'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cache</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
170<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">            <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name" targets="Method pyechonest.proxies.ArtistProxy.get_attribute()=pyechonest.proxies.ArtistProxy-class.html#get_attribute,Method pyechonest.proxies.GenericProxy.get_attribute()=pyechonest.proxies.GenericProxy-class.html#get_attribute,Method pyechonest.proxies.PlaylistProxy.get_attribute()=pyechonest.proxies.PlaylistProxy-class.html#get_attribute,Method pyechonest.proxies.SongProxy.get_attribute()=pyechonest.proxies.SongProxy-class.html#get_attribute"><a title="pyechonest.proxies.ArtistProxy.get_attribute
171pyechonest.proxies.GenericProxy.get_attribute
172pyechonest.proxies.PlaylistProxy.get_attribute
173pyechonest.proxies.SongProxy.get_attribute" class="py-name" href="#" onclick="return doclink('link-10', 'get_attribute', 'link-10');">get_attribute</a></tt><tt class="py-op">(</tt><tt class="py-string">'profile'</tt><tt class="py-op">,</tt> <tt class="py-name">bucket</tt><tt class="py-op">=</tt><tt class="py-string">'audio_summary'</tt><tt class="py-op">)</tt> </tt>
174<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cache</tt><tt class="py-op">[</tt><tt class="py-string">'audio_summary'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">[</tt><tt class="py-string">'songs'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'audio_summary'</tt><tt class="py-op">]</tt> </tt>
175<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-11" class="py-name"><a title="pyechonest.results.Result" class="py-name" href="#" onclick="return doclink('link-11', 'Result', 'link-4');">Result</a></tt><tt class="py-op">(</tt><tt class="py-string">'audio_summary'</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cache</tt><tt class="py-op">[</tt><tt class="py-string">'audio_summary'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
176</div><a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">     </tt>
177<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">    <tt id="link-12" class="py-name" targets="Variable pyechonest.song.Song.audio_summary=pyechonest.song.Song-class.html#audio_summary"><a title="pyechonest.song.Song.audio_summary" class="py-name" href="#" onclick="return doclink('link-12', 'audio_summary', 'link-12');">audio_summary</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-13" class="py-name" targets="Method pyechonest.song.Song.get_audio_summary()=pyechonest.song.Song-class.html#get_audio_summary"><a title="pyechonest.song.Song.get_audio_summary" class="py-name" href="#" onclick="return doclink('link-13', 'get_audio_summary', 'link-13');">get_audio_summary</a></tt><tt class="py-op">)</tt> </tt>
178<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">     </tt>
179<a name="Song.get_song_hotttnesss"></a><div id="Song.get_song_hotttnesss-def"><a name="L68"></a><tt class="py-lineno"> 68</tt> <a class="py-toggle" href="#" id="Song.get_song_hotttnesss-toggle" onclick="return toggle('Song.get_song_hotttnesss');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyechonest.song.Song-class.html#get_song_hotttnesss">get_song_hotttnesss</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">cache</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
180</div><div id="Song.get_song_hotttnesss-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Song.get_song_hotttnesss-expanded"><a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">        <tt class="py-docstring">"""Get our numerical description of how hottt a song currently is</tt> </tt>
181<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
182<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line"><tt class="py-docstring">        Args:</tt> </tt>
183<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"><tt class="py-docstring">            cache: A boolean indicating whether or not the cached value should be used (if available). Defaults to True.</tt> </tt>
184<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
185<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line"><tt class="py-docstring">        Returns:</tt> </tt>
186<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line"><tt class="py-docstring">            A float representing hotttnesss.</tt> </tt>
187<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
188<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt class="py-name">cache</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-string">'song_hotttnesss'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cache</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
189<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">            <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name"><a title="pyechonest.proxies.ArtistProxy.get_attribute
190pyechonest.proxies.GenericProxy.get_attribute
191pyechonest.proxies.PlaylistProxy.get_attribute
192pyechonest.proxies.SongProxy.get_attribute" class="py-name" href="#" onclick="return doclink('link-14', 'get_attribute', 'link-10');">get_attribute</a></tt><tt class="py-op">(</tt><tt class="py-string">'profile'</tt><tt class="py-op">,</tt> <tt class="py-name">bucket</tt><tt class="py-op">=</tt><tt class="py-string">'song_hotttnesss'</tt><tt class="py-op">)</tt> </tt>
193<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cache</tt><tt class="py-op">[</tt><tt class="py-string">'song_hotttnesss'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">[</tt><tt class="py-string">'songs'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'song_hotttnesss'</tt><tt class="py-op">]</tt> </tt>
194<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cache</tt><tt class="py-op">[</tt><tt class="py-string">'song_hotttnesss'</tt><tt class="py-op">]</tt> </tt>
195</div><a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">     </tt>
196<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">    <tt id="link-15" class="py-name" targets="Variable pyechonest.song.Song.song_hotttnesss=pyechonest.song.Song-class.html#song_hotttnesss"><a title="pyechonest.song.Song.song_hotttnesss" class="py-name" href="#" onclick="return doclink('link-15', 'song_hotttnesss', 'link-15');">song_hotttnesss</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-16" class="py-name" targets="Method pyechonest.song.Song.get_song_hotttnesss()=pyechonest.song.Song-class.html#get_song_hotttnesss"><a title="pyechonest.song.Song.get_song_hotttnesss" class="py-name" href="#" onclick="return doclink('link-16', 'get_song_hotttnesss', 'link-16');">get_song_hotttnesss</a></tt><tt class="py-op">)</tt> </tt>
197<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">     </tt>
198<a name="Song.get_artist_hotttnesss"></a><div id="Song.get_artist_hotttnesss-def"><a name="L84"></a><tt class="py-lineno"> 84</tt> <a class="py-toggle" href="#" id="Song.get_artist_hotttnesss-toggle" onclick="return toggle('Song.get_artist_hotttnesss');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyechonest.song.Song-class.html#get_artist_hotttnesss">get_artist_hotttnesss</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">cache</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
199</div><div id="Song.get_artist_hotttnesss-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Song.get_artist_hotttnesss-expanded"><a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">        <tt class="py-docstring">"""Get our numerical description of how hottt a song's artist currently is</tt> </tt>
200<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
201<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line"><tt class="py-docstring">        Args:</tt> </tt>
202<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line"><tt class="py-docstring">            cache: A boolean indicating whether or not the cached value should be used (if available). Defaults to True.</tt> </tt>
203<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
204<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line"><tt class="py-docstring">        Returns:</tt> </tt>
205<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line"><tt class="py-docstring">            A float representing hotttnesss.</tt> </tt>
206<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
207<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt class="py-name">cache</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-string">'artist_hotttnesss'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cache</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
208<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">            <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name"><a title="pyechonest.proxies.ArtistProxy.get_attribute
209pyechonest.proxies.GenericProxy.get_attribute
210pyechonest.proxies.PlaylistProxy.get_attribute
211pyechonest.proxies.SongProxy.get_attribute" class="py-name" href="#" onclick="return doclink('link-17', 'get_attribute', 'link-10');">get_attribute</a></tt><tt class="py-op">(</tt><tt class="py-string">'profile'</tt><tt class="py-op">,</tt> <tt class="py-name">bucket</tt><tt class="py-op">=</tt><tt class="py-string">'artist_hotttnesss'</tt><tt class="py-op">)</tt> </tt>
212<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cache</tt><tt class="py-op">[</tt><tt class="py-string">'artist_hotttnesss'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">[</tt><tt class="py-string">'songs'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'artist_hotttnesss'</tt><tt class="py-op">]</tt> </tt>
213<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cache</tt><tt class="py-op">[</tt><tt class="py-string">'artist_hotttnesss'</tt><tt class="py-op">]</tt> </tt>
214</div><a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">     </tt>
215<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">    <tt id="link-18" class="py-name" targets="Variable pyechonest.song.Song.artist_hotttnesss=pyechonest.song.Song-class.html#artist_hotttnesss"><a title="pyechonest.song.Song.artist_hotttnesss" class="py-name" href="#" onclick="return doclink('link-18', 'artist_hotttnesss', 'link-18');">artist_hotttnesss</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-19" class="py-name" targets="Method pyechonest.song.Song.get_artist_hotttnesss()=pyechonest.song.Song-class.html#get_artist_hotttnesss"><a title="pyechonest.song.Song.get_artist_hotttnesss" class="py-name" href="#" onclick="return doclink('link-19', 'get_artist_hotttnesss', 'link-19');">get_artist_hotttnesss</a></tt><tt class="py-op">)</tt> </tt>
216<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">     </tt>
217<a name="Song.get_artist_familiarity"></a><div id="Song.get_artist_familiarity-def"><a name="L100"></a><tt class="py-lineno">100</tt> <a class="py-toggle" href="#" id="Song.get_artist_familiarity-toggle" onclick="return toggle('Song.get_artist_familiarity');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyechonest.song.Song-class.html#get_artist_familiarity">get_artist_familiarity</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">cache</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
218</div><div id="Song.get_artist_familiarity-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Song.get_artist_familiarity-expanded"><a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">        <tt class="py-docstring">"""Get our numerical estimation of how familiar a song's artist currently is to the world</tt> </tt>
219<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
220<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line"><tt class="py-docstring">        Args:</tt> </tt>
221<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line"><tt class="py-docstring">            cache: A boolean indicating whether or not the cached value should be used (if available). Defaults to True.</tt> </tt>
222<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
223<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line"><tt class="py-docstring">        Returns:</tt> </tt>
224<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line"><tt class="py-docstring">            A float representing familiarity.</tt> </tt>
225<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
226<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt class="py-name">cache</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-string">'artist_familiarity'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cache</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
227<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">            <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name"><a title="pyechonest.proxies.ArtistProxy.get_attribute
228pyechonest.proxies.GenericProxy.get_attribute
229pyechonest.proxies.PlaylistProxy.get_attribute
230pyechonest.proxies.SongProxy.get_attribute" class="py-name" href="#" onclick="return doclink('link-20', 'get_attribute', 'link-10');">get_attribute</a></tt><tt class="py-op">(</tt><tt class="py-string">'profile'</tt><tt class="py-op">,</tt> <tt class="py-name">bucket</tt><tt class="py-op">=</tt><tt class="py-string">'artist_familiarity'</tt><tt class="py-op">)</tt> </tt>
231<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cache</tt><tt class="py-op">[</tt><tt class="py-string">'artist_familiarity'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">[</tt><tt class="py-string">'songs'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'artist_familiarity'</tt><tt class="py-op">]</tt> </tt>
232<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cache</tt><tt class="py-op">[</tt><tt class="py-string">'artist_familiarity'</tt><tt class="py-op">]</tt> </tt>
233</div><a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">     </tt>
234<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">    <tt id="link-21" class="py-name" targets="Variable pyechonest.song.Song.artist_familiarity=pyechonest.song.Song-class.html#artist_familiarity"><a title="pyechonest.song.Song.artist_familiarity" class="py-name" href="#" onclick="return doclink('link-21', 'artist_familiarity', 'link-21');">artist_familiarity</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-22" class="py-name" targets="Method pyechonest.song.Song.get_artist_familiarity()=pyechonest.song.Song-class.html#get_artist_familiarity"><a title="pyechonest.song.Song.get_artist_familiarity" class="py-name" href="#" onclick="return doclink('link-22', 'get_artist_familiarity', 'link-22');">get_artist_familiarity</a></tt><tt class="py-op">)</tt> </tt>
235<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">     </tt>
236<a name="Song.get_artist_location"></a><div id="Song.get_artist_location-def"><a name="L116"></a><tt class="py-lineno">116</tt> <a class="py-toggle" href="#" id="Song.get_artist_location-toggle" onclick="return toggle('Song.get_artist_location');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyechonest.song.Song-class.html#get_artist_location">get_artist_location</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">cache</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
237</div><div id="Song.get_artist_location-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Song.get_artist_location-expanded"><a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">        <tt class="py-docstring">"""Get the location of a song's artist.</tt> </tt>
238<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
239<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line"><tt class="py-docstring">        Args:</tt> </tt>
240<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line"><tt class="py-docstring">            cache: A boolean indicating whether or not the cached value should be used (if available). Defaults to True.</tt> </tt>
241<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
242<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line"><tt class="py-docstring">        Returns:</tt> </tt>
243<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line"><tt class="py-docstring">            An artist location object.</tt> </tt>
244<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
245<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt class="py-name">cache</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-string">'artist_location'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cache</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
246<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">            <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-23" class="py-name"><a title="pyechonest.proxies.ArtistProxy.get_attribute
247pyechonest.proxies.GenericProxy.get_attribute
248pyechonest.proxies.PlaylistProxy.get_attribute
249pyechonest.proxies.SongProxy.get_attribute" class="py-name" href="#" onclick="return doclink('link-23', 'get_attribute', 'link-10');">get_attribute</a></tt><tt class="py-op">(</tt><tt class="py-string">'profile'</tt><tt class="py-op">,</tt> <tt class="py-name">bucket</tt><tt class="py-op">=</tt><tt class="py-string">'artist_location'</tt><tt class="py-op">)</tt> </tt>
250<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cache</tt><tt class="py-op">[</tt><tt class="py-string">'artist_location'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">[</tt><tt class="py-string">'songs'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'artist_location'</tt><tt class="py-op">]</tt> </tt>
251<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-24" class="py-name"><a title="pyechonest.results.Result" class="py-name" href="#" onclick="return doclink('link-24', 'Result', 'link-4');">Result</a></tt><tt class="py-op">(</tt><tt class="py-string">'artist_location'</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cache</tt><tt class="py-op">[</tt><tt class="py-string">'artist_location'</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
252</div><a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">     </tt>
253<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">    <tt id="link-25" class="py-name" targets="Variable pyechonest.song.Song.artist_location=pyechonest.song.Song-class.html#artist_location"><a title="pyechonest.song.Song.artist_location" class="py-name" href="#" onclick="return doclink('link-25', 'artist_location', 'link-25');">artist_location</a></tt> <tt class="py-op">=</tt> <tt class="py-name">property</tt><tt class="py-op">(</tt><tt id="link-26" class="py-name" targets="Method pyechonest.song.Song.get_artist_location()=pyechonest.song.Song-class.html#get_artist_location"><a title="pyechonest.song.Song.get_artist_location" class="py-name" href="#" onclick="return doclink('link-26', 'get_artist_location', 'link-26');">get_artist_location</a></tt><tt class="py-op">)</tt> </tt>
254<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">     </tt>
255<a name="Song.get_tracks"></a><div id="Song.get_tracks-def"><a name="L132"></a><tt class="py-lineno">132</tt> <a class="py-toggle" href="#" id="Song.get_tracks-toggle" onclick="return toggle('Song.get_tracks');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyechonest.song.Song-class.html#get_tracks">get_tracks</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">catalog</tt><tt class="py-op">,</tt> <tt class="py-param">limit</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-param">cache</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
256</div><div id="Song.get_tracks-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Song.get_tracks-expanded"><a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">        <tt class="py-docstring">"""Get the tracks for a song given a catalog.</tt> </tt>
257<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
258<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line"><tt class="py-docstring">        Args:</tt> </tt>
259<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line"><tt class="py-docstring">            catalog: a string representing the catalog whose track you want to retrieve.</tt> </tt>
260<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
261<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line"><tt class="py-docstring">        Returns:</tt> </tt>
262<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line"><tt class="py-docstring">            A list of Track dicts.</tt> </tt>
263<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
264<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-op">(</tt><tt class="py-name">cache</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-string">'tracks'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cache</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-name">catalog</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt class="py-name">td</tt><tt class="py-op">[</tt><tt class="py-string">'catalog'</tt><tt class="py-op">]</tt> <tt class="py-keyword">for</tt> <tt class="py-name">td</tt> <tt class="py-keyword">in</tt> <tt c

Large files files are truncated, but you can click here to view the full file