2019-05-11 17:37:47 +09:00
|
|
|
from yandex_music import YandexMusicObject
|
|
|
|
|
|
|
|
|
|
|
|
class Cover(YandexMusicObject):
|
|
|
|
def __init__(self,
|
|
|
|
type,
|
New supported objects: Album, CaseForms, Label, Library, MadeFor, Major, Normalization, PlayCounter, Playlist, Track, TrackPosition, TrackShort, User
The following methods are wrapped:
- albums;
- playlists/list;
- users/{user_id}/playlists/list;
- tracks;
- users/{user_id}/likes/tracks.
Added property to get full track ID
Cover received more optional fields
Ability to pass arguments to the request
Removed unnecessary type conversions
2019-05-13 02:39:12 +09:00
|
|
|
uri=None,
|
|
|
|
items_uri=None,
|
|
|
|
dir=None,
|
|
|
|
version=None,
|
|
|
|
custom=None,
|
|
|
|
prefix=None,
|
2019-05-11 17:37:47 +09:00
|
|
|
client=None,
|
|
|
|
**kwargs):
|
|
|
|
self.type = type
|
New supported objects: Album, CaseForms, Label, Library, MadeFor, Major, Normalization, PlayCounter, Playlist, Track, TrackPosition, TrackShort, User
The following methods are wrapped:
- albums;
- playlists/list;
- users/{user_id}/playlists/list;
- tracks;
- users/{user_id}/likes/tracks.
Added property to get full track ID
Cover received more optional fields
Ability to pass arguments to the request
Removed unnecessary type conversions
2019-05-13 02:39:12 +09:00
|
|
|
|
2019-05-11 17:37:47 +09:00
|
|
|
self.uri = uri
|
New supported objects: Album, CaseForms, Label, Library, MadeFor, Major, Normalization, PlayCounter, Playlist, Track, TrackPosition, TrackShort, User
The following methods are wrapped:
- albums;
- playlists/list;
- users/{user_id}/playlists/list;
- tracks;
- users/{user_id}/likes/tracks.
Added property to get full track ID
Cover received more optional fields
Ability to pass arguments to the request
Removed unnecessary type conversions
2019-05-13 02:39:12 +09:00
|
|
|
self.items_uri = items_uri
|
|
|
|
self.prefix = prefix
|
|
|
|
self.dir = dir
|
|
|
|
self.version = version
|
|
|
|
self.custom = custom
|
2019-05-11 17:37:47 +09:00
|
|
|
|
|
|
|
self.client = client
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def de_json(cls, data, client):
|
|
|
|
if not data:
|
|
|
|
return None
|
|
|
|
|
|
|
|
data = super(Cover, cls).de_json(data, client)
|
|
|
|
|
|
|
|
return cls(client=client, **data)
|