| |
-
-- __builtin__.object
-
-
-
-- LibraryItem
-
- SessionKeyGenerator
-
- TopItem
-
-
-- exceptions.Exception(exceptions.BaseException)
-
-
-
-- ServiceException
-
-
-- _BaseObject(__builtin__.object)
-
-
-
-- Album(_BaseObject, _Taggable)
-
- Artist(_BaseObject, _Taggable)
-
- Country
-
- Event
-
- Group
-
- Library
-
- Playlist
-
- Tag
-
- Track(_BaseObject, _Taggable)
-
- User
-
-
-
-- AuthenticatedUser
-
-
-- Venue
-
- XSPF
-
-
-- _Search(_BaseObject)
-
-
-
-- AlbumSearch
-
- ArtistSearch
-
- TagSearch
-
- TrackSearch
-
- VenueSearch
-
-
-- _Taggable(__builtin__.object)
-
-
-
-- Album(_BaseObject, _Taggable)
-
- Artist(_BaseObject, _Taggable)
-
- Track(_BaseObject, _Taggable)
-
-
-
-
-
-
-
-class Album(_BaseObject, _Taggable) |
-
- |
-A Last.fm album. |
- |
-- Method resolution order:
-- Album
-- _BaseObject
-- _Taggable
-- __builtin__.object
-
-
-Methods defined here:
-- __eq__(self, other)
-
-- __init__(self, artist, title, api_key, api_secret, session_key)
- Create an album instance.
-# Parameters:
- * artist str|Artist: An artist name or an Artist object.
- * title str: The album title.
-
-- __ne__(self, other)
-
-- __repr__(self)
-
-- get_artist(self)
- Returns the associated Artist object.
-
-- get_id(self)
- Returns the Last.fm ID.
-
-- get_image_url(self, size=3)
- Returns the associated image URL.
-# Parameters:
-* size int: The image size. Possible values:
- o IMAGE_EXTRA_LARGE
- o IMAGE_LARGE
- o IMAGE_MEDIUM
- o IMAGE_SMALL
-
-- get_listener_count(self)
- Returns the number of liteners on Last.fm.
-
-- get_mbid(self)
- Returns the MusicBrainz id of the album.
-
-- get_name(self)
- Returns the album title (alias to Album.get_title).
-
-- get_playcount(self)
- Returns the number of plays on Last.fm.
-
-- get_release_date(self)
- Retruns the release date of the album.
-
-- get_title(self)
- Returns the album title.
-
-- get_top_tags(self, limit=None)
- Returns a list of the most-applied tags to this album.
-
-- get_tracks(self)
- Returns the list of Tracks on this album.
-
-- get_url(self, domain_name='www.last.fm')
- Returns the url of the album page on Last.fm.
-# Parameters:
-* domain_name str: Last.fm's language domain. Possible values:
- o DOMAIN_ENGLISH
- o DOMAIN_GERMAN
- o DOMAIN_SPANISH
- o DOMAIN_FRENCH
- o DOMAIN_ITALIAN
- o DOMAIN_POLISH
- o DOMAIN_PORTUGUESE
- o DOMAIN_SWEDISH
- o DOMAIN_TURKISH
- o DOMAIN_RUSSIAN
- o DOMAIN_JAPANESE
- o DOMAIN_CHINESE
-
-
-Data descriptors inherited from _BaseObject:
-- __dict__
-- dictionary for instance variables (if defined)
-
-- __weakref__
-- list of weak references to the object (if defined)
-
-
-Methods inherited from _Taggable:
-- add_tags(self, *tags)
- Adds one or several tags.
-* *tags: Any number of tag names or Tag objects.
-
-- clear_tags(self)
- Clears all the user-set tags.
-
-- get_tags(self)
- Returns a list of the tags set by the user to this object.
-
-- remove_tags(self, *tags)
- Removes one or several tags from this object.
-* *tags: Any number of tag names or Tag objects.
-
-- set_tags(self, *tags)
- Sets this object's tags to only those tags.
-* *tags: any number of tag names.
-
- |
-
-
-
-
-class Artist(_BaseObject, _Taggable) |
-
- |
-A Last.fm artist. |
- |
-- Method resolution order:
-- Artist
-- _BaseObject
-- _Taggable
-- __builtin__.object
-
-
-Methods defined here:
-- __eq__(self, other)
-
-- __init__(self, name, api_key, api_secret, session_key)
- Create an artist object.
-# Parameters:
- * name str: The artist's name.
-
-- __ne__(self, other)
-
-- __repr__(self)
-
-- get_bio_content(self)
- Returns the content of the artist's biography.
-
-- get_bio_published_date(self)
- Returns the date on which the artist's biography was published.
-
-- get_bio_summary(self)
- Returns the summary of the artist's biography.
-
-- get_image_url(self, size=2)
- Returns the associated image URL.
-# Parameters:
- * size int: The image size. Possible values:
- o IMAGE_LARGE
- o IMAGE_MEDIUM
- o IMAGE_SMALL
-
-- get_listener_count(self)
- Returns the number of liteners on Last.fm.
-
-- get_name(self)
- Returns the name of the artist.
-
-- get_playcount(self)
- Returns the number of plays on Last.fm.
-
-- get_similar(self, limit=None)
- Returns the similar artists on Last.fm.
-
-- get_top_albums(self)
- Retuns a list of the top albums.
-
-- get_top_fans(self, limit=None)
- Returns a list of the Users who played this artist the most.
-# Parameters:
- * limit int: Max elements.
-
-- get_top_tracks(self)
- Returns a list of the most played Tracks by this artist.
-
-- get_upcoming_events(self)
- Returns a list of the upcoming Events for this artist.
-
-- get_url(self, domain_name='www.last.fm')
- Returns the url of the artist page on Last.fm.
-# Parameters:
-* domain_name: Last.fm's language domain. Possible values:
- o DOMAIN_ENGLISH
- o DOMAIN_GERMAN
- o DOMAIN_SPANISH
- o DOMAIN_FRENCH
- o DOMAIN_ITALIAN
- o DOMAIN_POLISH
- o DOMAIN_PORTUGUESE
- o DOMAIN_SWEDISH
- o DOMAIN_TURKISH
- o DOMAIN_RUSSIAN
- o DOMAIN_JAPANESE
- o DOMAIN_CHINESE
-
-- is_streamable(self)
- Returns True if the artist is streamable.
-
-- share(self, users, message=None)
- Shares this artist (sends out recommendations).
-# Parameters:
- * users [User|str,]: A list that can contain usernames, emails, User objects, or all of them.
- * message str: A message to include in the recommendation message.
-
-
-Data descriptors inherited from _BaseObject:
-- __dict__
-- dictionary for instance variables (if defined)
-
-- __weakref__
-- list of weak references to the object (if defined)
-
-
-Methods inherited from _Taggable:
-- add_tags(self, *tags)
- Adds one or several tags.
-* *tags: Any number of tag names or Tag objects.
-
-- clear_tags(self)
- Clears all the user-set tags.
-
-- get_tags(self)
- Returns a list of the tags set by the user to this object.
-
-- get_top_tags(self, limit=None)
- Returns a list of the most frequently used Tags on this object.
-
-- remove_tags(self, *tags)
- Removes one or several tags from this object.
-* *tags: Any number of tag names or Tag objects.
-
-- set_tags(self, *tags)
- Sets this object's tags to only those tags.
-* *tags: any number of tag names.
-
- |
-
-
-
-
-class AuthenticatedUser(User) |
-
- | |
-- Method resolution order:
-- AuthenticatedUser
-- User
-- _BaseObject
-- __builtin__.object
-
-
-Methods defined here:
-- __init__(self, api_key, api_secret, session_key)
-
-- get_age(self)
- Returns the user's age.
-
-- get_country(self)
- Returns the name of the country of the user.
-
-- get_gender(self)
- Returns the user's gender. Either USER_MALE or USER_FEMALE.
-
-- get_id(self)
- Returns the user id.
-
-- get_image_url(self)
- Returns the user's avatar.
-
-- get_language(self)
- Returns the language code of the language used by the user.
-
-- get_name(self)
- Returns the name of the authenticated user.
-
-- get_playcount(self)
- Returns the user's playcount so far.
-
-- get_recommended_artists_page(self)
- Retruns a paginated list of all artists a user has attended in the past.
-
-Example:
---------
-
-while not user.is_end_of_recommended_artists():
- print user.get_recommended_artists_page()
-
-- get_recommended_events_page(self)
- Retruns a paginated list of all events a user has attended in the past.
-
-Example:
---------
-
-while not user.is_end_of_recommended_events():
- print user.get_recommended_events_page()
-
-- is_end_of_recommended_artists(self)
- Returns True if the end of Past Artists was reached.
-
-- is_end_of_recommended_events(self)
- Returns True if the end of Past Events was reached.
-
-- is_subscriber(self)
- Returns whether the user is a subscriber or not. True or False.
-
-
-Methods inherited from User:
-- __eq__(self, another)
-
-- __ne__(self, another)
-
-- __repr__(self)
-
-- compare_with_user(self, user, shared_artists_limit=None)
- Compare this user with another Last.fm user.
-Returns a sequence (tasteometer_score, (shared_artist1, shared_artist2, ...))
-user: A User object or a username string/unicode object.
-
-- getRecommendedEvents(self, page=None, limit=None)
- Returns a paginated list of all events recommended to a user by Last.fm, based on their listening profile.
-* page: The page number of results to return.
-* limit: The limit of events to return.
-
-- get_friends(self, limit=None)
- Returns a list of the user's friends.
-
-- get_library(self)
- Returns the associated Library object.
-
-- get_loved_tracks(self)
- Returns the last 50 tracks loved by this user.
-
-- get_neighbours(self, limit=None)
- Returns a list of the user's friends.
-
-- get_now_playing(self)
- Returns the currently playing track, or None if nothing is playing.
-
-- get_past_events_page(self)
- Retruns a paginated list of all events a user has attended in the past.
-
-Example:
---------
-
-while not user.is_end_of_past_events():
- print user.get_past_events_page()
-
-- get_playlists(self)
- Returns a list of Playlists that this user owns.
-
-- get_recent_tracks(self, limit=None)
- Returns this user's recent listened-to tracks.
-
-- get_top_albums(self, period='overall')
- Returns the top albums played by a user.
-* period: The period of time. Possible values:
- o PERIOD_OVERALL
- o PERIOD_3MONTHS
- o PERIOD_6MONTHS
- o PERIOD_12MONTHS
-
-- get_top_artists(self, period='overall')
- Returns the top artists played by a user.
-* period: The period of time. Possible values:
- o PERIOD_OVERALL
- o PERIOD_3MONTHS
- o PERIOD_6MONTHS
- o PERIOD_12MONTHS
-
-- get_top_tags(self, limit=None)
- Returns a sequence of the top tags used by this user with their counts as (Tag, tagcount).
-* limit: The limit of how many tags to return.
-
-- get_top_tracks(self, period='overall')
- Returns the top tracks played by a user.
-* period: The period of time. Possible values:
- o PERIOD_OVERALL
- o PERIOD_3MONTHS
- o PERIOD_6MONTHS
- o PERIOD_12MONTHS
-
-- get_upcoming_events(self)
- Returns all the upcoming events for this user.
-
-- get_url(self, domain_name='www.last.fm')
- Returns the url of the user page on Last.fm.
-* domain_name: Last.fm's language domain. Possible values:
- o DOMAIN_ENGLISH
- o DOMAIN_GERMAN
- o DOMAIN_SPANISH
- o DOMAIN_FRENCH
- o DOMAIN_ITALIAN
- o DOMAIN_POLISH
- o DOMAIN_PORTUGUESE
- o DOMAIN_SWEDISH
- o DOMAIN_TURKISH
- o DOMAIN_RUSSIAN
- o DOMAIN_JAPANESE
- o DOMAIN_CHINESE
-
-- get_weekly_album_charts(self, from_date=None, to_date=None)
- Returns the weekly album charts for the week starting from the from_date value to the to_date value.
-
-- get_weekly_artist_charts(self, from_date=None, to_date=None)
- Returns the weekly artist charts for the week starting from the from_date value to the to_date value.
-
-- get_weekly_chart_dates(self)
- Returns a list of From and To tuples for the available charts.
-
-- get_weekly_track_charts(self, from_date=None, to_date=None)
- Returns the weekly track charts for the week starting from the from_date value to the to_date value.
-
-- is_end_of_past_events(self)
- Returns True if the end of Past Events was reached.
-
-
-Data descriptors inherited from _BaseObject:
-- __dict__
-- dictionary for instance variables (if defined)
-
-- __weakref__
-- list of weak references to the object (if defined)
-
- |
-
-
-
-class Country(_BaseObject) |
-
- |
-A country at Last.fm. |
- |
-- Method resolution order:
-- Country
-- _BaseObject
-- __builtin__.object
-
-
-Methods defined here:
-- __eq__(self, other)
-
-- __init__(self, name, api_key, api_secret, session_key)
-
-- __ne__(self, other)
-
-- __repr__(self)
-
-- get_name(self)
- Returns the country name.
-
-- get_top_artists(self)
- Returns a sequence of the most played artists.
-
-- get_top_tracks(self)
- Returns a sequence of the most played tracks
-
-- get_url(self, domain_name='www.last.fm')
- Returns the url of the event page on Last.fm.
-* domain_name: Last.fm's language domain. Possible values:
- o DOMAIN_ENGLISH
- o DOMAIN_GERMAN
- o DOMAIN_SPANISH
- o DOMAIN_FRENCH
- o DOMAIN_ITALIAN
- o DOMAIN_POLISH
- o DOMAIN_PORTUGUESE
- o DOMAIN_SWEDISH
- o DOMAIN_TURKISH
- o DOMAIN_RUSSIAN
- o DOMAIN_JAPANESE
- o DOMAIN_CHINESE
-
-
-Data descriptors inherited from _BaseObject:
-- __dict__
-- dictionary for instance variables (if defined)
-
-- __weakref__
-- list of weak references to the object (if defined)
-
- |
-
-
-
-class Event(_BaseObject) |
-
- |
-A Last.fm event. |
- |
-- Method resolution order:
-- Event
-- _BaseObject
-- __builtin__.object
-
-
-Methods defined here:
-- __eq__(self, other)
-
-- __init__(self, event_id, api_key, api_secret, session_key)
-
-- __ne__(self, other)
-
-- __repr__(self)
-
-- attend(self, attending_status)
- Sets the attending status.
-* attending_status: The attending status. Possible values:
- o EVENT_ATTENDING
- o EVENT_MAYBE_ATTENDING
- o EVENT_NOT_ATTENDING
-
-- get_artists(self)
- Returns a list of the participating Artists.
-
-- get_attendance_count(self)
- Returns the number of attending people.
-
-- get_description(self)
- Returns the description of the event.
-
-- get_headliner(self)
- Returns the headliner of the event.
-
-- get_id(self)
- Returns the id of the event on Last.fm.
-
-- get_image_url(self, size=2)
- Returns the associated image URL.
-* size: The image size. Possible values:
- o IMAGE_LARGE
- o IMAGE_MEDIUM
- o IMAGE_SMALL
-
-- get_review_count(self)
- Returns the number of available reviews for this event.
-
-- get_start_date(self)
- Returns the date when the event starts.
-
-- get_title(self)
- Returns the title of the event.
-
-- get_url(self, domain_name='www.last.fm')
- Returns the url of the event page on Last.fm.
-* domain_name: Last.fm's language domain. Possible values:
- o DOMAIN_ENGLISH
- o DOMAIN_GERMAN
- o DOMAIN_SPANISH
- o DOMAIN_FRENCH
- o DOMAIN_ITALIAN
- o DOMAIN_POLISH
- o DOMAIN_PORTUGUESE
- o DOMAIN_SWEDISH
- o DOMAIN_TURKISH
- o DOMAIN_RUSSIAN
- o DOMAIN_JAPANESE
- o DOMAIN_CHINESE
-
-- get_venue(self)
- Returns the venue where the event is held.
-
-- share(self, users, message=None)
- Shares this event (sends out recommendations).
-* users: A list that can contain usernames, emails, User objects, or all of them.
-* message: A message to include in the recommendation message.
-
-
-Data descriptors inherited from _BaseObject:
-- __dict__
-- dictionary for instance variables (if defined)
-
-- __weakref__
-- list of weak references to the object (if defined)
-
- |
-
-
-
-class Group(_BaseObject) |
-
- |
-A Last.fm group. |
- |
-- Method resolution order:
-- Group
-- _BaseObject
-- __builtin__.object
-
-
-Methods defined here:
-- __eq__(self, other)
-
-- __init__(self, group_name, api_key, api_secret, session_key)
-
-- __ne__(self, other)
-
-- __repr__(self)
-
-- get_name(self)
- Returns the group name.
-
-- get_url(self, domain_name='www.last.fm')
- Returns the url of the group page on Last.fm.
-* domain_name: Last.fm's language domain. Possible values:
- o DOMAIN_ENGLISH
- o DOMAIN_GERMAN
- o DOMAIN_SPANISH
- o DOMAIN_FRENCH
- o DOMAIN_ITALIAN
- o DOMAIN_POLISH
- o DOMAIN_PORTUGUESE
- o DOMAIN_SWEDISH
- o DOMAIN_TURKISH
- o DOMAIN_RUSSIAN
- o DOMAIN_JAPANESE
- o DOMAIN_CHINESE
-
-- get_weekly_album_charts(self, from_date=None, to_date=None)
- Returns the weekly album charts for the week starting from the from_date value to the to_date value.
-
-- get_weekly_artist_charts(self, from_date=None, to_date=None)
- Returns the weekly artist charts for the week starting from the from_date value to the to_date value.
-
-- get_weekly_chart_dates(self)
- Returns a list of From and To tuples for the available charts.
-
-- get_weekly_track_charts(self, from_date=None, to_date=None)
- Returns the weekly track charts for the week starting from the from_date value to the to_date value.
-
-
-Data descriptors inherited from _BaseObject:
-- __dict__
-- dictionary for instance variables (if defined)
-
-- __weakref__
-- list of weak references to the object (if defined)
-
- |
-
-
-
-class Library(_BaseObject) |
-
- |
-A user's Last.fm library. |
- |
-- Method resolution order:
-- Library
-- _BaseObject
-- __builtin__.object
-
-
-Methods defined here:
-- __init__(self, user, api_key, api_secret, session_key)
-
-- __repr__(self)
-
-- add_album(self, album)
- Add an album to this library.
-
-- add_artist(self, artist)
- Add an artist to this library.
-
-- add_track(self, track)
- Add a track to this library.
-
-- get_albums_page(self)
- Retreives the next page of albums in the Library. Returns a sequence of TopItem objects.
-Use the function extract_items like extract_items(Library.get_albums_page()) to return only a sequence of
-Album objects with no extra data.
-
-Example:
--------
-library = Library("rj", API_KEY, API_SECRET, SESSION_KEY)
-
-while not library.is_end_of_albums():
- print library.get_albums_page()
-
-- get_artists_page(self)
- Retreives the next page of artists in the Library. Returns a sequence of TopItem objects.
-Use the function extract_items like extract_items(Library.get_artists_page()) to return only a sequence of
-Artist objects with no extra data.
-
-Example:
--------
-library = Library("rj", API_KEY, API_SECRET, SESSION_KEY)
-
-while not library.is_end_of_artists():
- print library.get_artists_page()
-
-- get_tracks_page(self)
- Retreives the next page of tracks in the Library. Returns a sequence of TopItem objects.
-Use the function extract_items like extract_items(Library.get_tracks_page()) to return only a sequence of
-Track objects with no extra data.
-
-Example:
--------
-library = Library("rj", API_KEY, API_SECRET, SESSION_KEY)
-
-while not library.is_end_of_tracks():
- print library.get_tracks_page()
-
-- get_user(self)
- Returns the user who owns this library.
-
-- is_end_of_albums(self)
- Returns True when the last page of albums has ben retrieved.
-
-- is_end_of_artists(self)
- Returns True when the last page of artists has ben retrieved.
-
-- is_end_of_tracks(self)
- Returns True when the last page of tracks has ben retrieved.
-
-
-Data descriptors inherited from _BaseObject:
-- __dict__
-- dictionary for instance variables (if defined)
-
-- __weakref__
-- list of weak references to the object (if defined)
-
- |
-
-
-
-
-class Playlist(_BaseObject) |
-
- |
-A Last.fm user playlist. |
- |
-- Method resolution order:
-- Playlist
-- _BaseObject
-- __builtin__.object
-
-
-Methods defined here:
-- __init__(self, user, id, api_key, api_secret, session_key)
-
-- add_track(self, track)
- Adds a Track to this Playlist.
-
-- get_creation_date(self)
- Returns the creation date of this playlist.
-
-- get_description(self)
- Returns the description of this playlist.
-
-- get_duration(self)
- Returns the duration of this playlist in milliseconds.
-
-- get_id(self)
- Returns the playlist id.
-
-- get_image_url(self, size=2)
- Returns the associated image URL.
-* size: The image size. Possible values:
- o IMAGE_LARGE
- o IMAGE_MEDIUM
- o IMAGE_SMALL
-
-- get_size(self)
- Returns the number of tracks in this playlist.
-
-- get_title(self)
- Returns the title of this playlist.
-
-- get_tracks(self)
- Returns a list of the tracks on this user playlist.
-
-- get_url(self, domain_name='www.last.fm')
- Returns the url of the playlist on Last.fm.
-* domain_name: Last.fm's language domain. Possible values:
- o DOMAIN_ENGLISH
- o DOMAIN_GERMAN
- o DOMAIN_SPANISH
- o DOMAIN_FRENCH
- o DOMAIN_ITALIAN
- o DOMAIN_POLISH
- o DOMAIN_PORTUGUESE
- o DOMAIN_SWEDISH
- o DOMAIN_TURKISH
- o DOMAIN_RUSSIAN
- o DOMAIN_JAPANESE
- o DOMAIN_CHINESE
-
-- get_user(self)
- Returns the owner user of this playlist.
-
-- has_track(self, track)
- Checks to see if track is already in the playlist.
-* track: Any Track object.
-
-- is_streamable(self)
- Returns True if the playlist is streamable.
-For a playlist to be streamable, it needs at least 45 tracks by 15 different artists.
-
-
-Data descriptors inherited from _BaseObject:
-- __dict__
-- dictionary for instance variables (if defined)
-
-- __weakref__
-- list of weak references to the object (if defined)
-
- |
-
-
-
-
-class SessionKeyGenerator(__builtin__.object) |
-
- |
-Methods of generating a session key:
-1) Web Authentication:
- a. sg = SessionKeyGenerator(API_KEY, API_SECRET)
- b. url = sg.get_web_auth_url()
- c. Ask the user to open the url and authorize you, and wait for it.
- d. session_key = sg.get_web_auth_session_key(url)
-2) Username and Password Authentication:
- a. username = raw_input("Please enter your username: ")
- b. md5_password = pylast.md5(raw_input("Please enter your password: ")
- c. session_key = SessionKeyGenerator(API_KEY, API_SECRET).get_session_key(username, md5_password)
-
-A session key's lifetime is infinie, unless the user provokes the rights of the given API Key. |
- |
-Methods defined here:
-- __init__(self, api_key, api_secret)
-
-- get_session_key(self, username, md5_password)
- Retrieve a session key with a username and a md5 hash of the user's password.
-
-- get_web_auth_session_key(self, url)
- Retrieves the session key of a web authorization process by its url.
-
-- get_web_auth_url(self)
- The user must open this page, and you first, then call get_web_auth_session_key(url) after that.
-
-
-Data descriptors defined here:
-- __dict__
-- dictionary for instance variables (if defined)
-
-- __weakref__
-- list of weak references to the object (if defined)
-
- |
-
-
-
-class Tag(_BaseObject) |
-
- |
-A Last.fm object tag. |
- |
-- Method resolution order:
-- Tag
-- _BaseObject
-- __builtin__.object
-
-
-Methods defined here:
-- __eq__(self)
-
-- __init__(self, name, api_key, api_secret, session_key)
-
-- __ne__(self)
-
-- __repr__(self)
-
-- get_name(self)
- Returns the name of the tag.
-
-- get_similar(self)
- Returns the tags similar to this one, ordered by similarity.
-
-- get_top_albums(self)
- Retuns a list of the top albums.
-
-- get_top_artists(self)
- Returns a sequence of the most played artists.
-
-- get_top_tracks(self)
- Returns a list of the most played Tracks by this artist.
-
-- get_url(self, domain_name='www.last.fm')
- Returns the url of the tag page on Last.fm.
-* domain_name: Last.fm's language domain. Possible values:
- o DOMAIN_ENGLISH
- o DOMAIN_GERMAN
- o DOMAIN_SPANISH
- o DOMAIN_FRENCH
- o DOMAIN_ITALIAN
- o DOMAIN_POLISH
- o DOMAIN_PORTUGUESE
- o DOMAIN_SWEDISH
- o DOMAIN_TURKISH
- o DOMAIN_RUSSIAN
- o DOMAIN_JAPANESE
- o DOMAIN_CHINESE
-
-- get_weekly_artist_charts(self, from_date=None, to_date=None)
- Returns the weekly artist charts for the week starting from the from_date value to the to_date value.
-
-- get_weekly_chart_dates(self)
- Returns a list of From and To tuples for the available charts.
-
-
-Data descriptors inherited from _BaseObject:
-- __dict__
-- dictionary for instance variables (if defined)
-
-- __weakref__
-- list of weak references to the object (if defined)
-
- |
-
-
-
-
-class TopItem(__builtin__.object) |
-
- |
-A top item in a list that has a weight. Returned from functions like get_top_tracks() and get_top_artists(). |
- |
-Methods defined here:
-- __init__(self, item, weight)
-
-- __repr__(self)
-
-- get_item(self)
- Returns the item.
-
-- get_weight(self)
- Returns the weight of the itme in the list.
-
-
-Data descriptors defined here:
-- __dict__
-- dictionary for instance variables (if defined)
-
-- __weakref__
-- list of weak references to the object (if defined)
-
- |
-
-
-
-class Track(_BaseObject, _Taggable) |
-
- |
-A Last.fm track. |
- |
-- Method resolution order:
-- Track
-- _BaseObject
-- _Taggable
-- __builtin__.object
-
-
-Methods defined here:
-- __eq__(self, other)
-
-- __init__(self, artist, title, api_key, api_secret, session_key)
-
-- __ne__(self, other)
-
-- __repr__(self)
-
-- ban(self)
- Ban this track from ever playing on the radio.
-
-- get_album(self)
- Returns the album object of this track.
-
-- get_artist(self)
- Returns the associated Artist object.
-
-- get_duration(self)
- Returns the track duration.
-
-- get_id(self)
- Returns the track id on Last.fm.
-
-- get_listener_count(self)
- Returns the listener count.
-
-- get_mbid(self)
- Returns the MusicBrainz ID of this track.
-
-- get_name(self)
- Returns the track title (alias to Track.get_title).
-
-- get_playcount(self)
- Returns the play count.
-
-- get_similar(self)
- Returns similar tracks for this track on Last.fm, based on listening data.
-
-- get_title(self)
- Returns the track title.
-
-- get_top_fans(self, limit=None)
- Returns a list of the Users who played this track.
-
-- get_url(self, domain_name='www.last.fm')
- Returns the url of the track page on Last.fm.
-* domain_name: Last.fm's language domain. Possible values:
- o DOMAIN_ENGLISH
- o DOMAIN_GERMAN
- o DOMAIN_SPANISH
- o DOMAIN_FRENCH
- o DOMAIN_ITALIAN
- o DOMAIN_POLISH
- o DOMAIN_PORTUGUESE
- o DOMAIN_SWEDISH
- o DOMAIN_TURKISH
- o DOMAIN_RUSSIAN
- o DOMAIN_JAPANESE
- o DOMAIN_CHINESE
-
-- get_wiki_content(self)
- Returns the content of the wiki.
-
-- get_wiki_published_date(self)
- Returns the date of publishing this version of the wiki.
-
-- get_wiki_summary(self)
- Returns the summary of the wiki.
-
-- is_fulltrack_available(self)
- Returns True if the fulltrack is available for streaming.
-
-- is_streamable(self)
- Returns True if the track is available at Last.fm.
-
-- love(self)
- Adds the track to the user's loved tracks.
-
-- share(self, users, message=None)
- Shares this track (sends out recommendations).
-* users: A list that can contain usernames, emails, User objects, or all of them.
-* message: A message to include in the recommendation message.
-
-
-Data descriptors inherited from _BaseObject:
-- __dict__
-- dictionary for instance variables (if defined)
-
-- __weakref__
-- list of weak references to the object (if defined)
-
-
-Methods inherited from _Taggable:
-- add_tags(self, *tags)
- Adds one or several tags.
-* *tags: Any number of tag names or Tag objects.
-
-- clear_tags(self)
- Clears all the user-set tags.
-
-- get_tags(self)
- Returns a list of the tags set by the user to this object.
-
-- get_top_tags(self, limit=None)
- Returns a list of the most frequently used Tags on this object.
-
-- remove_tags(self, *tags)
- Removes one or several tags from this object.
-* *tags: Any number of tag names or Tag objects.
-
-- set_tags(self, *tags)
- Sets this object's tags to only those tags.
-* *tags: any number of tag names.
-
- |
-
-
-
-class TrackSearch(_Search) |
-
- |
-Search for a track by track title. If you don't wanna narrow the results down
-by specifying the artist name, set it to empty string. |
- |
-- Method resolution order:
-- TrackSearch
-- _Search
-- _BaseObject
-- __builtin__.object
-
-
-Methods defined here:
-- __init__(self, artist_name, track_title, api_key, api_secret, session_key)
-
-- get_next_page(self)
- Returns the next page of results as a sequence of Track objects.
-
-
-Methods inherited from _Search:
-- get_total_result_count(self)
- Returns the total count of all the results.
-
-
-Data descriptors inherited from _BaseObject:
-- __dict__
-- dictionary for instance variables (if defined)
-
-- __weakref__
-- list of weak references to the object (if defined)
-
- |
-
-
-
-class User(_BaseObject) |
-
- |
-A Last.fm user. |
- |
-- Method resolution order:
-- User
-- _BaseObject
-- __builtin__.object
-
-
-Methods defined here:
-- __eq__(self, another)
-
-- __init__(self, user_name, api_key, api_secret, session_key)
-
-- __ne__(self, another)
-
-- __repr__(self)
-
-- compare_with_user(self, user, shared_artists_limit=None)
- Compare this user with another Last.fm user.
-Returns a sequence (tasteometer_score, (shared_artist1, shared_artist2, ...))
-user: A User object or a username string/unicode object.
-
-- getRecommendedEvents(self, page=None, limit=None)
- Returns a paginated list of all events recommended to a user by Last.fm, based on their listening profile.
-* page: The page number of results to return.
-* limit: The limit of events to return.
-
-- get_friends(self, limit=None)
- Returns a list of the user's friends.
-
-- get_library(self)
- Returns the associated Library object.
-
-- get_loved_tracks(self)
- Returns the last 50 tracks loved by this user.
-
-- get_name(self)
- Returns the nuser name.
-
-- get_neighbours(self, limit=None)
- Returns a list of the user's friends.
-
-- get_now_playing(self)
- Returns the currently playing track, or None if nothing is playing.
-
-- get_past_events_page(self)
- Retruns a paginated list of all events a user has attended in the past.
-
-Example:
---------
-
-while not user.is_end_of_past_events():
- print user.get_past_events_page()
-
-- get_playlists(self)
- Returns a list of Playlists that this user owns.
-
-- get_recent_tracks(self, limit=None)
- Returns this user's recent listened-to tracks.
-
-- get_top_albums(self, period='overall')
- Returns the top albums played by a user.
-* period: The period of time. Possible values:
- o PERIOD_OVERALL
- o PERIOD_3MONTHS
- o PERIOD_6MONTHS
- o PERIOD_12MONTHS
-
-- get_top_artists(self, period='overall')
- Returns the top artists played by a user.
-* period: The period of time. Possible values:
- o PERIOD_OVERALL
- o PERIOD_3MONTHS
- o PERIOD_6MONTHS
- o PERIOD_12MONTHS
-
-- get_top_tags(self, limit=None)
- Returns a sequence of the top tags used by this user with their counts as (Tag, tagcount).
-* limit: The limit of how many tags to return.
-
-- get_top_tracks(self, period='overall')
- Returns the top tracks played by a user.
-* period: The period of time. Possible values:
- o PERIOD_OVERALL
- o PERIOD_3MONTHS
- o PERIOD_6MONTHS
- o PERIOD_12MONTHS
-
-- get_upcoming_events(self)
- Returns all the upcoming events for this user.
-
-- get_url(self, domain_name='www.last.fm')
- Returns the url of the user page on Last.fm.
-* domain_name: Last.fm's language domain. Possible values:
- o DOMAIN_ENGLISH
- o DOMAIN_GERMAN
- o DOMAIN_SPANISH
- o DOMAIN_FRENCH
- o DOMAIN_ITALIAN
- o DOMAIN_POLISH
- o DOMAIN_PORTUGUESE
- o DOMAIN_SWEDISH
- o DOMAIN_TURKISH
- o DOMAIN_RUSSIAN
- o DOMAIN_JAPANESE
- o DOMAIN_CHINESE
-
-- get_weekly_album_charts(self, from_date=None, to_date=None)
- Returns the weekly album charts for the week starting from the from_date value to the to_date value.
-
-- get_weekly_artist_charts(self, from_date=None, to_date=None)
- Returns the weekly artist charts for the week starting from the from_date value to the to_date value.
-
-- get_weekly_chart_dates(self)
- Returns a list of From and To tuples for the available charts.
-
-- get_weekly_track_charts(self, from_date=None, to_date=None)
- Returns the weekly track charts for the week starting from the from_date value to the to_date value.
-
-- is_end_of_past_events(self)
- Returns True if the end of Past Events was reached.
-
-
-Data descriptors inherited from _BaseObject:
-- __dict__
-- dictionary for instance variables (if defined)
-
-- __weakref__
-- list of weak references to the object (if defined)
-
- |
-
-
-
-
-class VenueSearch(_Search) |
-
- |
-Search for a venue by its name. If you don't wanna narrow the results down
-by specifying a country, set it to empty string. |
- |
-- Method resolution order:
-- VenueSearch
-- _Search
-- _BaseObject
-- __builtin__.object
-
-
-Methods defined here:
-- __init__(self, venue_name, country_name, api_key, api_secret, session_key)
-
-- get_next_page(self)
- Returns the next page of results as a sequence of Track objects.
-
-
-Methods inherited from _Search:
-- get_total_result_count(self)
- Returns the total count of all the results.
-
-
-Data descriptors inherited from _BaseObject:
-- __dict__
-- dictionary for instance variables (if defined)
-
-- __weakref__
-- list of weak references to the object (if defined)
-
- |
- |