24 行
549 B
Python
24 行
549 B
Python
from yandex_music import YandexMusicObject
|
|
|
|
|
|
class TrackId(YandexMusicObject):
|
|
def __init__(self,
|
|
id_,
|
|
album_id=None,
|
|
client=None,
|
|
**kwargs):
|
|
self.id = id_
|
|
|
|
self.album_id = album_id
|
|
self.client = client
|
|
self._id_attrs = (self.id, self.album_id)
|
|
|
|
@classmethod
|
|
def de_json(cls, data, client):
|
|
if not data:
|
|
return None
|
|
|
|
data = super(TrackId, cls).de_json(data, client)
|
|
|
|
return cls(client=client, **data)
|