2000 lines
137 KiB
HTML
2000 lines
137 KiB
HTML
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html><head><title>Python: module pylast</title>
|
|
</head><body bgcolor="#f0f0f8">
|
|
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
|
<tr bgcolor="#7799ee">
|
|
<td valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>pylast</strong></big></big> (version 0.3.194)</font></td
|
|
><td align=right valign=bottom
|
|
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/media/Mansion/Dropbox/projects/pylast/trunk/pylast.py">/media/Mansion/Dropbox/projects/pylast/trunk/pylast.py</a></font></td></tr></table>
|
|
<p><tt>A Python interface to Last.fm</tt></p>
|
|
<p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#aa55cc">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
|
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="hashlib.html">hashlib</a><br>
|
|
<a href="httplib.html">httplib</a><br>
|
|
<a href="xml.dom.minidom.html">xml.dom.minidom</a><br>
|
|
</td><td width="25%" valign=top><a href="os.html">os</a><br>
|
|
<a href="shelve.html">shelve</a><br>
|
|
<a href="sqlite3.html">sqlite3</a><br>
|
|
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
|
|
<a href="tempfile.html">tempfile</a><br>
|
|
<a href="threading.html">threading</a><br>
|
|
</td><td width="25%" valign=top><a href="time.html">time</a><br>
|
|
<a href="urllib.html">urllib</a><br>
|
|
</td></tr></table></td></tr></table><p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ee77aa">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl>
|
|
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
|
|
</font></dt><dd>
|
|
<dl>
|
|
<dt><font face="helvetica, arial"><a href="pylast.html#LibraryItem">LibraryItem</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#PlayedTrack">PlayedTrack</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#Scrobbler">Scrobbler</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#SessionKeyGenerator">SessionKeyGenerator</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#TopItem">TopItem</a>
|
|
</font></dt></dl>
|
|
</dd>
|
|
<dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException</a>)
|
|
</font></dt><dd>
|
|
<dl>
|
|
<dt><font face="helvetica, arial"><a href="pylast.html#ScrobblingException">ScrobblingException</a>
|
|
</font></dt><dd>
|
|
<dl>
|
|
<dt><font face="helvetica, arial"><a href="pylast.html#BadAuthentication">BadAuthentication</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#BadSession">BadSession</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#BadTime">BadTime</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#BannedClient">BannedClient</a>
|
|
</font></dt></dl>
|
|
</dd>
|
|
<dt><font face="helvetica, arial"><a href="pylast.html#ServiceException">ServiceException</a>
|
|
</font></dt></dl>
|
|
</dd>
|
|
<dt><font face="helvetica, arial"><a href="pylast.html#_BaseObject">_BaseObject</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
|
|
</font></dt><dd>
|
|
<dl>
|
|
<dt><font face="helvetica, arial"><a href="pylast.html#Album">Album</a>(<a href="pylast.html#_BaseObject">_BaseObject</a>, <a href="pylast.html#_Taggable">_Taggable</a>)
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#Artist">Artist</a>(<a href="pylast.html#_BaseObject">_BaseObject</a>, <a href="pylast.html#_Taggable">_Taggable</a>)
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#Country">Country</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#Event">Event</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#Group">Group</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#Library">Library</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#Playlist">Playlist</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#Tag">Tag</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#Track">Track</a>(<a href="pylast.html#_BaseObject">_BaseObject</a>, <a href="pylast.html#_Taggable">_Taggable</a>)
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#User">User</a>
|
|
</font></dt><dd>
|
|
<dl>
|
|
<dt><font face="helvetica, arial"><a href="pylast.html#AuthenticatedUser">AuthenticatedUser</a>
|
|
</font></dt></dl>
|
|
</dd>
|
|
<dt><font face="helvetica, arial"><a href="pylast.html#Venue">Venue</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#XSPF">XSPF</a>
|
|
</font></dt></dl>
|
|
</dd>
|
|
<dt><font face="helvetica, arial"><a href="pylast.html#_Search">_Search</a>(<a href="pylast.html#_BaseObject">_BaseObject</a>)
|
|
</font></dt><dd>
|
|
<dl>
|
|
<dt><font face="helvetica, arial"><a href="pylast.html#AlbumSearch">AlbumSearch</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#ArtistSearch">ArtistSearch</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#TagSearch">TagSearch</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#TrackSearch">TrackSearch</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#VenueSearch">VenueSearch</a>
|
|
</font></dt></dl>
|
|
</dd>
|
|
<dt><font face="helvetica, arial"><a href="pylast.html#_Taggable">_Taggable</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
|
|
</font></dt><dd>
|
|
<dl>
|
|
<dt><font face="helvetica, arial"><a href="pylast.html#Album">Album</a>(<a href="pylast.html#_BaseObject">_BaseObject</a>, <a href="pylast.html#_Taggable">_Taggable</a>)
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#Artist">Artist</a>(<a href="pylast.html#_BaseObject">_BaseObject</a>, <a href="pylast.html#_Taggable">_Taggable</a>)
|
|
</font></dt><dt><font face="helvetica, arial"><a href="pylast.html#Track">Track</a>(<a href="pylast.html#_BaseObject">_BaseObject</a>, <a href="pylast.html#_Taggable">_Taggable</a>)
|
|
</font></dt></dl>
|
|
</dd>
|
|
</dl>
|
|
<p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="Album">class <strong>Album</strong></a>(<a href="pylast.html#_BaseObject">_BaseObject</a>, <a href="pylast.html#_Taggable">_Taggable</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A Last.fm album.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#Album">Album</a></dd>
|
|
<dd><a href="pylast.html#_BaseObject">_BaseObject</a></dd>
|
|
<dd><a href="pylast.html#_Taggable">_Taggable</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="Album-__eq__"><strong>__eq__</strong></a>(self, other)</dt></dl>
|
|
|
|
<dl><dt><a name="Album-__init__"><strong>__init__</strong></a>(self, artist, title, api_key, api_secret, session_key)</dt><dd><tt>Create an album instance.<br>
|
|
# Parameters:<br>
|
|
* artist: An artist name or an <a href="#Artist">Artist</a> <a href="__builtin__.html#object">object</a>.<br>
|
|
* title: The album title.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Album-__ne__"><strong>__ne__</strong></a>(self, other)</dt></dl>
|
|
|
|
<dl><dt><a name="Album-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Album-get_artist"><strong>get_artist</strong></a>(self)</dt><dd><tt>Returns the associated <a href="#Artist">Artist</a> <a href="__builtin__.html#object">object</a>.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Album-get_id"><strong>get_id</strong></a>(self)</dt><dd><tt>Returns the Last.fm ID.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Album-get_image_url"><strong>get_image_url</strong></a>(self, size<font color="#909090">=3</font>)</dt><dd><tt>Returns the associated image URL.<br>
|
|
# Parameters:<br>
|
|
* size int: The image size. Possible values:<br>
|
|
o IMAGE_EXTRA_LARGE<br>
|
|
o IMAGE_LARGE<br>
|
|
o IMAGE_MEDIUM<br>
|
|
o IMAGE_SMALL</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Album-get_listener_count"><strong>get_listener_count</strong></a>(self)</dt><dd><tt>Returns the number of liteners on Last.fm.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Album-get_mbid"><strong>get_mbid</strong></a>(self)</dt><dd><tt>Returns the MusicBrainz id of the album.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Album-get_name"><strong>get_name</strong></a>(self)</dt><dd><tt>Returns the album title (alias to <a href="#Album">Album</a>.get_title).</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Album-get_playcount"><strong>get_playcount</strong></a>(self)</dt><dd><tt>Returns the number of plays on Last.fm.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Album-get_release_date"><strong>get_release_date</strong></a>(self)</dt><dd><tt>Retruns the release date of the album.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Album-get_title"><strong>get_title</strong></a>(self)</dt><dd><tt>Returns the album title.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Album-get_top_tags"><strong>get_top_tags</strong></a>(self, limit<font color="#909090">=None</font>)</dt><dd><tt>Returns a list of the most-applied tags to this album.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Album-get_tracks"><strong>get_tracks</strong></a>(self)</dt><dd><tt>Returns the list of Tracks on this album.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Album-get_url"><strong>get_url</strong></a>(self, domain_name<font color="#909090">='www.last.fm'</font>)</dt><dd><tt>Returns the url of the album page on Last.fm. <br>
|
|
# Parameters:<br>
|
|
* domain_name str: Last.fm's language domain. Possible values:<br>
|
|
o DOMAIN_ENGLISH<br>
|
|
o DOMAIN_GERMAN<br>
|
|
o DOMAIN_SPANISH<br>
|
|
o DOMAIN_FRENCH<br>
|
|
o DOMAIN_ITALIAN<br>
|
|
o DOMAIN_POLISH<br>
|
|
o DOMAIN_PORTUGUESE<br>
|
|
o DOMAIN_SWEDISH<br>
|
|
o DOMAIN_TURKISH<br>
|
|
o DOMAIN_RUSSIAN<br>
|
|
o DOMAIN_JAPANESE<br>
|
|
o DOMAIN_CHINESE</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#_BaseObject">_BaseObject</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods inherited from <a href="pylast.html#_Taggable">_Taggable</a>:<br>
|
|
<dl><dt><a name="Album-add_tags"><strong>add_tags</strong></a>(self, *tags)</dt><dd><tt>Adds one or several tags.<br>
|
|
* *tags: Any number of tag names or <a href="#Tag">Tag</a> objects.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Album-clear_tags"><strong>clear_tags</strong></a>(self)</dt><dd><tt>Clears all the user-set tags.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Album-get_tags"><strong>get_tags</strong></a>(self)</dt><dd><tt>Returns a list of the tags set by the user to this <a href="__builtin__.html#object">object</a>.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Album-remove_tags"><strong>remove_tags</strong></a>(self, *tags)</dt><dd><tt>Removes one or several tags from this <a href="__builtin__.html#object">object</a>.<br>
|
|
* *tags: Any number of tag names or <a href="#Tag">Tag</a> objects.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Album-set_tags"><strong>set_tags</strong></a>(self, *tags)</dt><dd><tt>Sets this <a href="__builtin__.html#object">object</a>'s tags to only those tags.<br>
|
|
* *tags: any number of tag names.</tt></dd></dl>
|
|
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="AlbumSearch">class <strong>AlbumSearch</strong></a>(<a href="pylast.html#_Search">_Search</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>Search for an album by name.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#AlbumSearch">AlbumSearch</a></dd>
|
|
<dd><a href="pylast.html#_Search">_Search</a></dd>
|
|
<dd><a href="pylast.html#_BaseObject">_BaseObject</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="AlbumSearch-__init__"><strong>__init__</strong></a>(self, album_name, api_key, api_secret, session_key)</dt></dl>
|
|
|
|
<dl><dt><a name="AlbumSearch-get_next_page"><strong>get_next_page</strong></a>(self)</dt><dd><tt>Returns the next page of results as a sequence of <a href="#Album">Album</a> objects.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="pylast.html#_Search">_Search</a>:<br>
|
|
<dl><dt><a name="AlbumSearch-get_total_result_count"><strong>get_total_result_count</strong></a>(self)</dt><dd><tt>Returns the total count of all the results.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#_BaseObject">_BaseObject</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="Artist">class <strong>Artist</strong></a>(<a href="pylast.html#_BaseObject">_BaseObject</a>, <a href="pylast.html#_Taggable">_Taggable</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A Last.fm artist.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#Artist">Artist</a></dd>
|
|
<dd><a href="pylast.html#_BaseObject">_BaseObject</a></dd>
|
|
<dd><a href="pylast.html#_Taggable">_Taggable</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="Artist-__eq__"><strong>__eq__</strong></a>(self, other)</dt></dl>
|
|
|
|
<dl><dt><a name="Artist-__init__"><strong>__init__</strong></a>(self, name, api_key, api_secret, session_key)</dt><dd><tt>Create an artist <a href="__builtin__.html#object">object</a>.<br>
|
|
# Parameters:<br>
|
|
* name str: The artist's name.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Artist-__ne__"><strong>__ne__</strong></a>(self, other)</dt></dl>
|
|
|
|
<dl><dt><a name="Artist-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Artist-get_bio_content"><strong>get_bio_content</strong></a>(self)</dt><dd><tt>Returns the content of the artist's biography.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Artist-get_bio_published_date"><strong>get_bio_published_date</strong></a>(self)</dt><dd><tt>Returns the date on which the artist's biography was published.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Artist-get_bio_summary"><strong>get_bio_summary</strong></a>(self)</dt><dd><tt>Returns the summary of the artist's biography.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Artist-get_image_url"><strong>get_image_url</strong></a>(self, size<font color="#909090">=2</font>)</dt><dd><tt>Returns the associated image URL. <br>
|
|
# Parameters:<br>
|
|
* size int: The image size. Possible values:<br>
|
|
o IMAGE_LARGE<br>
|
|
o IMAGE_MEDIUM<br>
|
|
o IMAGE_SMALL</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Artist-get_listener_count"><strong>get_listener_count</strong></a>(self)</dt><dd><tt>Returns the number of liteners on Last.fm.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Artist-get_mbid"><strong>get_mbid</strong></a>(self)</dt><dd><tt>Returns the MusicBrainz ID of this artist.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Artist-get_name"><strong>get_name</strong></a>(self)</dt><dd><tt>Returns the name of the artist.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Artist-get_playcount"><strong>get_playcount</strong></a>(self)</dt><dd><tt>Returns the number of plays on Last.fm.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Artist-get_similar"><strong>get_similar</strong></a>(self, limit<font color="#909090">=None</font>)</dt><dd><tt>Returns the similar artists on Last.fm.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Artist-get_top_albums"><strong>get_top_albums</strong></a>(self)</dt><dd><tt>Retuns a list of the top albums.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Artist-get_top_fans"><strong>get_top_fans</strong></a>(self, limit<font color="#909090">=None</font>)</dt><dd><tt>Returns a list of the Users who played this artist the most.<br>
|
|
# Parameters:<br>
|
|
* limit int: Max elements.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Artist-get_top_tracks"><strong>get_top_tracks</strong></a>(self)</dt><dd><tt>Returns a list of the most played Tracks by this artist.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Artist-get_upcoming_events"><strong>get_upcoming_events</strong></a>(self)</dt><dd><tt>Returns a list of the upcoming Events for this artist.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Artist-get_url"><strong>get_url</strong></a>(self, domain_name<font color="#909090">='www.last.fm'</font>)</dt><dd><tt>Returns the url of the artist page on Last.fm. <br>
|
|
# Parameters:<br>
|
|
* domain_name: Last.fm's language domain. Possible values:<br>
|
|
o DOMAIN_ENGLISH<br>
|
|
o DOMAIN_GERMAN<br>
|
|
o DOMAIN_SPANISH<br>
|
|
o DOMAIN_FRENCH<br>
|
|
o DOMAIN_ITALIAN<br>
|
|
o DOMAIN_POLISH<br>
|
|
o DOMAIN_PORTUGUESE<br>
|
|
o DOMAIN_SWEDISH<br>
|
|
o DOMAIN_TURKISH<br>
|
|
o DOMAIN_RUSSIAN<br>
|
|
o DOMAIN_JAPANESE<br>
|
|
o DOMAIN_CHINESE</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Artist-is_streamable"><strong>is_streamable</strong></a>(self)</dt><dd><tt>Returns True if the artist is streamable.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Artist-share"><strong>share</strong></a>(self, users, message<font color="#909090">=None</font>)</dt><dd><tt>Shares this artist (sends out recommendations). <br>
|
|
# Parameters:<br>
|
|
* users [<a href="#User">User</a>|str,]: A list that can contain usernames, emails, <a href="#User">User</a> objects, or all of them.<br>
|
|
* message str: A message to include in the recommendation message.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#_BaseObject">_BaseObject</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods inherited from <a href="pylast.html#_Taggable">_Taggable</a>:<br>
|
|
<dl><dt><a name="Artist-add_tags"><strong>add_tags</strong></a>(self, *tags)</dt><dd><tt>Adds one or several tags.<br>
|
|
* *tags: Any number of tag names or <a href="#Tag">Tag</a> objects.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Artist-clear_tags"><strong>clear_tags</strong></a>(self)</dt><dd><tt>Clears all the user-set tags.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Artist-get_tags"><strong>get_tags</strong></a>(self)</dt><dd><tt>Returns a list of the tags set by the user to this <a href="__builtin__.html#object">object</a>.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Artist-get_top_tags"><strong>get_top_tags</strong></a>(self, limit<font color="#909090">=None</font>)</dt><dd><tt>Returns a list of the most frequently used Tags on this <a href="__builtin__.html#object">object</a>.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Artist-remove_tags"><strong>remove_tags</strong></a>(self, *tags)</dt><dd><tt>Removes one or several tags from this <a href="__builtin__.html#object">object</a>.<br>
|
|
* *tags: Any number of tag names or <a href="#Tag">Tag</a> objects.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Artist-set_tags"><strong>set_tags</strong></a>(self, *tags)</dt><dd><tt>Sets this <a href="__builtin__.html#object">object</a>'s tags to only those tags.<br>
|
|
* *tags: any number of tag names.</tt></dd></dl>
|
|
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="ArtistSearch">class <strong>ArtistSearch</strong></a>(<a href="pylast.html#_Search">_Search</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>Search for an artist by artist name.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#ArtistSearch">ArtistSearch</a></dd>
|
|
<dd><a href="pylast.html#_Search">_Search</a></dd>
|
|
<dd><a href="pylast.html#_BaseObject">_BaseObject</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="ArtistSearch-__init__"><strong>__init__</strong></a>(self, artist_name, api_key, api_secret, session_key)</dt></dl>
|
|
|
|
<dl><dt><a name="ArtistSearch-get_next_page"><strong>get_next_page</strong></a>(self)</dt><dd><tt>Returns the next page of results as a sequence of <a href="#Artist">Artist</a> objects.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="pylast.html#_Search">_Search</a>:<br>
|
|
<dl><dt><a name="ArtistSearch-get_total_result_count"><strong>get_total_result_count</strong></a>(self)</dt><dd><tt>Returns the total count of all the results.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#_BaseObject">_BaseObject</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="AuthenticatedUser">class <strong>AuthenticatedUser</strong></a>(<a href="pylast.html#User">User</a>)</font></td></tr>
|
|
|
|
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#AuthenticatedUser">AuthenticatedUser</a></dd>
|
|
<dd><a href="pylast.html#User">User</a></dd>
|
|
<dd><a href="pylast.html#_BaseObject">_BaseObject</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="AuthenticatedUser-__init__"><strong>__init__</strong></a>(self, api_key, api_secret, session_key)</dt></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_age"><strong>get_age</strong></a>(self)</dt><dd><tt>Returns the user's age.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_country"><strong>get_country</strong></a>(self)</dt><dd><tt>Returns the name of the country of the user.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_gender"><strong>get_gender</strong></a>(self)</dt><dd><tt>Returns the user's gender. Either USER_MALE or USER_FEMALE.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_id"><strong>get_id</strong></a>(self)</dt><dd><tt>Returns the user id.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_image_url"><strong>get_image_url</strong></a>(self)</dt><dd><tt>Returns the user's avatar.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_language"><strong>get_language</strong></a>(self)</dt><dd><tt>Returns the language code of the language used by the user.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_name"><strong>get_name</strong></a>(self)</dt><dd><tt>Returns the name of the authenticated user.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_playcount"><strong>get_playcount</strong></a>(self)</dt><dd><tt>Returns the user's playcount so far.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_recommended_artists_page"><strong>get_recommended_artists_page</strong></a>(self)</dt><dd><tt>Retruns a paginated list of all artists a user has attended in the past.<br>
|
|
<br>
|
|
Example:<br>
|
|
--------<br>
|
|
<br>
|
|
while not user.<a href="#AuthenticatedUser-is_end_of_recommended_artists">is_end_of_recommended_artists</a>():<br>
|
|
print user.<a href="#AuthenticatedUser-get_recommended_artists_page">get_recommended_artists_page</a>()</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_recommended_events_page"><strong>get_recommended_events_page</strong></a>(self)</dt><dd><tt>Retruns a paginated list of all events a user has attended in the past.<br>
|
|
<br>
|
|
Example:<br>
|
|
--------<br>
|
|
<br>
|
|
while not user.<a href="#AuthenticatedUser-is_end_of_recommended_events">is_end_of_recommended_events</a>():<br>
|
|
print user.<a href="#AuthenticatedUser-get_recommended_events_page">get_recommended_events_page</a>()</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-is_end_of_recommended_artists"><strong>is_end_of_recommended_artists</strong></a>(self)</dt><dd><tt>Returns True if the end of Past Artists was reached.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-is_end_of_recommended_events"><strong>is_end_of_recommended_events</strong></a>(self)</dt><dd><tt>Returns True if the end of Past Events was reached.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-is_subscriber"><strong>is_subscriber</strong></a>(self)</dt><dd><tt>Returns whether the user is a subscriber or not. True or False.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="pylast.html#User">User</a>:<br>
|
|
<dl><dt><a name="AuthenticatedUser-__eq__"><strong>__eq__</strong></a>(self, another)</dt></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-__ne__"><strong>__ne__</strong></a>(self, another)</dt></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-compare_with_user"><strong>compare_with_user</strong></a>(self, user, shared_artists_limit<font color="#909090">=None</font>)</dt><dd><tt>Compare this user with another Last.fm user.<br>
|
|
Returns a sequence (tasteometer_score, (shared_artist1, shared_artist2, ...))<br>
|
|
user: A <a href="#User">User</a> <a href="__builtin__.html#object">object</a> or a username string/unicode <a href="__builtin__.html#object">object</a>.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-getRecommendedEvents"><strong>getRecommendedEvents</strong></a>(self, page<font color="#909090">=None</font>, limit<font color="#909090">=None</font>)</dt><dd><tt>Returns a paginated list of all events recommended to a user by Last.fm, based on their listening profile.<br>
|
|
* page: The page number of results to return.<br>
|
|
* limit: The limit of events to return.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_friends"><strong>get_friends</strong></a>(self, limit<font color="#909090">=None</font>)</dt><dd><tt>Returns a list of the user's friends.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_library"><strong>get_library</strong></a>(self)</dt><dd><tt>Returns the associated <a href="#Library">Library</a> <a href="__builtin__.html#object">object</a>.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_loved_tracks"><strong>get_loved_tracks</strong></a>(self)</dt><dd><tt>Returns the last 50 tracks loved by this user.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_neighbours"><strong>get_neighbours</strong></a>(self, limit<font color="#909090">=None</font>)</dt><dd><tt>Returns a list of the user's friends.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_now_playing"><strong>get_now_playing</strong></a>(self)</dt><dd><tt>Returns the currently playing track, or None if nothing is playing.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_past_events_page"><strong>get_past_events_page</strong></a>(self)</dt><dd><tt>Retruns a paginated list of all events a user has attended in the past.<br>
|
|
<br>
|
|
Example:<br>
|
|
--------<br>
|
|
<br>
|
|
while not user.<a href="#AuthenticatedUser-is_end_of_past_events">is_end_of_past_events</a>():<br>
|
|
print user.<a href="#AuthenticatedUser-get_past_events_page">get_past_events_page</a>()</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_playlists"><strong>get_playlists</strong></a>(self)</dt><dd><tt>Returns a list of Playlists that this user owns.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_recent_tracks"><strong>get_recent_tracks</strong></a>(self, limit<font color="#909090">=None</font>)</dt><dd><tt>Returns this user's recent listened-to tracks as<br>
|
|
a sequence of <a href="#PlayedTrack">PlayedTrack</a> objects.<br>
|
|
Use <a href="#-extract_items">extract_items</a>() with the return of this function to<br>
|
|
get only a sequence of <a href="#Track">Track</a> objects with no playback dates.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_top_albums"><strong>get_top_albums</strong></a>(self, period<font color="#909090">='overall'</font>)</dt><dd><tt>Returns the top albums played by a user. <br>
|
|
* period: The period of time. Possible values:<br>
|
|
o PERIOD_OVERALL<br>
|
|
o PERIOD_3MONTHS<br>
|
|
o PERIOD_6MONTHS<br>
|
|
o PERIOD_12MONTHS</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_top_artists"><strong>get_top_artists</strong></a>(self, period<font color="#909090">='overall'</font>)</dt><dd><tt>Returns the top artists played by a user. <br>
|
|
* period: The period of time. Possible values:<br>
|
|
o PERIOD_OVERALL<br>
|
|
o PERIOD_3MONTHS<br>
|
|
o PERIOD_6MONTHS<br>
|
|
o PERIOD_12MONTHS</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_top_tags"><strong>get_top_tags</strong></a>(self, limit<font color="#909090">=None</font>)</dt><dd><tt>Returns a sequence of the top tags used by this user with their counts as (<a href="#Tag">Tag</a>, tagcount). <br>
|
|
* limit: The limit of how many tags to return.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_top_tracks"><strong>get_top_tracks</strong></a>(self, period<font color="#909090">='overall'</font>)</dt><dd><tt>Returns the top tracks played by a user. <br>
|
|
* period: The period of time. Possible values:<br>
|
|
o PERIOD_OVERALL<br>
|
|
o PERIOD_3MONTHS<br>
|
|
o PERIOD_6MONTHS<br>
|
|
o PERIOD_12MONTHS</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_upcoming_events"><strong>get_upcoming_events</strong></a>(self)</dt><dd><tt>Returns all the upcoming events for this user.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_url"><strong>get_url</strong></a>(self, domain_name<font color="#909090">='www.last.fm'</font>)</dt><dd><tt>Returns the url of the user page on Last.fm. <br>
|
|
* domain_name: Last.fm's language domain. Possible values:<br>
|
|
o DOMAIN_ENGLISH<br>
|
|
o DOMAIN_GERMAN<br>
|
|
o DOMAIN_SPANISH<br>
|
|
o DOMAIN_FRENCH<br>
|
|
o DOMAIN_ITALIAN<br>
|
|
o DOMAIN_POLISH<br>
|
|
o DOMAIN_PORTUGUESE<br>
|
|
o DOMAIN_SWEDISH<br>
|
|
o DOMAIN_TURKISH<br>
|
|
o DOMAIN_RUSSIAN<br>
|
|
o DOMAIN_JAPANESE<br>
|
|
o DOMAIN_CHINESE</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_weekly_album_charts"><strong>get_weekly_album_charts</strong></a>(self, from_date<font color="#909090">=None</font>, to_date<font color="#909090">=None</font>)</dt><dd><tt>Returns the weekly album charts for the week starting from the from_date value to the to_date value.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_weekly_artist_charts"><strong>get_weekly_artist_charts</strong></a>(self, from_date<font color="#909090">=None</font>, to_date<font color="#909090">=None</font>)</dt><dd><tt>Returns the weekly artist charts for the week starting from the from_date value to the to_date value.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_weekly_chart_dates"><strong>get_weekly_chart_dates</strong></a>(self)</dt><dd><tt>Returns a list of From and To tuples for the available charts.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-get_weekly_track_charts"><strong>get_weekly_track_charts</strong></a>(self, from_date<font color="#909090">=None</font>, to_date<font color="#909090">=None</font>)</dt><dd><tt>Returns the weekly track charts for the week starting from the from_date value to the to_date value.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="AuthenticatedUser-is_end_of_past_events"><strong>is_end_of_past_events</strong></a>(self)</dt><dd><tt>Returns True if the end of Past Events was reached.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#_BaseObject">_BaseObject</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="BadAuthentication">class <strong>BadAuthentication</strong></a>(<a href="pylast.html#ScrobblingException">ScrobblingException</a>)</font></td></tr>
|
|
|
|
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#BadAuthentication">BadAuthentication</a></dd>
|
|
<dd><a href="pylast.html#ScrobblingException">ScrobblingException</a></dd>
|
|
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
|
|
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="BadAuthentication-__init__"><strong>__init__</strong></a>(self)</dt></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="pylast.html#ScrobblingException">ScrobblingException</a>:<br>
|
|
<dl><dt><a name="BadAuthentication-__inint__"><strong>__inint__</strong></a>(self, message)</dt></dl>
|
|
|
|
<dl><dt><a name="BadAuthentication-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#ScrobblingException">ScrobblingException</a>:<br>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
<hr>
|
|
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
|
|
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x8226dc0><dd><tt>T.<a href="#BadAuthentication-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
|
|
<dl><dt><a name="BadAuthentication-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#BadAuthentication-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BadAuthentication-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#BadAuthentication-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BadAuthentication-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#BadAuthentication-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BadAuthentication-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#BadAuthentication-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br>
|
|
<br>
|
|
Use of negative indices is not supported.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BadAuthentication-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
|
|
|
|
<dl><dt><a name="BadAuthentication-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#BadAuthentication-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BadAuthentication-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
|
|
|
|
<dl><dt><a name="BadAuthentication-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#BadAuthentication-__str__">__str__</a>() <==> str(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BadAuthentication-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
</dl>
|
|
<dl><dt><strong>args</strong></dt>
|
|
</dl>
|
|
<dl><dt><strong>message</strong></dt>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="BadSession">class <strong>BadSession</strong></a>(<a href="pylast.html#ScrobblingException">ScrobblingException</a>)</font></td></tr>
|
|
|
|
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#BadSession">BadSession</a></dd>
|
|
<dd><a href="pylast.html#ScrobblingException">ScrobblingException</a></dd>
|
|
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
|
|
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="BadSession-__init__"><strong>__init__</strong></a>(self)</dt></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="pylast.html#ScrobblingException">ScrobblingException</a>:<br>
|
|
<dl><dt><a name="BadSession-__inint__"><strong>__inint__</strong></a>(self, message)</dt></dl>
|
|
|
|
<dl><dt><a name="BadSession-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#ScrobblingException">ScrobblingException</a>:<br>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
<hr>
|
|
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
|
|
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x8226dc0><dd><tt>T.<a href="#BadSession-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
|
|
<dl><dt><a name="BadSession-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#BadSession-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BadSession-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#BadSession-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BadSession-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#BadSession-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BadSession-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#BadSession-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br>
|
|
<br>
|
|
Use of negative indices is not supported.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BadSession-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
|
|
|
|
<dl><dt><a name="BadSession-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#BadSession-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BadSession-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
|
|
|
|
<dl><dt><a name="BadSession-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#BadSession-__str__">__str__</a>() <==> str(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BadSession-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
</dl>
|
|
<dl><dt><strong>args</strong></dt>
|
|
</dl>
|
|
<dl><dt><strong>message</strong></dt>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="BadTime">class <strong>BadTime</strong></a>(<a href="pylast.html#ScrobblingException">ScrobblingException</a>)</font></td></tr>
|
|
|
|
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#BadTime">BadTime</a></dd>
|
|
<dd><a href="pylast.html#ScrobblingException">ScrobblingException</a></dd>
|
|
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
|
|
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="BadTime-__init__"><strong>__init__</strong></a>(self)</dt></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="pylast.html#ScrobblingException">ScrobblingException</a>:<br>
|
|
<dl><dt><a name="BadTime-__inint__"><strong>__inint__</strong></a>(self, message)</dt></dl>
|
|
|
|
<dl><dt><a name="BadTime-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#ScrobblingException">ScrobblingException</a>:<br>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
<hr>
|
|
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
|
|
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x8226dc0><dd><tt>T.<a href="#BadTime-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
|
|
<dl><dt><a name="BadTime-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#BadTime-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BadTime-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#BadTime-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BadTime-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#BadTime-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BadTime-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#BadTime-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br>
|
|
<br>
|
|
Use of negative indices is not supported.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BadTime-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
|
|
|
|
<dl><dt><a name="BadTime-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#BadTime-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BadTime-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
|
|
|
|
<dl><dt><a name="BadTime-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#BadTime-__str__">__str__</a>() <==> str(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BadTime-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
</dl>
|
|
<dl><dt><strong>args</strong></dt>
|
|
</dl>
|
|
<dl><dt><strong>message</strong></dt>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="BannedClient">class <strong>BannedClient</strong></a>(<a href="pylast.html#ScrobblingException">ScrobblingException</a>)</font></td></tr>
|
|
|
|
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#BannedClient">BannedClient</a></dd>
|
|
<dd><a href="pylast.html#ScrobblingException">ScrobblingException</a></dd>
|
|
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
|
|
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="BannedClient-__init__"><strong>__init__</strong></a>(self)</dt></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="pylast.html#ScrobblingException">ScrobblingException</a>:<br>
|
|
<dl><dt><a name="BannedClient-__inint__"><strong>__inint__</strong></a>(self, message)</dt></dl>
|
|
|
|
<dl><dt><a name="BannedClient-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#ScrobblingException">ScrobblingException</a>:<br>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
<hr>
|
|
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
|
|
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x8226dc0><dd><tt>T.<a href="#BannedClient-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
|
|
<dl><dt><a name="BannedClient-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#BannedClient-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BannedClient-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#BannedClient-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BannedClient-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#BannedClient-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BannedClient-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#BannedClient-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br>
|
|
<br>
|
|
Use of negative indices is not supported.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BannedClient-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
|
|
|
|
<dl><dt><a name="BannedClient-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#BannedClient-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BannedClient-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
|
|
|
|
<dl><dt><a name="BannedClient-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#BannedClient-__str__">__str__</a>() <==> str(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="BannedClient-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
</dl>
|
|
<dl><dt><strong>args</strong></dt>
|
|
</dl>
|
|
<dl><dt><strong>message</strong></dt>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="Country">class <strong>Country</strong></a>(<a href="pylast.html#_BaseObject">_BaseObject</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A country at Last.fm.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#Country">Country</a></dd>
|
|
<dd><a href="pylast.html#_BaseObject">_BaseObject</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="Country-__eq__"><strong>__eq__</strong></a>(self, other)</dt></dl>
|
|
|
|
<dl><dt><a name="Country-__init__"><strong>__init__</strong></a>(self, name, api_key, api_secret, session_key)</dt></dl>
|
|
|
|
<dl><dt><a name="Country-__ne__"><strong>__ne__</strong></a>(self, other)</dt></dl>
|
|
|
|
<dl><dt><a name="Country-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Country-get_name"><strong>get_name</strong></a>(self)</dt><dd><tt>Returns the country name.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Country-get_top_artists"><strong>get_top_artists</strong></a>(self)</dt><dd><tt>Returns a sequence of the most played artists.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Country-get_top_tracks"><strong>get_top_tracks</strong></a>(self)</dt><dd><tt>Returns a sequence of the most played tracks</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Country-get_url"><strong>get_url</strong></a>(self, domain_name<font color="#909090">='www.last.fm'</font>)</dt><dd><tt>Returns the url of the event page on Last.fm. <br>
|
|
* domain_name: Last.fm's language domain. Possible values:<br>
|
|
o DOMAIN_ENGLISH<br>
|
|
o DOMAIN_GERMAN<br>
|
|
o DOMAIN_SPANISH<br>
|
|
o DOMAIN_FRENCH<br>
|
|
o DOMAIN_ITALIAN<br>
|
|
o DOMAIN_POLISH<br>
|
|
o DOMAIN_PORTUGUESE<br>
|
|
o DOMAIN_SWEDISH<br>
|
|
o DOMAIN_TURKISH<br>
|
|
o DOMAIN_RUSSIAN<br>
|
|
o DOMAIN_JAPANESE<br>
|
|
o DOMAIN_CHINESE</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#_BaseObject">_BaseObject</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="Event">class <strong>Event</strong></a>(<a href="pylast.html#_BaseObject">_BaseObject</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A Last.fm event.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#Event">Event</a></dd>
|
|
<dd><a href="pylast.html#_BaseObject">_BaseObject</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="Event-__eq__"><strong>__eq__</strong></a>(self, other)</dt></dl>
|
|
|
|
<dl><dt><a name="Event-__init__"><strong>__init__</strong></a>(self, event_id, api_key, api_secret, session_key)</dt></dl>
|
|
|
|
<dl><dt><a name="Event-__ne__"><strong>__ne__</strong></a>(self, other)</dt></dl>
|
|
|
|
<dl><dt><a name="Event-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Event-attend"><strong>attend</strong></a>(self, attending_status)</dt><dd><tt>Sets the attending status.<br>
|
|
* attending_status: The attending status. Possible values:<br>
|
|
o EVENT_ATTENDING<br>
|
|
o EVENT_MAYBE_ATTENDING<br>
|
|
o EVENT_NOT_ATTENDING</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Event-get_artists"><strong>get_artists</strong></a>(self)</dt><dd><tt>Returns a list of the participating Artists.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Event-get_attendance_count"><strong>get_attendance_count</strong></a>(self)</dt><dd><tt>Returns the number of attending people.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Event-get_description"><strong>get_description</strong></a>(self)</dt><dd><tt>Returns the description of the event.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Event-get_headliner"><strong>get_headliner</strong></a>(self)</dt><dd><tt>Returns the headliner of the event.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Event-get_id"><strong>get_id</strong></a>(self)</dt><dd><tt>Returns the id of the event on Last.fm.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Event-get_image_url"><strong>get_image_url</strong></a>(self, size<font color="#909090">=2</font>)</dt><dd><tt>Returns the associated image URL. <br>
|
|
* size: The image size. Possible values:<br>
|
|
o IMAGE_LARGE<br>
|
|
o IMAGE_MEDIUM<br>
|
|
o IMAGE_SMALL</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Event-get_review_count"><strong>get_review_count</strong></a>(self)</dt><dd><tt>Returns the number of available reviews for this event.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Event-get_start_date"><strong>get_start_date</strong></a>(self)</dt><dd><tt>Returns the date when the event starts.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Event-get_title"><strong>get_title</strong></a>(self)</dt><dd><tt>Returns the title of the event.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Event-get_url"><strong>get_url</strong></a>(self, domain_name<font color="#909090">='www.last.fm'</font>)</dt><dd><tt>Returns the url of the event page on Last.fm. <br>
|
|
* domain_name: Last.fm's language domain. Possible values:<br>
|
|
o DOMAIN_ENGLISH<br>
|
|
o DOMAIN_GERMAN<br>
|
|
o DOMAIN_SPANISH<br>
|
|
o DOMAIN_FRENCH<br>
|
|
o DOMAIN_ITALIAN<br>
|
|
o DOMAIN_POLISH<br>
|
|
o DOMAIN_PORTUGUESE<br>
|
|
o DOMAIN_SWEDISH<br>
|
|
o DOMAIN_TURKISH<br>
|
|
o DOMAIN_RUSSIAN<br>
|
|
o DOMAIN_JAPANESE<br>
|
|
o DOMAIN_CHINESE</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Event-get_venue"><strong>get_venue</strong></a>(self)</dt><dd><tt>Returns the venue where the event is held.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Event-share"><strong>share</strong></a>(self, users, message<font color="#909090">=None</font>)</dt><dd><tt>Shares this event (sends out recommendations). <br>
|
|
* users: A list that can contain usernames, emails, <a href="#User">User</a> objects, or all of them.<br>
|
|
* message: A message to include in the recommendation message.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#_BaseObject">_BaseObject</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="Group">class <strong>Group</strong></a>(<a href="pylast.html#_BaseObject">_BaseObject</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A Last.fm group.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#Group">Group</a></dd>
|
|
<dd><a href="pylast.html#_BaseObject">_BaseObject</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="Group-__eq__"><strong>__eq__</strong></a>(self, other)</dt></dl>
|
|
|
|
<dl><dt><a name="Group-__init__"><strong>__init__</strong></a>(self, group_name, api_key, api_secret, session_key)</dt></dl>
|
|
|
|
<dl><dt><a name="Group-__ne__"><strong>__ne__</strong></a>(self, other)</dt></dl>
|
|
|
|
<dl><dt><a name="Group-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Group-get_name"><strong>get_name</strong></a>(self)</dt><dd><tt>Returns the group name.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Group-get_url"><strong>get_url</strong></a>(self, domain_name<font color="#909090">='www.last.fm'</font>)</dt><dd><tt>Returns the url of the group page on Last.fm. <br>
|
|
* domain_name: Last.fm's language domain. Possible values:<br>
|
|
o DOMAIN_ENGLISH<br>
|
|
o DOMAIN_GERMAN<br>
|
|
o DOMAIN_SPANISH<br>
|
|
o DOMAIN_FRENCH<br>
|
|
o DOMAIN_ITALIAN<br>
|
|
o DOMAIN_POLISH<br>
|
|
o DOMAIN_PORTUGUESE<br>
|
|
o DOMAIN_SWEDISH<br>
|
|
o DOMAIN_TURKISH<br>
|
|
o DOMAIN_RUSSIAN<br>
|
|
o DOMAIN_JAPANESE<br>
|
|
o DOMAIN_CHINESE</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Group-get_weekly_album_charts"><strong>get_weekly_album_charts</strong></a>(self, from_date<font color="#909090">=None</font>, to_date<font color="#909090">=None</font>)</dt><dd><tt>Returns the weekly album charts for the week starting from the from_date value to the to_date value.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Group-get_weekly_artist_charts"><strong>get_weekly_artist_charts</strong></a>(self, from_date<font color="#909090">=None</font>, to_date<font color="#909090">=None</font>)</dt><dd><tt>Returns the weekly artist charts for the week starting from the from_date value to the to_date value.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Group-get_weekly_chart_dates"><strong>get_weekly_chart_dates</strong></a>(self)</dt><dd><tt>Returns a list of From and To tuples for the available charts.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Group-get_weekly_track_charts"><strong>get_weekly_track_charts</strong></a>(self, from_date<font color="#909090">=None</font>, to_date<font color="#909090">=None</font>)</dt><dd><tt>Returns the weekly track charts for the week starting from the from_date value to the to_date value.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#_BaseObject">_BaseObject</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="Library">class <strong>Library</strong></a>(<a href="pylast.html#_BaseObject">_BaseObject</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A user's Last.fm library.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#Library">Library</a></dd>
|
|
<dd><a href="pylast.html#_BaseObject">_BaseObject</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="Library-__init__"><strong>__init__</strong></a>(self, user, api_key, api_secret, session_key)</dt></dl>
|
|
|
|
<dl><dt><a name="Library-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Library-add_album"><strong>add_album</strong></a>(self, album)</dt><dd><tt>Add an album to this library.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Library-add_artist"><strong>add_artist</strong></a>(self, artist)</dt><dd><tt>Add an artist to this library.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Library-add_track"><strong>add_track</strong></a>(self, track)</dt><dd><tt>Add a track to this library.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Library-get_albums_page"><strong>get_albums_page</strong></a>(self)</dt><dd><tt>Retreives the next page of albums in the <a href="#Library">Library</a>. Returns a sequence of <a href="#TopItem">TopItem</a> objects.<br>
|
|
Use the function extract_items like <a href="#-extract_items">extract_items</a>(<a href="#Library">Library</a>.<a href="#Library-get_albums_page">get_albums_page</a>()) to return only a sequence of<br>
|
|
<a href="#Album">Album</a> objects with no extra data.<br>
|
|
<br>
|
|
Example:<br>
|
|
-------<br>
|
|
library = <a href="#Library">Library</a>("rj", API_KEY, API_SECRET, SESSION_KEY)<br>
|
|
<br>
|
|
while not library.<a href="#Library-is_end_of_albums">is_end_of_albums</a>():<br>
|
|
print library.<a href="#Library-get_albums_page">get_albums_page</a>()</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Library-get_artists_page"><strong>get_artists_page</strong></a>(self)</dt><dd><tt>Retreives the next page of artists in the <a href="#Library">Library</a>. Returns a sequence of <a href="#TopItem">TopItem</a> objects.<br>
|
|
Use the function extract_items like <a href="#-extract_items">extract_items</a>(<a href="#Library">Library</a>.<a href="#Library-get_artists_page">get_artists_page</a>()) to return only a sequence of<br>
|
|
<a href="#Artist">Artist</a> objects with no extra data.<br>
|
|
<br>
|
|
Example:<br>
|
|
-------<br>
|
|
library = <a href="#Library">Library</a>("rj", API_KEY, API_SECRET, SESSION_KEY)<br>
|
|
<br>
|
|
while not library.<a href="#Library-is_end_of_artists">is_end_of_artists</a>():<br>
|
|
print library.<a href="#Library-get_artists_page">get_artists_page</a>()</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Library-get_tracks_page"><strong>get_tracks_page</strong></a>(self)</dt><dd><tt>Retreives the next page of tracks in the <a href="#Library">Library</a>. Returns a sequence of <a href="#TopItem">TopItem</a> objects.<br>
|
|
Use the function extract_items like <a href="#-extract_items">extract_items</a>(<a href="#Library">Library</a>.<a href="#Library-get_tracks_page">get_tracks_page</a>()) to return only a sequence of<br>
|
|
<a href="#Track">Track</a> objects with no extra data.<br>
|
|
<br>
|
|
Example:<br>
|
|
-------<br>
|
|
library = <a href="#Library">Library</a>("rj", API_KEY, API_SECRET, SESSION_KEY)<br>
|
|
<br>
|
|
while not library.<a href="#Library-is_end_of_tracks">is_end_of_tracks</a>():<br>
|
|
print library.<a href="#Library-get_tracks_page">get_tracks_page</a>()</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Library-get_user"><strong>get_user</strong></a>(self)</dt><dd><tt>Returns the user who owns this library.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Library-is_end_of_albums"><strong>is_end_of_albums</strong></a>(self)</dt><dd><tt>Returns True when the last page of albums has ben retrieved.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Library-is_end_of_artists"><strong>is_end_of_artists</strong></a>(self)</dt><dd><tt>Returns True when the last page of artists has ben retrieved.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Library-is_end_of_tracks"><strong>is_end_of_tracks</strong></a>(self)</dt><dd><tt>Returns True when the last page of tracks has ben retrieved.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#_BaseObject">_BaseObject</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="LibraryItem">class <strong>LibraryItem</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>An item in a <a href="#User">User</a>'s <a href="#Library">Library</a>. It could be an artist, an album or a track.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%">Methods defined here:<br>
|
|
<dl><dt><a name="LibraryItem-__init__"><strong>__init__</strong></a>(self, item, playcount, tagcount)</dt></dl>
|
|
|
|
<dl><dt><a name="LibraryItem-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="LibraryItem-get_item"><strong>get_item</strong></a>(self)</dt><dd><tt>Returns the itme.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="LibraryItem-get_playcount"><strong>get_playcount</strong></a>(self)</dt><dd><tt>Returns the item's playcount in the <a href="#Library">Library</a>.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="LibraryItem-get_tagcount"><strong>get_tagcount</strong></a>(self)</dt><dd><tt>Returns the item's tagcount in the <a href="#Library">Library</a>.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors defined here:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="PlayedTrack">class <strong>PlayedTrack</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A track with a playback date.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%">Methods defined here:<br>
|
|
<dl><dt><a name="PlayedTrack-__init__"><strong>__init__</strong></a>(self, track, date, timestamp)</dt></dl>
|
|
|
|
<dl><dt><a name="PlayedTrack-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="PlayedTrack-get_date"><strong>get_date</strong></a>(self)</dt><dd><tt>Returns the playback date.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="PlayedTrack-get_item"><strong>get_item</strong></a>(self)</dt><dd><tt>Returns the played track. An alias to <a href="#PlayedTrack-get_track">get_track</a>().</tt></dd></dl>
|
|
|
|
<dl><dt><a name="PlayedTrack-get_timestamp"><strong>get_timestamp</strong></a>(self)</dt><dd><tt>Returns the unix timestamp of the playback date.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="PlayedTrack-get_track"><strong>get_track</strong></a>(self)</dt><dd><tt>Return the track.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors defined here:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="Playlist">class <strong>Playlist</strong></a>(<a href="pylast.html#_BaseObject">_BaseObject</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A Last.fm user playlist.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#Playlist">Playlist</a></dd>
|
|
<dd><a href="pylast.html#_BaseObject">_BaseObject</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="Playlist-__init__"><strong>__init__</strong></a>(self, user, id, api_key, api_secret, session_key)</dt></dl>
|
|
|
|
<dl><dt><a name="Playlist-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Playlist-add_track"><strong>add_track</strong></a>(self, track)</dt><dd><tt>Adds a <a href="#Track">Track</a> to this <a href="#Playlist">Playlist</a>.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Playlist-get_creation_date"><strong>get_creation_date</strong></a>(self)</dt><dd><tt>Returns the creation date of this playlist.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Playlist-get_description"><strong>get_description</strong></a>(self)</dt><dd><tt>Returns the description of this playlist.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Playlist-get_duration"><strong>get_duration</strong></a>(self)</dt><dd><tt>Returns the duration of this playlist in milliseconds.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Playlist-get_id"><strong>get_id</strong></a>(self)</dt><dd><tt>Returns the playlist id.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Playlist-get_image_url"><strong>get_image_url</strong></a>(self, size<font color="#909090">=2</font>)</dt><dd><tt>Returns the associated image URL.<br>
|
|
* size: The image size. Possible values:<br>
|
|
o IMAGE_LARGE<br>
|
|
o IMAGE_MEDIUM<br>
|
|
o IMAGE_SMALL</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Playlist-get_size"><strong>get_size</strong></a>(self)</dt><dd><tt>Returns the number of tracks in this playlist.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Playlist-get_title"><strong>get_title</strong></a>(self)</dt><dd><tt>Returns the title of this playlist.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Playlist-get_tracks"><strong>get_tracks</strong></a>(self)</dt><dd><tt>Returns a list of the tracks on this user playlist.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Playlist-get_url"><strong>get_url</strong></a>(self, domain_name<font color="#909090">='www.last.fm'</font>)</dt><dd><tt>Returns the url of the playlist on Last.fm. <br>
|
|
* domain_name: Last.fm's language domain. Possible values:<br>
|
|
o DOMAIN_ENGLISH<br>
|
|
o DOMAIN_GERMAN<br>
|
|
o DOMAIN_SPANISH<br>
|
|
o DOMAIN_FRENCH<br>
|
|
o DOMAIN_ITALIAN<br>
|
|
o DOMAIN_POLISH<br>
|
|
o DOMAIN_PORTUGUESE<br>
|
|
o DOMAIN_SWEDISH<br>
|
|
o DOMAIN_TURKISH<br>
|
|
o DOMAIN_RUSSIAN<br>
|
|
o DOMAIN_JAPANESE<br>
|
|
o DOMAIN_CHINESE</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Playlist-get_user"><strong>get_user</strong></a>(self)</dt><dd><tt>Returns the owner user of this playlist.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Playlist-has_track"><strong>has_track</strong></a>(self, track)</dt><dd><tt>Checks to see if track is already in the playlist.<br>
|
|
* track: Any <a href="#Track">Track</a> <a href="__builtin__.html#object">object</a>.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Playlist-is_streamable"><strong>is_streamable</strong></a>(self)</dt><dd><tt>Returns True if the playlist is streamable.<br>
|
|
For a playlist to be streamable, it needs at least 45 tracks by 15 different artists.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#_BaseObject">_BaseObject</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="Scrobbler">class <strong>Scrobbler</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A class for scrobbling tracks to Last.fm<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%">Methods defined here:<br>
|
|
<dl><dt><a name="Scrobbler-__init__"><strong>__init__</strong></a>(self, client_id, client_version, username, md5_password)</dt></dl>
|
|
|
|
<dl><dt><a name="Scrobbler-report_now_playing"><strong>report_now_playing</strong></a>(self, artist, title, album<font color="#909090">=''</font>, duration<font color="#909090">=''</font>, track_number<font color="#909090">=''</font>, mbid<font color="#909090">=''</font>)</dt></dl>
|
|
|
|
<dl><dt><a name="Scrobbler-scrobble"><strong>scrobble</strong></a>(self, artist, title, time_started, source, mode, duration, album<font color="#909090">=''</font>, track_number<font color="#909090">=''</font>, mbid<font color="#909090">=''</font>)</dt><dd><tt>Scrobble a track. parameters:<br>
|
|
artist: <a href="#Artist">Artist</a> name.<br>
|
|
title: <a href="#Track">Track</a> title.<br>
|
|
time_started: UTC timestamp of when the track started playing.<br>
|
|
source: The source of the track<br>
|
|
SCROBBLE_SOURCE_USER: Chosen by the user (the most common value, unless you have a reason for choosing otherwise, use this).<br>
|
|
SCROBBLE_SOURCE_NON_PERSONALIZED_BROADCAST: Non-personalised broadcast (e.g. Shoutcast, BBC Radio 1).<br>
|
|
SCROBBLE_SOURCE_PERSONALIZED_BROADCAST: Personalised recommendation except Last.fm (e.g. Pandora, Launchcast).<br>
|
|
SCROBBLE_SOURCE_LASTFM: ast.fm (any mode). In this case, the 5-digit recommendation_key value must be set.<br>
|
|
SCROBBLE_SOURCE_UNKNOWN: Source unknown.<br>
|
|
mode: The submission mode<br>
|
|
SCROBBLE_MODE_PLAYED: The track was played.<br>
|
|
SCROBBLE_MODE_SKIPPED: The track was skipped (Only if source was Last.fm)<br>
|
|
SCROBBLE_MODE_BANNED: The track was banned (Only if source was Last.fm)<br>
|
|
duration: <a href="#Track">Track</a> duration in seconds.<br>
|
|
album: The album name.<br>
|
|
track_number: The track number on the album.<br>
|
|
mbid: MusicBrainz ID.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors defined here:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
<hr>
|
|
Data and other attributes defined here:<br>
|
|
<dl><dt><strong>nowplaying_url</strong> = None</dl>
|
|
|
|
<dl><dt><strong>session_id</strong> = None</dl>
|
|
|
|
<dl><dt><strong>submissions_url</strong> = None</dl>
|
|
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="ScrobblingException">class <strong>ScrobblingException</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr>
|
|
|
|
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#ScrobblingException">ScrobblingException</a></dd>
|
|
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
|
|
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="ScrobblingException-__inint__"><strong>__inint__</strong></a>(self, message)</dt></dl>
|
|
|
|
<dl><dt><a name="ScrobblingException-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<hr>
|
|
Data descriptors defined here:<br>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
|
|
<dl><dt><a name="ScrobblingException-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#ScrobblingException-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
|
|
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x8226dc0><dd><tt>T.<a href="#ScrobblingException-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
|
|
<dl><dt><a name="ScrobblingException-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#ScrobblingException-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ScrobblingException-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#ScrobblingException-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ScrobblingException-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#ScrobblingException-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ScrobblingException-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#ScrobblingException-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br>
|
|
<br>
|
|
Use of negative indices is not supported.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ScrobblingException-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
|
|
|
|
<dl><dt><a name="ScrobblingException-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#ScrobblingException-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ScrobblingException-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
|
|
|
|
<dl><dt><a name="ScrobblingException-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#ScrobblingException-__str__">__str__</a>() <==> str(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ScrobblingException-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
</dl>
|
|
<dl><dt><strong>args</strong></dt>
|
|
</dl>
|
|
<dl><dt><strong>message</strong></dt>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="ServiceException">class <strong>ServiceException</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt><a href="exceptions.html#Exception">Exception</a> related to the Last.fm web service<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#ServiceException">ServiceException</a></dd>
|
|
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
|
|
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="ServiceException-__init__"><strong>__init__</strong></a>(self, lastfm_status, details)</dt></dl>
|
|
|
|
<dl><dt><a name="ServiceException-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="ServiceException-get_id"><strong>get_id</strong></a>(self)</dt><dd><tt>Returns the exception ID, from one of the following:<br>
|
|
STATUS_INVALID_SERVICE = 2<br>
|
|
STATUS_INVALID_METHOD = 3<br>
|
|
STATUS_AUTH_FAILED = 4<br>
|
|
STATUS_INVALID_FORMAT = 5<br>
|
|
STATUS_INVALID_PARAMS = 6<br>
|
|
STATUS_INVALID_RESOURCE = 7<br>
|
|
STATUS_TOKEN_ERROR = 8<br>
|
|
STATUS_INVALID_SK = 9<br>
|
|
STATUS_INVALID_API_KEY = 10<br>
|
|
STATUS_OFFLINE = 11<br>
|
|
STATUS_SUBSCRIBERS_ONLY = 12<br>
|
|
STATUS_TOKEN_UNAUTHORIZED = 14<br>
|
|
STATUS_TOKEN_EXPIRED = 15</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors defined here:<br>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
<hr>
|
|
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
|
|
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x8226dc0><dd><tt>T.<a href="#ServiceException-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
|
|
<dl><dt><a name="ServiceException-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#ServiceException-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ServiceException-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#ServiceException-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ServiceException-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#ServiceException-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ServiceException-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#ServiceException-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br>
|
|
<br>
|
|
Use of negative indices is not supported.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ServiceException-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
|
|
|
|
<dl><dt><a name="ServiceException-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#ServiceException-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ServiceException-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
|
|
|
|
<dl><dt><a name="ServiceException-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#ServiceException-__str__">__str__</a>() <==> str(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ServiceException-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
</dl>
|
|
<dl><dt><strong>args</strong></dt>
|
|
</dl>
|
|
<dl><dt><strong>message</strong></dt>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="SessionKeyGenerator">class <strong>SessionKeyGenerator</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>Methods of generating a session key:<br>
|
|
1) Web Authentication:<br>
|
|
a. sg = <a href="#SessionKeyGenerator">SessionKeyGenerator</a>(API_KEY, API_SECRET)<br>
|
|
b. url = sg.<a href="#SessionKeyGenerator-get_web_auth_url">get_web_auth_url</a>()<br>
|
|
c. Ask the user to open the url and authorize you, and wait for it.<br>
|
|
d. session_key = sg.<a href="#SessionKeyGenerator-get_web_auth_session_key">get_web_auth_session_key</a>(url)<br>
|
|
2) Username and Password Authentication:<br>
|
|
a. username = raw_input("Please enter your username: ")<br>
|
|
b. md5_password = pylast.<a href="#-md5">md5</a>(raw_input("Please enter your password: ")<br>
|
|
c. session_key = <a href="#SessionKeyGenerator">SessionKeyGenerator</a>(API_KEY, API_SECRET).<a href="#SessionKeyGenerator-get_session_key">get_session_key</a>(username, md5_password)<br>
|
|
<br>
|
|
A session key's lifetime is infinie, unless the user provokes the rights of the given API Key.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%">Methods defined here:<br>
|
|
<dl><dt><a name="SessionKeyGenerator-__init__"><strong>__init__</strong></a>(self, api_key, api_secret)</dt></dl>
|
|
|
|
<dl><dt><a name="SessionKeyGenerator-get_session_key"><strong>get_session_key</strong></a>(self, username, md5_password)</dt><dd><tt>Retrieve a session key with a username and a md5 hash of the user's password.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SessionKeyGenerator-get_web_auth_session_key"><strong>get_web_auth_session_key</strong></a>(self, url)</dt><dd><tt>Retrieves the session key of a web authorization process by its url.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SessionKeyGenerator-get_web_auth_url"><strong>get_web_auth_url</strong></a>(self)</dt><dd><tt>The user must open this page, and you first, then call <a href="#SessionKeyGenerator-get_web_auth_session_key">get_web_auth_session_key</a>(url) after that.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors defined here:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="Tag">class <strong>Tag</strong></a>(<a href="pylast.html#_BaseObject">_BaseObject</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A Last.fm <a href="__builtin__.html#object">object</a> tag.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#Tag">Tag</a></dd>
|
|
<dd><a href="pylast.html#_BaseObject">_BaseObject</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="Tag-__eq__"><strong>__eq__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Tag-__init__"><strong>__init__</strong></a>(self, name, api_key, api_secret, session_key)</dt></dl>
|
|
|
|
<dl><dt><a name="Tag-__ne__"><strong>__ne__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Tag-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Tag-get_name"><strong>get_name</strong></a>(self)</dt><dd><tt>Returns the name of the tag.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Tag-get_similar"><strong>get_similar</strong></a>(self)</dt><dd><tt>Returns the tags similar to this one, ordered by similarity.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Tag-get_top_albums"><strong>get_top_albums</strong></a>(self)</dt><dd><tt>Retuns a list of the top albums.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Tag-get_top_artists"><strong>get_top_artists</strong></a>(self)</dt><dd><tt>Returns a sequence of the most played artists.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Tag-get_top_tracks"><strong>get_top_tracks</strong></a>(self)</dt><dd><tt>Returns a list of the most played Tracks by this artist.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Tag-get_url"><strong>get_url</strong></a>(self, domain_name<font color="#909090">='www.last.fm'</font>)</dt><dd><tt>Returns the url of the tag page on Last.fm. <br>
|
|
* domain_name: Last.fm's language domain. Possible values:<br>
|
|
o DOMAIN_ENGLISH<br>
|
|
o DOMAIN_GERMAN<br>
|
|
o DOMAIN_SPANISH<br>
|
|
o DOMAIN_FRENCH<br>
|
|
o DOMAIN_ITALIAN<br>
|
|
o DOMAIN_POLISH<br>
|
|
o DOMAIN_PORTUGUESE<br>
|
|
o DOMAIN_SWEDISH<br>
|
|
o DOMAIN_TURKISH<br>
|
|
o DOMAIN_RUSSIAN<br>
|
|
o DOMAIN_JAPANESE<br>
|
|
o DOMAIN_CHINESE</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Tag-get_weekly_artist_charts"><strong>get_weekly_artist_charts</strong></a>(self, from_date<font color="#909090">=None</font>, to_date<font color="#909090">=None</font>)</dt><dd><tt>Returns the weekly artist charts for the week starting from the from_date value to the to_date value.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Tag-get_weekly_chart_dates"><strong>get_weekly_chart_dates</strong></a>(self)</dt><dd><tt>Returns a list of From and To tuples for the available charts.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#_BaseObject">_BaseObject</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="TagSearch">class <strong>TagSearch</strong></a>(<a href="pylast.html#_Search">_Search</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>Search for a tag by tag name.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#TagSearch">TagSearch</a></dd>
|
|
<dd><a href="pylast.html#_Search">_Search</a></dd>
|
|
<dd><a href="pylast.html#_BaseObject">_BaseObject</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="TagSearch-__init__"><strong>__init__</strong></a>(self, tag_name, api_key, api_secret, session_key)</dt></dl>
|
|
|
|
<dl><dt><a name="TagSearch-get_next_page"><strong>get_next_page</strong></a>(self)</dt><dd><tt>Returns the next page of results as a sequence of <a href="#Tag">Tag</a> objects.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="pylast.html#_Search">_Search</a>:<br>
|
|
<dl><dt><a name="TagSearch-get_total_result_count"><strong>get_total_result_count</strong></a>(self)</dt><dd><tt>Returns the total count of all the results.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#_BaseObject">_BaseObject</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="TopItem">class <strong>TopItem</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A top item in a list that has a weight. Returned from functions like get_top_tracks() and get_top_artists().<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%">Methods defined here:<br>
|
|
<dl><dt><a name="TopItem-__init__"><strong>__init__</strong></a>(self, item, weight)</dt></dl>
|
|
|
|
<dl><dt><a name="TopItem-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="TopItem-get_item"><strong>get_item</strong></a>(self)</dt><dd><tt>Returns the item.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="TopItem-get_weight"><strong>get_weight</strong></a>(self)</dt><dd><tt>Returns the weight of the itme in the list.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors defined here:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="Track">class <strong>Track</strong></a>(<a href="pylast.html#_BaseObject">_BaseObject</a>, <a href="pylast.html#_Taggable">_Taggable</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A Last.fm track.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#Track">Track</a></dd>
|
|
<dd><a href="pylast.html#_BaseObject">_BaseObject</a></dd>
|
|
<dd><a href="pylast.html#_Taggable">_Taggable</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="Track-__eq__"><strong>__eq__</strong></a>(self, other)</dt></dl>
|
|
|
|
<dl><dt><a name="Track-__init__"><strong>__init__</strong></a>(self, artist, title, api_key, api_secret, session_key)</dt></dl>
|
|
|
|
<dl><dt><a name="Track-__ne__"><strong>__ne__</strong></a>(self, other)</dt></dl>
|
|
|
|
<dl><dt><a name="Track-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Track-ban"><strong>ban</strong></a>(self)</dt><dd><tt>Ban this track from ever playing on the radio.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-get_album"><strong>get_album</strong></a>(self)</dt><dd><tt>Returns the album <a href="__builtin__.html#object">object</a> of this track.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-get_artist"><strong>get_artist</strong></a>(self)</dt><dd><tt>Returns the associated <a href="#Artist">Artist</a> <a href="__builtin__.html#object">object</a>.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-get_duration"><strong>get_duration</strong></a>(self)</dt><dd><tt>Returns the track duration.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-get_id"><strong>get_id</strong></a>(self)</dt><dd><tt>Returns the track id on Last.fm.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-get_listener_count"><strong>get_listener_count</strong></a>(self)</dt><dd><tt>Returns the listener count.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-get_mbid"><strong>get_mbid</strong></a>(self)</dt><dd><tt>Returns the MusicBrainz ID of this track.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-get_name"><strong>get_name</strong></a>(self)</dt><dd><tt>Returns the track title (alias to <a href="#Track">Track</a>.get_title).</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-get_playcount"><strong>get_playcount</strong></a>(self)</dt><dd><tt>Returns the play count.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-get_similar"><strong>get_similar</strong></a>(self)</dt><dd><tt>Returns similar tracks for this track on Last.fm, based on listening data.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-get_title"><strong>get_title</strong></a>(self)</dt><dd><tt>Returns the track title.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-get_top_fans"><strong>get_top_fans</strong></a>(self, limit<font color="#909090">=None</font>)</dt><dd><tt>Returns a list of the Users who played this track.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-get_url"><strong>get_url</strong></a>(self, domain_name<font color="#909090">='www.last.fm'</font>)</dt><dd><tt>Returns the url of the track page on Last.fm. <br>
|
|
* domain_name: Last.fm's language domain. Possible values:<br>
|
|
o DOMAIN_ENGLISH<br>
|
|
o DOMAIN_GERMAN<br>
|
|
o DOMAIN_SPANISH<br>
|
|
o DOMAIN_FRENCH<br>
|
|
o DOMAIN_ITALIAN<br>
|
|
o DOMAIN_POLISH<br>
|
|
o DOMAIN_PORTUGUESE<br>
|
|
o DOMAIN_SWEDISH<br>
|
|
o DOMAIN_TURKISH<br>
|
|
o DOMAIN_RUSSIAN<br>
|
|
o DOMAIN_JAPANESE<br>
|
|
o DOMAIN_CHINESE</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-get_wiki_content"><strong>get_wiki_content</strong></a>(self)</dt><dd><tt>Returns the content of the wiki.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-get_wiki_published_date"><strong>get_wiki_published_date</strong></a>(self)</dt><dd><tt>Returns the date of publishing this version of the wiki.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-get_wiki_summary"><strong>get_wiki_summary</strong></a>(self)</dt><dd><tt>Returns the summary of the wiki.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-is_fulltrack_available"><strong>is_fulltrack_available</strong></a>(self)</dt><dd><tt>Returns True if the fulltrack is available for streaming.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-is_streamable"><strong>is_streamable</strong></a>(self)</dt><dd><tt>Returns True if the track is available at Last.fm.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-love"><strong>love</strong></a>(self)</dt><dd><tt>Adds the track to the user's loved tracks.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-share"><strong>share</strong></a>(self, users, message<font color="#909090">=None</font>)</dt><dd><tt>Shares this track (sends out recommendations). <br>
|
|
* users: A list that can contain usernames, emails, <a href="#User">User</a> objects, or all of them.<br>
|
|
* message: A message to include in the recommendation message.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#_BaseObject">_BaseObject</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods inherited from <a href="pylast.html#_Taggable">_Taggable</a>:<br>
|
|
<dl><dt><a name="Track-add_tags"><strong>add_tags</strong></a>(self, *tags)</dt><dd><tt>Adds one or several tags.<br>
|
|
* *tags: Any number of tag names or <a href="#Tag">Tag</a> objects.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-clear_tags"><strong>clear_tags</strong></a>(self)</dt><dd><tt>Clears all the user-set tags.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-get_tags"><strong>get_tags</strong></a>(self)</dt><dd><tt>Returns a list of the tags set by the user to this <a href="__builtin__.html#object">object</a>.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-get_top_tags"><strong>get_top_tags</strong></a>(self, limit<font color="#909090">=None</font>)</dt><dd><tt>Returns a list of the most frequently used Tags on this <a href="__builtin__.html#object">object</a>.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-remove_tags"><strong>remove_tags</strong></a>(self, *tags)</dt><dd><tt>Removes one or several tags from this <a href="__builtin__.html#object">object</a>.<br>
|
|
* *tags: Any number of tag names or <a href="#Tag">Tag</a> objects.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Track-set_tags"><strong>set_tags</strong></a>(self, *tags)</dt><dd><tt>Sets this <a href="__builtin__.html#object">object</a>'s tags to only those tags.<br>
|
|
* *tags: any number of tag names.</tt></dd></dl>
|
|
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="TrackSearch">class <strong>TrackSearch</strong></a>(<a href="pylast.html#_Search">_Search</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>Search for a track by track title. If you don't wanna narrow the results down<br>
|
|
by specifying the artist name, set it to empty string.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#TrackSearch">TrackSearch</a></dd>
|
|
<dd><a href="pylast.html#_Search">_Search</a></dd>
|
|
<dd><a href="pylast.html#_BaseObject">_BaseObject</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="TrackSearch-__init__"><strong>__init__</strong></a>(self, artist_name, track_title, api_key, api_secret, session_key)</dt></dl>
|
|
|
|
<dl><dt><a name="TrackSearch-get_next_page"><strong>get_next_page</strong></a>(self)</dt><dd><tt>Returns the next page of results as a sequence of <a href="#Track">Track</a> objects.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="pylast.html#_Search">_Search</a>:<br>
|
|
<dl><dt><a name="TrackSearch-get_total_result_count"><strong>get_total_result_count</strong></a>(self)</dt><dd><tt>Returns the total count of all the results.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#_BaseObject">_BaseObject</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="User">class <strong>User</strong></a>(<a href="pylast.html#_BaseObject">_BaseObject</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A Last.fm user.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#User">User</a></dd>
|
|
<dd><a href="pylast.html#_BaseObject">_BaseObject</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="User-__eq__"><strong>__eq__</strong></a>(self, another)</dt></dl>
|
|
|
|
<dl><dt><a name="User-__init__"><strong>__init__</strong></a>(self, user_name, api_key, api_secret, session_key)</dt></dl>
|
|
|
|
<dl><dt><a name="User-__ne__"><strong>__ne__</strong></a>(self, another)</dt></dl>
|
|
|
|
<dl><dt><a name="User-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="User-compare_with_user"><strong>compare_with_user</strong></a>(self, user, shared_artists_limit<font color="#909090">=None</font>)</dt><dd><tt>Compare this user with another Last.fm user.<br>
|
|
Returns a sequence (tasteometer_score, (shared_artist1, shared_artist2, ...))<br>
|
|
user: A <a href="#User">User</a> <a href="__builtin__.html#object">object</a> or a username string/unicode <a href="__builtin__.html#object">object</a>.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="User-getRecommendedEvents"><strong>getRecommendedEvents</strong></a>(self, page<font color="#909090">=None</font>, limit<font color="#909090">=None</font>)</dt><dd><tt>Returns a paginated list of all events recommended to a user by Last.fm, based on their listening profile.<br>
|
|
* page: The page number of results to return.<br>
|
|
* limit: The limit of events to return.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="User-get_friends"><strong>get_friends</strong></a>(self, limit<font color="#909090">=None</font>)</dt><dd><tt>Returns a list of the user's friends.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="User-get_library"><strong>get_library</strong></a>(self)</dt><dd><tt>Returns the associated <a href="#Library">Library</a> <a href="__builtin__.html#object">object</a>.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="User-get_loved_tracks"><strong>get_loved_tracks</strong></a>(self)</dt><dd><tt>Returns the last 50 tracks loved by this user.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="User-get_name"><strong>get_name</strong></a>(self)</dt><dd><tt>Returns the nuser name.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="User-get_neighbours"><strong>get_neighbours</strong></a>(self, limit<font color="#909090">=None</font>)</dt><dd><tt>Returns a list of the user's friends.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="User-get_now_playing"><strong>get_now_playing</strong></a>(self)</dt><dd><tt>Returns the currently playing track, or None if nothing is playing.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="User-get_past_events_page"><strong>get_past_events_page</strong></a>(self)</dt><dd><tt>Retruns a paginated list of all events a user has attended in the past.<br>
|
|
<br>
|
|
Example:<br>
|
|
--------<br>
|
|
<br>
|
|
while not user.<a href="#User-is_end_of_past_events">is_end_of_past_events</a>():<br>
|
|
print user.<a href="#User-get_past_events_page">get_past_events_page</a>()</tt></dd></dl>
|
|
|
|
<dl><dt><a name="User-get_playlists"><strong>get_playlists</strong></a>(self)</dt><dd><tt>Returns a list of Playlists that this user owns.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="User-get_recent_tracks"><strong>get_recent_tracks</strong></a>(self, limit<font color="#909090">=None</font>)</dt><dd><tt>Returns this user's recent listened-to tracks as<br>
|
|
a sequence of <a href="#PlayedTrack">PlayedTrack</a> objects.<br>
|
|
Use <a href="#-extract_items">extract_items</a>() with the return of this function to<br>
|
|
get only a sequence of <a href="#Track">Track</a> objects with no playback dates.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="User-get_top_albums"><strong>get_top_albums</strong></a>(self, period<font color="#909090">='overall'</font>)</dt><dd><tt>Returns the top albums played by a user. <br>
|
|
* period: The period of time. Possible values:<br>
|
|
o PERIOD_OVERALL<br>
|
|
o PERIOD_3MONTHS<br>
|
|
o PERIOD_6MONTHS<br>
|
|
o PERIOD_12MONTHS</tt></dd></dl>
|
|
|
|
<dl><dt><a name="User-get_top_artists"><strong>get_top_artists</strong></a>(self, period<font color="#909090">='overall'</font>)</dt><dd><tt>Returns the top artists played by a user. <br>
|
|
* period: The period of time. Possible values:<br>
|
|
o PERIOD_OVERALL<br>
|
|
o PERIOD_3MONTHS<br>
|
|
o PERIOD_6MONTHS<br>
|
|
o PERIOD_12MONTHS</tt></dd></dl>
|
|
|
|
<dl><dt><a name="User-get_top_tags"><strong>get_top_tags</strong></a>(self, limit<font color="#909090">=None</font>)</dt><dd><tt>Returns a sequence of the top tags used by this user with their counts as (<a href="#Tag">Tag</a>, tagcount). <br>
|
|
* limit: The limit of how many tags to return.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="User-get_top_tracks"><strong>get_top_tracks</strong></a>(self, period<font color="#909090">='overall'</font>)</dt><dd><tt>Returns the top tracks played by a user. <br>
|
|
* period: The period of time. Possible values:<br>
|
|
o PERIOD_OVERALL<br>
|
|
o PERIOD_3MONTHS<br>
|
|
o PERIOD_6MONTHS<br>
|
|
o PERIOD_12MONTHS</tt></dd></dl>
|
|
|
|
<dl><dt><a name="User-get_upcoming_events"><strong>get_upcoming_events</strong></a>(self)</dt><dd><tt>Returns all the upcoming events for this user.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="User-get_url"><strong>get_url</strong></a>(self, domain_name<font color="#909090">='www.last.fm'</font>)</dt><dd><tt>Returns the url of the user page on Last.fm. <br>
|
|
* domain_name: Last.fm's language domain. Possible values:<br>
|
|
o DOMAIN_ENGLISH<br>
|
|
o DOMAIN_GERMAN<br>
|
|
o DOMAIN_SPANISH<br>
|
|
o DOMAIN_FRENCH<br>
|
|
o DOMAIN_ITALIAN<br>
|
|
o DOMAIN_POLISH<br>
|
|
o DOMAIN_PORTUGUESE<br>
|
|
o DOMAIN_SWEDISH<br>
|
|
o DOMAIN_TURKISH<br>
|
|
o DOMAIN_RUSSIAN<br>
|
|
o DOMAIN_JAPANESE<br>
|
|
o DOMAIN_CHINESE</tt></dd></dl>
|
|
|
|
<dl><dt><a name="User-get_weekly_album_charts"><strong>get_weekly_album_charts</strong></a>(self, from_date<font color="#909090">=None</font>, to_date<font color="#909090">=None</font>)</dt><dd><tt>Returns the weekly album charts for the week starting from the from_date value to the to_date value.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="User-get_weekly_artist_charts"><strong>get_weekly_artist_charts</strong></a>(self, from_date<font color="#909090">=None</font>, to_date<font color="#909090">=None</font>)</dt><dd><tt>Returns the weekly artist charts for the week starting from the from_date value to the to_date value.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="User-get_weekly_chart_dates"><strong>get_weekly_chart_dates</strong></a>(self)</dt><dd><tt>Returns a list of From and To tuples for the available charts.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="User-get_weekly_track_charts"><strong>get_weekly_track_charts</strong></a>(self, from_date<font color="#909090">=None</font>, to_date<font color="#909090">=None</font>)</dt><dd><tt>Returns the weekly track charts for the week starting from the from_date value to the to_date value.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="User-is_end_of_past_events"><strong>is_end_of_past_events</strong></a>(self)</dt><dd><tt>Returns True if the end of Past Events was reached.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#_BaseObject">_BaseObject</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="Venue">class <strong>Venue</strong></a>(<a href="pylast.html#_BaseObject">_BaseObject</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A venue where events are held.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#Venue">Venue</a></dd>
|
|
<dd><a href="pylast.html#_BaseObject">_BaseObject</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="Venue-__eq__"><strong>__eq__</strong></a>(self, other)</dt></dl>
|
|
|
|
<dl><dt><a name="Venue-__init__"><strong>__init__</strong></a>(self, id, api_key, api_secret, session_key)</dt></dl>
|
|
|
|
<dl><dt><a name="Venue-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Venue-get_id"><strong>get_id</strong></a>(self)</dt><dd><tt>Returns the id of the venue.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Venue-get_past_events"><strong>get_past_events</strong></a>(self)</dt><dd><tt>Returns the past events held in this venue.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Venue-get_upcoming_events"><strong>get_upcoming_events</strong></a>(self)</dt><dd><tt>Returns the upcoming events in this venue.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#_BaseObject">_BaseObject</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="VenueSearch">class <strong>VenueSearch</strong></a>(<a href="pylast.html#_Search">_Search</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>Search for a venue by its name. If you don't wanna narrow the results down<br>
|
|
by specifying a country, set it to empty string.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#VenueSearch">VenueSearch</a></dd>
|
|
<dd><a href="pylast.html#_Search">_Search</a></dd>
|
|
<dd><a href="pylast.html#_BaseObject">_BaseObject</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="VenueSearch-__init__"><strong>__init__</strong></a>(self, venue_name, country_name, api_key, api_secret, session_key)</dt></dl>
|
|
|
|
<dl><dt><a name="VenueSearch-get_next_page"><strong>get_next_page</strong></a>(self)</dt><dd><tt>Returns the next page of results as a sequence of <a href="#Track">Track</a> objects.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="pylast.html#_Search">_Search</a>:<br>
|
|
<dl><dt><a name="VenueSearch-get_total_result_count"><strong>get_total_result_count</strong></a>(self)</dt><dd><tt>Returns the total count of all the results.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#_BaseObject">_BaseObject</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="XSPF">class <strong>XSPF</strong></a>(<a href="pylast.html#_BaseObject">_BaseObject</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A Last.fm <a href="#XSPF">XSPF</a> playlist.<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="pylast.html#XSPF">XSPF</a></dd>
|
|
<dd><a href="pylast.html#_BaseObject">_BaseObject</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="XSPF-__eq__"><strong>__eq__</strong></a>(self, other)</dt></dl>
|
|
|
|
<dl><dt><a name="XSPF-__init__"><strong>__init__</strong></a>(self, uri, api_key, api_secret, session_key)</dt></dl>
|
|
|
|
<dl><dt><a name="XSPF-__ne__"><strong>__ne__</strong></a>(self, other)</dt></dl>
|
|
|
|
<dl><dt><a name="XSPF-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="XSPF-get_tracks"><strong>get_tracks</strong></a>(self)</dt><dd><tt>Returns the tracks on this playlist.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="XSPF-get_uri"><strong>get_uri</strong></a>(self)</dt><dd><tt>Returns the Last.fm playlist URI.</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data descriptors inherited from <a href="pylast.html#_BaseObject">_BaseObject</a>:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
</td></tr></table></td></tr></table><p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#eeaa77">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl><dt><a name="-async_call"><strong>async_call</strong></a>(sender, call, callback<font color="#909090">=None</font>, call_args<font color="#909090">=None</font>, callback_args<font color="#909090">=None</font>)</dt><dd><tt>This is the function for setting up an asynchronous operation.<br>
|
|
* call: The function to call asynchronously.<br>
|
|
* callback: The function to call after the operation is complete, Its prototype has to be like:<br>
|
|
callback(sender, output[, param1, param3, ... ])<br>
|
|
* call_args: A sequence of args to be passed to call.<br>
|
|
* callback_args: A sequence of args to be passed to callback.</tt></dd></dl>
|
|
<dl><dt><a name="-create_new_playlist"><strong>create_new_playlist</strong></a>(title, description, api_key, api_secret, session_key)</dt><dd><tt>Creates a playlist for the authenticated user and returns it.<br>
|
|
* title: The title of the new playlist.<br>
|
|
* description: The description of the new playlist.</tt></dd></dl>
|
|
<dl><dt><a name="-disable_caching"><strong>disable_caching</strong></a>()</dt><dd><tt>Disables all caching features.</tt></dd></dl>
|
|
<dl><dt><a name="-disable_proxy"><strong>disable_proxy</strong></a>()</dt><dd><tt>Disable using the web proxy.</tt></dd></dl>
|
|
<dl><dt><a name="-enable_caching"><strong>enable_caching</strong></a>(file_path<font color="#909090">=None</font>)</dt><dd><tt>Enables caching request-wide for all cachable calls.<br>
|
|
In choosing the backend used for caching, it will try _SqliteCacheBackend first if<br>
|
|
the module sqlite3 is present. If not, it will fallback to _ShelfCacheBackend which uses shelve.Shelf objects.<br>
|
|
<br>
|
|
* file_path: A file path for the backend storage file. If <br>
|
|
None set, a temp file would probably be created, according the backend.</tt></dd></dl>
|
|
<dl><dt><a name="-enable_proxy"><strong>enable_proxy</strong></a>(host, port)</dt><dd><tt>Enable a default web proxy.</tt></dd></dl>
|
|
<dl><dt><a name="-extract_items"><strong>extract_items</strong></a>(topitems_or_libraryitems)</dt><dd><tt>Extracts a sequence of items from a sequence of <a href="#TopItem">TopItem</a> or <a href="#LibraryItem">LibraryItem</a> objects.</tt></dd></dl>
|
|
<dl><dt><a name="-get_album_by_mbid"><strong>get_album_by_mbid</strong></a>(mbid, api_key, api_secret, session_key)</dt><dd><tt>Looks up an album by its MusicBrainz ID.</tt></dd></dl>
|
|
<dl><dt><a name="-get_artist_by_mbid"><strong>get_artist_by_mbid</strong></a>(mbid, api_key, api_secret, session_key)</dt><dd><tt>Loooks up an artist by its MusicBrainz ID.</tt></dd></dl>
|
|
<dl><dt><a name="-get_authenticated_user"><strong>get_authenticated_user</strong></a>(api_key, api_secret, session_key)</dt><dd><tt>Returns the authenticated user.</tt></dd></dl>
|
|
<dl><dt><a name="-get_top_tags"><strong>get_top_tags</strong></a>(api_key, api_secret, session_key)</dt><dd><tt>Returns a sequence of the most used Last.fm tags as a sequence of <a href="#TopItem">TopItem</a> objects.</tt></dd></dl>
|
|
<dl><dt><a name="-get_track_by_mbid"><strong>get_track_by_mbid</strong></a>(mbid, api_key, api_secret, session_key)</dt><dd><tt>Looks up a track by its MusicBrainz ID.</tt></dd></dl>
|
|
<dl><dt><a name="-is_caching_enabled"><strong>is_caching_enabled</strong></a>()</dt><dd><tt>Returns True if caching is enabled.</tt></dd></dl>
|
|
<dl><dt><a name="-is_proxy_enabled"><strong>is_proxy_enabled</strong></a>()</dt><dd><tt>Returns True if a web proxy is enabled.</tt></dd></dl>
|
|
<dl><dt><a name="-md5"><strong>md5</strong></a>(text)</dt><dd><tt>Returns the md5 hash of a string.</tt></dd></dl>
|
|
<dl><dt><a name="-search_for_album"><strong>search_for_album</strong></a>(album_name, api_key, api_secret, session_key)</dt><dd><tt>Searches for an album by its name. Returns a <a href="#AlbumSearch">AlbumSearch</a> <a href="__builtin__.html#object">object</a>.<br>
|
|
Use get_next_page() to retreive sequences of results.</tt></dd></dl>
|
|
<dl><dt><a name="-search_for_artist"><strong>search_for_artist</strong></a>(artist_name, api_key, api_secret, session_key)</dt><dd><tt>Searches of an artist by its name. Returns a <a href="#ArtistSearch">ArtistSearch</a> <a href="__builtin__.html#object">object</a>.<br>
|
|
Use get_next_page() to retreive sequences of results.</tt></dd></dl>
|
|
<dl><dt><a name="-search_for_tag"><strong>search_for_tag</strong></a>(tag_name, api_key, api_secret, session_key)</dt><dd><tt>Searches of a tag by its name. Returns a <a href="#TagSearch">TagSearch</a> <a href="__builtin__.html#object">object</a>.<br>
|
|
Use get_next_page() to retreive sequences of results.</tt></dd></dl>
|
|
<dl><dt><a name="-search_for_track"><strong>search_for_track</strong></a>(artist_name, track_name, api_key, api_secret, session_key)</dt><dd><tt>Searches of a track by its name and its artist. Set artist to an empty string if not available.<br>
|
|
Returns a <a href="#TrackSearch">TrackSearch</a> <a href="__builtin__.html#object">object</a>.<br>
|
|
Use get_next_page() to retreive sequences of results.</tt></dd></dl>
|
|
<dl><dt><a name="-search_for_venue"><strong>search_for_venue</strong></a>(venue_name, country_name, api_key, api_secret, session_key)</dt><dd><tt>Searches of a venue by its name and its country. Set country_name to an empty string if not available.<br>
|
|
Returns a <a href="#VenueSearch">VenueSearch</a> <a href="__builtin__.html#object">object</a>.<br>
|
|
Use get_next_page() to retreive sequences of results.</tt></dd></dl>
|
|
</td></tr></table><p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#55aa55">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
|
<td width="100%"><strong>DOMAIN_CHINESE</strong> = 'cn.last.fm'<br>
|
|
<strong>DOMAIN_ENGLISH</strong> = 'www.last.fm'<br>
|
|
<strong>DOMAIN_FRENCH</strong> = 'www.lastfm.fr'<br>
|
|
<strong>DOMAIN_GERMAN</strong> = 'www.lastfm.de'<br>
|
|
<strong>DOMAIN_ITALIAN</strong> = 'www.lastfm.it'<br>
|
|
<strong>DOMAIN_JAPANESE</strong> = 'www.lastfm.jp'<br>
|
|
<strong>DOMAIN_POLISH</strong> = 'www.lastfm.pl'<br>
|
|
<strong>DOMAIN_PORTUGUESE</strong> = 'www.lastfm.com.br'<br>
|
|
<strong>DOMAIN_RUSSIAN</strong> = 'www.lastfm.ru'<br>
|
|
<strong>DOMAIN_SPANISH</strong> = 'www.lastfm.es'<br>
|
|
<strong>DOMAIN_SWEDISH</strong> = 'www.lastfm.se'<br>
|
|
<strong>DOMAIN_TURKISH</strong> = 'www.lastfm.com.tr'<br>
|
|
<strong>EVENT_ATTENDING</strong> = '0'<br>
|
|
<strong>EVENT_MAYBE_ATTENDING</strong> = '1'<br>
|
|
<strong>EVENT_NOT_ATTENDING</strong> = '2'<br>
|
|
<strong>IMAGE_EXTRA_LARGE</strong> = 3<br>
|
|
<strong>IMAGE_LARGE</strong> = 2<br>
|
|
<strong>IMAGE_MEDIUM</strong> = 1<br>
|
|
<strong>IMAGE_SMALL</strong> = 0<br>
|
|
<strong>PERIOD_12MONTHS</strong> = '12month'<br>
|
|
<strong>PERIOD_3MONTHS</strong> = '3month'<br>
|
|
<strong>PERIOD_6MONTHS</strong> = '6month'<br>
|
|
<strong>PERIOD_OVERALL</strong> = 'overall'<br>
|
|
<strong>SCROBBLE_MODE_BANNED</strong> = 'B'<br>
|
|
<strong>SCROBBLE_MODE_PLAYED</strong> = 'L'<br>
|
|
<strong>SCROBBLE_MODE_SKIPPED</strong> = 'S'<br>
|
|
<strong>SCROBBLE_SOURCE_LASTFM</strong> = 'L'<br>
|
|
<strong>SCROBBLE_SOURCE_NON_PERSONALIZED_BROADCAST</strong> = 'R'<br>
|
|
<strong>SCROBBLE_SOURCE_PERSONALIZED_BROADCAST</strong> = 'E'<br>
|
|
<strong>SCROBBLE_SOURCE_UNKNOWN</strong> = 'U'<br>
|
|
<strong>SCROBBLE_SOURCE_USER</strong> = 'P'<br>
|
|
<strong>STATUS_AUTH_FAILED</strong> = 4<br>
|
|
<strong>STATUS_INVALID_API_KEY</strong> = 10<br>
|
|
<strong>STATUS_INVALID_FORMAT</strong> = 5<br>
|
|
<strong>STATUS_INVALID_METHOD</strong> = 3<br>
|
|
<strong>STATUS_INVALID_PARAMS</strong> = 6<br>
|
|
<strong>STATUS_INVALID_RESOURCE</strong> = 7<br>
|
|
<strong>STATUS_INVALID_SERVICE</strong> = 2<br>
|
|
<strong>STATUS_INVALID_SIGNATURE</strong> = 13<br>
|
|
<strong>STATUS_INVALID_SK</strong> = 9<br>
|
|
<strong>STATUS_OFFLINE</strong> = 11<br>
|
|
<strong>STATUS_SUBSCRIBERS_ONLY</strong> = 12<br>
|
|
<strong>STATUS_TOKEN_ERROR</strong> = 8<br>
|
|
<strong>STATUS_TOKEN_EXPIRED</strong> = 15<br>
|
|
<strong>STATUS_TOKEN_UNAUTHORIZED</strong> = 14<br>
|
|
<strong>SUBMISSION_SERVER</strong> = 'http://post.audioscrobbler.com:80/'<br>
|
|
<strong>USER_FEMALE</strong> = 'Female'<br>
|
|
<strong>USER_MALE</strong> = 'Male'<br>
|
|
<strong>WS_SERVER</strong> = ('ws.audioscrobbler.com', '/2.0/')<br>
|
|
<strong>__author__</strong> = 'Amr Hassan'<br>
|
|
<strong>__copyright__</strong> = 'Copyright (C) 2008-2009 Amr Hassan'<br>
|
|
<strong>__email__</strong> = 'amr.hassan@gmail.com'<br>
|
|
<strong>__license__</strong> = 'gpl'<br>
|
|
<strong>__revision__</strong> = '$Revision: 194 $'<br>
|
|
<strong>__version__</strong> = '0.3.194'<br>
|
|
<strong>r</strong> = '$Revision: 194 $'</td></tr></table><p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#7799ee">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#7799ee"><tt> </tt></td><td> </td>
|
|
<td width="100%">Amr Hassan</td></tr></table>
|
|
</body></html> |