2 This module contains higher level classes to query Musixmatch API and build 3 simple dictionary-like objects representing an Album or an AlbumsCollection. 5 >>> from musixmatch.album import Album, AlbumsCollection 6 >>> import musixmatch.api 9 ... album = Album(album_id=292) 10 ... collection = AlbumsCollection.fromArtist(country='it', page=1) 11 ... except musixmatch.api.Error, e: 15 __license__ = musixmatch.__license__
16 __author__ = musixmatch.__author__
23 This class build a :py:class:`dict` like object representing an album. It 24 can get album information through the :py:class:`musixmatch.api.Method` 25 **album.get** or from an already well-formed :py:class:`dict`. Create an 26 Album object based on a given keyword argument: 28 :param album_id: musiXmatch album ID 29 :param album_data: an already well-formed :py:class:`dict` of album data. 31 Once information are collected, the following keys are available: 33 :keyword album_id: musiXmatch album ID 34 :keyword album_name: album name 35 :keyword album_release_date: album release date 36 :keyword album_release_type: type of the album 37 :keyword album_coverart_100x100: coverart URL 38 :keyword artist_id: album artist musiXmatch ID 39 :keyword artist_name: album artist name 41 __api_method__ = album.get
43 class AlbumsCollection(ItemsCollection):
45 This class build a :py:class:`list` like object representing an albums 46 collection. It accepts :py:class:`dict` or :py:class:`Album` objects. 53 This classmethod builds an :py:class:`AlbumsCollection` from a 54 **artist.albums.get** :py:class:`musixmatch.api.Method` call. 56 :param artist_id: album artist musiXmatch ID 57 :param g_album_name: group albums by name 58 :param s_release_date: sort albums by release date 59 :rtype: :py:class:`AlbumsCollection` def fromResponseMessage(cls, message)
def fromArtist(cls, keywords)