Package lastfm :: Module album :: Class Album
[hide private]
[frames] | no frames]

Class Album

source code

                  object --+    
                           |    
             base.LastfmBase --+
                               |
                  object --+   |
                           |   |
  mixins.cacheable.Cacheable --+
                               |
                  object --+   |
                           |   |
mixins.searchable.Searchable --+
                               |
                  object --+   |
                           |   |
    mixins.taggable.Taggable --+
                               |
                              Album

A class representing an album.

Instance Methods [hide private]
 
init(self, api, name=None, artist=None, id=None, mbid=None, url=None, release_date=None, image=None, stats=None, top_tags=None, streamable=None, subject=None)
Create an Album object by providing all the data related to it.
source code
 
_default_params(self, extra_params={}) source code
 
_fill_info(self) source code
 
__hash__(self)
hash(x)
source code
 
__eq__(self, other) source code
 
__lt__(self, other) source code
 
__repr__(self)
repr(x)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __init__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

    Inherited from base.LastfmBase
 
__ge__(self, other) source code
 
__gt__(self, other) source code
 
__le__(self, other) source code
 
__ne__(self, other) source code
    Inherited from mixins.taggable.Taggable
 
add_tags(self, *args, **kwargs) source code
 
remove_tag(self, *args, **kwargs) source code
Class Methods [hide private]
    Inherited from mixins.searchable.Searchable
 
search(cls, api, search_item, limit=None, **kwds) source code
Static Methods [hide private]
Album
get_info(api, artist=None, album=None, mbid=None)
Get the data for the album.
source code
 
_fetch_data(api, artist=None, album=None, mbid=None) source code
 
_search_yield_func(api, album) source code
 
_hash_func(*args, **kwds) source code
    Inherited from mixins.cacheable.Cacheable
a new object with type S, a subtype of T
__new__(cls, *args, **kwds) source code
 
register(ob, key) source code
Class Variables [hide private]
    Inherited from mixins.cacheable.Cacheable
  _lock = Lock()
  registry = {}
Properties [hide private]
str name
name of the album
Artist artist
artist of the album
int id
id of the album
str mbid
MBID of the album
str url
url of the album's page
datetime.datetime release_date
release date of the album
dict image
cover images of the album
Stats stats
stats related to the album
bool streamable
is the album streamable on last.fm
list of Tag top_tags
top tags for the album
Tag top_tag
top tag for the album
Playlist playlist
playlist for the album

Inherited from object: __class__

    Inherited from mixins.taggable.Taggable
  tags
Method Details [hide private]

init(self, api, name=None, artist=None, id=None, mbid=None, url=None, release_date=None, image=None, stats=None, top_tags=None, streamable=None, subject=None)

source code 

Create an Album object by providing all the data related to it.

Parameters:
  • api (Api) - an instance of Api
  • name (str) - the album name
  • artist (Artist) - the album artist name
  • id (str) - the album ID
  • mbid (str) - MBID of the album
  • url (str) - URL of the album on last.fm
  • release_date (datetime.datetime) - release date of the album
  • image (dict) - the cover images of the album in various sizes
  • stats (Stats) - the album statistics
  • top_tags (list of Tag) - top tags for the album
  • streamable (bool) - flag indicating if the album is streamable from last.fm
  • subject (User OR Artist OR Tag OR WeeklyChart) - the subject to which this instance belongs to
Raises:
Overrides: mixins.taggable.Taggable.init

get_info(api, artist=None, album=None, mbid=None)
Static Method

source code 

Get the data for the album.

Parameters:
  • api (Api) - an instance of Api
  • artist (str OR Artist) - the album artist name
  • album (str) - the album name
  • mbid (str) - MBID of the album
Returns: Album
an Album object corresponding the provided album name
Raises:

Note: Use the Api.get_album method instead of using this method directly.

_default_params(self, extra_params={})

source code 
Overrides: mixins.taggable.Taggable._default_params

_search_yield_func(api, album)
Static Method

source code 
Overrides: mixins.searchable.Searchable._search_yield_func

__hash__(self)
(Hashing function)

source code 

hash(x)

Overrides: object.__hash__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

Property Details [hide private]

name

name of the album

Get Method:
unreachable.name(self) - name of the album
Type:
str

artist

artist of the album

Get Method:
unreachable.artist(self) - artist of the album
Type:
Artist

id

id of the album

Get Method:
unreachable.id(self) - id of the album
Type:
int

mbid

MBID of the album

Get Method:
unreachable.mbid(self) - MBID of the album
Type:
str

url

url of the album's page

Get Method:
unreachable.url(self) - url of the album's page
Type:
str

release_date

release date of the album

Get Method:
unreachable.release_date(self) - release date of the album
Type:
datetime.datetime

image

cover images of the album

Get Method:
unreachable.image(self) - cover images of the album
Type:
dict

stats

stats related to the album

Get Method:
unreachable.stats(self) - stats related to the album
Type:
Stats

streamable

is the album streamable on last.fm

Get Method:
unreachable.streamable(self) - is the album streamable on last.fm
Type:
bool

top_tags

top tags for the album

Get Method:
unreachable.wrapper(ob)
Type:
list of Tag

top_tag

top tag for the album

Get Method:
unreachable.wrapper(ob)
Type:
Tag

playlist

playlist for the album

Get Method:
unreachable.wrapper(ob)
Type:
Playlist