コミット
b79bec993a
|
@ -97,7 +97,6 @@ from .supplement.video_supplement import VideoSupplement
|
|||
|
||||
from .pager import Pager
|
||||
from .cover import Cover
|
||||
from .experiments import Experiments
|
||||
from .invocation_info import InvocationInfo
|
||||
from .track_short import TrackShort
|
||||
from .icon import Icon
|
||||
|
|
|
@ -3,7 +3,7 @@ from yandex_music import YandexMusicObject
|
|||
|
||||
class Album(YandexMusicObject):
|
||||
def __init__(self,
|
||||
id,
|
||||
id_,
|
||||
title,
|
||||
track_count,
|
||||
artists,
|
||||
|
@ -25,12 +25,12 @@ class Album(YandexMusicObject):
|
|||
volumes=None,
|
||||
year=None,
|
||||
release_date=None,
|
||||
type=None,
|
||||
type_=None,
|
||||
track_position=None,
|
||||
regions=None,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.id = id
|
||||
self.id = id_
|
||||
self.title = title
|
||||
self.track_count = track_count
|
||||
self.artists = artists
|
||||
|
@ -51,7 +51,7 @@ class Album(YandexMusicObject):
|
|||
self.very_important = very_important
|
||||
self.available_for_mobile = available_for_mobile
|
||||
self.available_partially = available_partially
|
||||
self.type = type
|
||||
self.type = type_
|
||||
self.track_position = track_position
|
||||
self.regions = regions
|
||||
self.original_release_year = original_release_year
|
||||
|
|
|
@ -3,25 +3,25 @@ from yandex_music import YandexMusicObject
|
|||
|
||||
class Label(YandexMusicObject):
|
||||
"""Класс, представляющий лейбл альбома.
|
||||
|
||||
|
||||
Attributes:
|
||||
id (:obj:`int`): Идентификатор альбома.
|
||||
name (:obj:`str`): Название альбома.
|
||||
client (:obj:`yandex_music.Client`): Объект класса :class:`yandex_music.Client` представляющий клиент Yandex
|
||||
Music.
|
||||
Args:
|
||||
id (:obj:`int`): Идентификатор альбома.
|
||||
id_ (:obj:`int`): Идентификатор альбома.
|
||||
name (:obj:`str`): Название альбома.
|
||||
client (:obj:`yandex_music.Client`, optional): Объект класса :class:`yandex_music.Client` представляющий клиент
|
||||
Yandex Music.
|
||||
**kwargs: Произвольные ключевые аргументы полученные от API.
|
||||
"""
|
||||
def __init__(self,
|
||||
id,
|
||||
id_,
|
||||
name,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.id = id
|
||||
self.id = id_
|
||||
self.name = name
|
||||
|
||||
self.client = client
|
||||
|
@ -33,8 +33,8 @@ class Label(YandexMusicObject):
|
|||
|
||||
Args:
|
||||
data (:obj:`dict`): Поля и значения десериализуемого объекта.
|
||||
client (:obj:`yandex_music.Client`): Объект класса :class:`yandex_music.Client` представляющий клиент Yandex
|
||||
Music.
|
||||
client (:obj:`yandex_music.Client`): Объект класса :class:`yandex_music.Client` представляющий клиент
|
||||
Yandex Music.
|
||||
Returns:
|
||||
:obj:`yandex_music.Label`: Объект класса :class:`yandex_music.Label`.
|
||||
"""
|
||||
|
|
|
@ -3,7 +3,7 @@ from yandex_music import YandexMusicObject
|
|||
|
||||
class Artist(YandexMusicObject):
|
||||
def __init__(self,
|
||||
id,
|
||||
id_,
|
||||
name,
|
||||
cover,
|
||||
various=None,
|
||||
|
@ -30,7 +30,7 @@ class Artist(YandexMusicObject):
|
|||
end_date=None,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.id = id
|
||||
self.id = id_
|
||||
self.name = name
|
||||
self.cover = cover
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ class ArtistTracks(YandexMusicObject):
|
|||
Music.
|
||||
**kwargs: Произвольные ключевые аргументы полученные от API.
|
||||
"""
|
||||
|
||||
|
||||
def __init__(self,
|
||||
tracks,
|
||||
pager,
|
||||
|
|
|
@ -5,13 +5,13 @@ class Link(YandexMusicObject):
|
|||
def __init__(self,
|
||||
title,
|
||||
href,
|
||||
type,
|
||||
type_,
|
||||
social_network=None,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.title = title
|
||||
self.href = href
|
||||
self.type = type
|
||||
self.type = type_
|
||||
|
||||
self.social_network = social_network
|
||||
|
||||
|
|
|
@ -17,10 +17,10 @@ class Cover(YandexMusicObject):
|
|||
Music.
|
||||
|
||||
Args:
|
||||
type (:obj:`str`, optional): Тип обложки.
|
||||
type_ (:obj:`str`, optional): Тип обложки.
|
||||
uri (:obj:`str`, optional): Ссылка на изображение.
|
||||
items_uri (:obj:`str`, optional): Список ссылок на изображения.
|
||||
dir (:obj:`str`, optional): Директория хранения изображения на сервере.
|
||||
dir_ (:obj:`str`, optional): Директория хранения изображения на сервере.
|
||||
version (:obj:`str`, optional): Версия.
|
||||
custom (:obj:`bool`, optional): Является ли обложка пользовательской.
|
||||
prefix (:obj:`str`, optional): Уникальный идентификатор.
|
||||
|
@ -31,21 +31,21 @@ class Cover(YandexMusicObject):
|
|||
"""
|
||||
|
||||
def __init__(self,
|
||||
type=None,
|
||||
type_=None,
|
||||
uri=None,
|
||||
items_uri=None,
|
||||
dir=None,
|
||||
dir_=None,
|
||||
version=None,
|
||||
custom=None,
|
||||
prefix=None,
|
||||
error=None,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.type = type
|
||||
self.type = type_
|
||||
self.uri = uri
|
||||
self.items_uri = items_uri
|
||||
self.prefix = prefix
|
||||
self.dir = dir
|
||||
self.dir = dir_
|
||||
self.version = version
|
||||
self.custom = custom
|
||||
self.error = error
|
||||
|
|
|
@ -3,8 +3,8 @@ from yandex_music import YandexMusicObject
|
|||
|
||||
class Event(YandexMusicObject):
|
||||
def __init__(self,
|
||||
id,
|
||||
type,
|
||||
id_,
|
||||
type_,
|
||||
type_for_from=None,
|
||||
title=None,
|
||||
tracks=None,
|
||||
|
@ -15,8 +15,8 @@ class Event(YandexMusicObject):
|
|||
tracks_count=None,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.id = id
|
||||
self.type = type
|
||||
self.id = id_
|
||||
self.type = type_
|
||||
|
||||
self.type_for_from = type_for_from
|
||||
self.title = title
|
||||
|
|
|
@ -3,13 +3,13 @@ from yandex_music import YandexMusicObject
|
|||
|
||||
class GeneratedPlaylist(YandexMusicObject):
|
||||
def __init__(self,
|
||||
type,
|
||||
type_,
|
||||
ready,
|
||||
notify,
|
||||
data,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.type = type
|
||||
self.type = type_
|
||||
self.ready = ready
|
||||
self.notify = notify
|
||||
self.data = data
|
||||
|
|
|
@ -3,11 +3,11 @@ from yandex_music import YandexMusicObject
|
|||
|
||||
class TrackWithAds(YandexMusicObject):
|
||||
def __init__(self,
|
||||
type,
|
||||
type_,
|
||||
track,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.type = type
|
||||
self.type = type_
|
||||
self.track = track
|
||||
|
||||
self.client = client
|
||||
|
|
|
@ -3,7 +3,7 @@ from yandex_music import YandexMusicObject
|
|||
|
||||
class Genre(YandexMusicObject):
|
||||
def __init__(self,
|
||||
id,
|
||||
id_,
|
||||
weight,
|
||||
composer_top,
|
||||
title,
|
||||
|
@ -18,7 +18,7 @@ class Genre(YandexMusicObject):
|
|||
hide_in_regions=None,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.id = id
|
||||
self.id = id_
|
||||
self.weight = weight
|
||||
self.composer_top = composer_top
|
||||
self.title = title
|
||||
|
|
|
@ -3,8 +3,8 @@ from yandex_music import YandexMusicObject
|
|||
|
||||
class Block(YandexMusicObject):
|
||||
def __init__(self,
|
||||
id,
|
||||
type,
|
||||
id_,
|
||||
type_,
|
||||
type_for_from,
|
||||
title,
|
||||
entities,
|
||||
|
@ -13,8 +13,8 @@ class Block(YandexMusicObject):
|
|||
client=None,
|
||||
**kwargs):
|
||||
|
||||
self.id = id
|
||||
self.type = type
|
||||
self.id = id_
|
||||
self.type = type_
|
||||
self.type_for_from = type_for_from
|
||||
self.title = title
|
||||
self.entities = entities
|
||||
|
@ -37,7 +37,7 @@ class Block(YandexMusicObject):
|
|||
from yandex_music import BlockEntity, PlayContextsData, PersonalPlaylistsData
|
||||
data['entities'] = BlockEntity.de_list(data.get('entities'), client)
|
||||
|
||||
block_type = data.get('type')
|
||||
block_type = data.get('type_')
|
||||
if block_type == 'personal-playlists':
|
||||
data['data'] = PersonalPlaylistsData.de_json(data.get('data'), client)
|
||||
elif block_type == 'play-contexts':
|
||||
|
|
|
@ -15,14 +15,14 @@ de_json = {
|
|||
|
||||
class BlockEntity(YandexMusicObject):
|
||||
def __init__(self,
|
||||
id,
|
||||
type,
|
||||
id_,
|
||||
type_,
|
||||
data,
|
||||
client=None,
|
||||
**kwargs):
|
||||
|
||||
self.id = id
|
||||
self.type = type
|
||||
self.id = id_
|
||||
self.type = type_
|
||||
self.data = data
|
||||
|
||||
self.client = client
|
||||
|
@ -34,7 +34,7 @@ class BlockEntity(YandexMusicObject):
|
|||
return None
|
||||
|
||||
data = super(BlockEntity, cls).de_json(data, client)
|
||||
data['data'] = de_json.get(data.get('type'))(data.get('data'), client)
|
||||
data['data'] = de_json.get(data.get('type_'))(data.get('data'), client)
|
||||
|
||||
return cls(client=client, **data)
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@ from yandex_music import YandexMusicObject
|
|||
|
||||
class TrackId(YandexMusicObject):
|
||||
def __init__(self,
|
||||
id,
|
||||
id_,
|
||||
album_id=None,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.id = id
|
||||
self.id = id_
|
||||
|
||||
self.album_id = album_id
|
||||
self.client = client
|
||||
|
|
|
@ -4,11 +4,11 @@ from yandex_music import YandexMusicObject
|
|||
class AlbumsLikes(YandexMusicObject):
|
||||
def __init__(self,
|
||||
timestamp,
|
||||
id=None,
|
||||
id_=None,
|
||||
album=None,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.id = id
|
||||
self.id = id_
|
||||
self.album = album
|
||||
self.timestamp = timestamp
|
||||
|
||||
|
|
|
@ -3,12 +3,12 @@ from yandex_music import YandexMusicObject
|
|||
|
||||
class ArtistsLikes(YandexMusicObject):
|
||||
def __init__(self,
|
||||
id=None,
|
||||
id_=None,
|
||||
artist=None,
|
||||
timestamp=None,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.id = id
|
||||
self.id = id_
|
||||
self.artist = artist
|
||||
self.timestamp = timestamp
|
||||
|
||||
|
|
|
@ -4,11 +4,11 @@ from yandex_music import YandexMusicObject
|
|||
class PlaylistsLikes(YandexMusicObject):
|
||||
def __init__(self,
|
||||
timestamp,
|
||||
id=None,
|
||||
id_=None,
|
||||
playlist=None,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.id = id
|
||||
self.id = id_
|
||||
self.playlist = playlist
|
||||
self.timestamp = timestamp
|
||||
|
||||
|
|
|
@ -39,15 +39,15 @@ class User(YandexMusicObject):
|
|||
self.client = client
|
||||
self._id_attrs = (self.uid, self.login)
|
||||
|
||||
def download_avatar(self, filename, format='normal'):
|
||||
def download_avatar(self, filename, format_='normal'):
|
||||
"""Загрузка изображения пользователя.
|
||||
|
||||
Args:
|
||||
filename (:obj:`str`): Путь для сохранения файла с названием и расширением.
|
||||
format (:obj:`str`, optional): Формат желаемого изображения (normal, orig, small, big).
|
||||
format_ (:obj:`str`, optional): Формат желаемого изображения (normal, orig, small, big).
|
||||
"""
|
||||
|
||||
self.client.request.download(f'https://upics.yandex.net/{self.uid}/{format}', filename)
|
||||
self.client.request.download(f'https://upics.yandex.net/{self.uid}/{format_}', filename)
|
||||
|
||||
@classmethod
|
||||
def de_json(cls, data, client):
|
||||
|
|
|
@ -3,16 +3,16 @@ from yandex_music import YandexMusicObject
|
|||
|
||||
class DiscreteScale(YandexMusicObject):
|
||||
def __init__(self,
|
||||
type,
|
||||
type_,
|
||||
name,
|
||||
min,
|
||||
max,
|
||||
min_,
|
||||
max_,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.type = type
|
||||
self.type = type_
|
||||
self.name = name
|
||||
self.min = min
|
||||
self.max = max
|
||||
self.min = min_
|
||||
self.max = max_
|
||||
|
||||
self.client = client
|
||||
self._id_attrs = (self.type, self.name, self.min, self.max)
|
||||
|
@ -24,7 +24,7 @@ class DiscreteScale(YandexMusicObject):
|
|||
|
||||
data = super(DiscreteScale, cls).de_json(data, client)
|
||||
from yandex_music import Value
|
||||
data['min'] = Value.de_json(data.get('min'), client)
|
||||
data['max'] = Value.de_json(data.get('max'), client)
|
||||
data['min_'] = Value.de_json(data.get('min_'), client)
|
||||
data['max_'] = Value.de_json(data.get('max_'), client)
|
||||
|
||||
return cls(client=client, **data)
|
||||
|
|
|
@ -3,12 +3,12 @@ from yandex_music import YandexMusicObject
|
|||
|
||||
class Enum(YandexMusicObject):
|
||||
def __init__(self,
|
||||
type,
|
||||
type_,
|
||||
name,
|
||||
possible_values,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.type = type
|
||||
self.type = type_
|
||||
self.name = name
|
||||
self.possible_values = possible_values
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@ from yandex_music import YandexMusicObject
|
|||
|
||||
class Id(YandexMusicObject):
|
||||
def __init__(self,
|
||||
type,
|
||||
type_,
|
||||
tag,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.type = type
|
||||
self.type = type_
|
||||
self.tag = tag
|
||||
|
||||
self.client = client
|
||||
|
|
|
@ -3,12 +3,12 @@ from yandex_music import YandexMusicObject
|
|||
|
||||
class Sequence(YandexMusicObject):
|
||||
def __init__(self,
|
||||
type,
|
||||
type_,
|
||||
track,
|
||||
liked,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.type = type
|
||||
self.type = type_
|
||||
self.track = track
|
||||
self.liked = liked
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class Station(YandexMusicObject):
|
|||
|
||||
data = super(Station, cls).de_json(data, client)
|
||||
from yandex_music import Id, Icon, Restrictions
|
||||
data['id'] = Id.de_json(data.get('id'), client)
|
||||
data['id_'] = Id.de_json(data.get('id_'), client)
|
||||
data['parent_id'] = Id.de_json(data.get('parent_id'), client)
|
||||
data['icon'] = Icon.de_json(data.get('icon'), client)
|
||||
data['mts_icon'] = Icon.de_json(data.get('mts_icon'), client)
|
||||
|
|
|
@ -3,13 +3,13 @@ from yandex_music import YandexMusicObject
|
|||
|
||||
class StationTracksResult(YandexMusicObject):
|
||||
def __init__(self,
|
||||
id,
|
||||
id_,
|
||||
sequence,
|
||||
batch_id,
|
||||
pumpkin,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.id = id
|
||||
self.id = id_
|
||||
self.sequence = sequence
|
||||
self.batch_id = batch_id
|
||||
self.pumpkin = pumpkin
|
||||
|
@ -24,7 +24,7 @@ class StationTracksResult(YandexMusicObject):
|
|||
|
||||
data = super(StationTracksResult, cls).de_json(data, client)
|
||||
from yandex_music import Id, Sequence
|
||||
data['id'] = Id.de_json(data.get('id'), client)
|
||||
data['id_'] = Id.de_json(data.get('id_'), client)
|
||||
data['sequence'] = Sequence.de_list(data.get('sequence'), client)
|
||||
|
||||
return cls(client=client, **data)
|
||||
|
|
|
@ -12,12 +12,12 @@ de_json_result = {
|
|||
|
||||
class Best(YandexMusicObject):
|
||||
def __init__(self,
|
||||
type,
|
||||
type_,
|
||||
result,
|
||||
text=None,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.type = type
|
||||
self.type = type_
|
||||
self.result = result
|
||||
|
||||
self.text = text
|
||||
|
@ -31,6 +31,6 @@ class Best(YandexMusicObject):
|
|||
return None
|
||||
|
||||
data = super(Best, cls).de_json(data, client)
|
||||
data['result'] = de_json_result.get(data.get('type'))(data.get('result'), client)
|
||||
data['result'] = de_json_result.get(data.get('type_'))(data.get('result'), client)
|
||||
|
||||
return cls(client=client, **data)
|
||||
|
|
|
@ -27,11 +27,11 @@ class SearchResult(YandexMusicObject):
|
|||
self._id_attrs = (self.total, self.per_page, self.order, self.results)
|
||||
|
||||
@classmethod
|
||||
def de_json(cls, data, client, type=None):
|
||||
def de_json(cls, data, client, type_=None):
|
||||
if not data:
|
||||
return None
|
||||
|
||||
data = super(SearchResult, cls).de_json(data, client)
|
||||
data['results'] = de_json_result.get(type)(data.get('results'), client)
|
||||
data['results'] = de_json_result.get(type_)(data.get('results'), client)
|
||||
|
||||
return cls(client=client, **data)
|
||||
|
|
|
@ -82,15 +82,15 @@ class Account(YandexMusicObject):
|
|||
if self.uid:
|
||||
self._id_attrs = (self.uid,)
|
||||
|
||||
def download_avatar(self, filename, format='normal'):
|
||||
def download_avatar(self, filename, format_='normal'):
|
||||
"""Загрузка изображения пользователя.
|
||||
|
||||
Args:
|
||||
filename (:obj:`str`): Путь для сохранения файла с названием и расширением.
|
||||
format (:obj:`str`): Формат желаемого изображения (normal, orig, small, big).
|
||||
format_ (:obj:`str`): Формат желаемого изображения (normal, orig, small, big).
|
||||
"""
|
||||
|
||||
self.client.request.download(f'https://upics.yandex.net/{self.uid}/{format}', filename)
|
||||
self.client.request.download(f'https://upics.yandex.net/{self.uid}/{format_}', filename)
|
||||
|
||||
@classmethod
|
||||
def de_json(cls, data, client):
|
||||
|
|
|
@ -26,7 +26,7 @@ class Product(YandexMusicObject):
|
|||
|
||||
Args:
|
||||
product_id (:obj:`str`): Уникальный идентификатор.
|
||||
type (:obj:`str`): Тип продаваемого.
|
||||
type_ (:obj:`str`): Тип продаваемого.
|
||||
common_period_duration (:obj:`str`): Длительность общего периода.
|
||||
duration (:obj:`int`): Длительность.
|
||||
trial_duration (:obj:`int`): Длительность испытательного срока.
|
||||
|
@ -48,7 +48,7 @@ class Product(YandexMusicObject):
|
|||
|
||||
def __init__(self,
|
||||
product_id,
|
||||
type,
|
||||
type_,
|
||||
common_period_duration,
|
||||
duration,
|
||||
trial_duration,
|
||||
|
@ -66,7 +66,7 @@ class Product(YandexMusicObject):
|
|||
client=None,
|
||||
**kwargs):
|
||||
self.product_id = product_id
|
||||
self.type = type
|
||||
self.type = type_
|
||||
self.common_period_duration = common_period_duration
|
||||
self.duration = duration
|
||||
self.trial_duration = trial_duration
|
||||
|
|
|
@ -15,7 +15,7 @@ class Lyrics(YandexMusicObject):
|
|||
Music.
|
||||
|
||||
Args:
|
||||
id (:obj:`int`): Уникальный идентификатор текста трека.
|
||||
id_ (:obj:`int`): Уникальный идентификатор текста трека.
|
||||
lyrics (:obj:`str`): Первые строки текст песни.
|
||||
has_rights (:obj:`bool`): Есть ли права.
|
||||
full_lyrics (:obj:`str`): Текст песни.
|
||||
|
@ -27,7 +27,7 @@ class Lyrics(YandexMusicObject):
|
|||
"""
|
||||
|
||||
def __init__(self,
|
||||
id,
|
||||
id_,
|
||||
lyrics,
|
||||
full_lyrics,
|
||||
has_rights,
|
||||
|
@ -35,7 +35,7 @@ class Lyrics(YandexMusicObject):
|
|||
show_translation,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.id = id
|
||||
self.id = id_
|
||||
self.lyrics = lyrics
|
||||
self.full_lyrics = full_lyrics
|
||||
self.has_rights = has_rights
|
||||
|
@ -60,7 +60,7 @@ class Lyrics(YandexMusicObject):
|
|||
"""
|
||||
if not data:
|
||||
return None
|
||||
|
||||
|
||||
data = super(Lyrics, cls).de_json(data, client)
|
||||
|
||||
return cls(client=client, **data)
|
||||
|
|
|
@ -14,7 +14,7 @@ class Supplement(YandexMusicObject):
|
|||
Music.
|
||||
|
||||
Args:
|
||||
id (:obj:`int`): Уникальный идентификатор дополнительной информации.
|
||||
id_ (:obj:`int`): Уникальный идентификатор дополнительной информации.
|
||||
lyrics (:obj:`yandex_music.Lyrics`): Объект класса :class:`yandex_music.Lyrics` представляющий текст песни.
|
||||
videos (:obj:`yandex_music.VideoSupplement`): Объект класса :class:`yandex_music.VideoSupplement` представляющий
|
||||
видео.
|
||||
|
@ -25,13 +25,13 @@ class Supplement(YandexMusicObject):
|
|||
"""
|
||||
|
||||
def __init__(self,
|
||||
id,
|
||||
id_,
|
||||
lyrics,
|
||||
videos,
|
||||
radio_is_available,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.id = id
|
||||
self.id = id_
|
||||
self.lyrics = lyrics
|
||||
self.videos = videos
|
||||
self.radio_is_available = radio_is_available
|
||||
|
@ -53,7 +53,7 @@ class Supplement(YandexMusicObject):
|
|||
"""
|
||||
if not data:
|
||||
return None
|
||||
|
||||
|
||||
data = super(Supplement, cls).de_json(data, client)
|
||||
from yandex_music import Lyrics, VideoSupplement
|
||||
data['lyrics'] = Lyrics.de_json(data.get('lyrics'), client)
|
||||
|
|
|
@ -3,11 +3,11 @@ from yandex_music import YandexMusicObject
|
|||
|
||||
class Major(YandexMusicObject):
|
||||
def __init__(self,
|
||||
id,
|
||||
id_,
|
||||
name,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.id = id
|
||||
self.id = id_
|
||||
self.name = name
|
||||
|
||||
self.client = client
|
||||
|
|
|
@ -3,7 +3,7 @@ from yandex_music import YandexMusicObject
|
|||
|
||||
class Track(YandexMusicObject):
|
||||
def __init__(self,
|
||||
id,
|
||||
id_,
|
||||
title,
|
||||
available,
|
||||
artists,
|
||||
|
@ -12,7 +12,7 @@ class Track(YandexMusicObject):
|
|||
lyrics_available=None,
|
||||
real_id=None,
|
||||
og_image=None,
|
||||
type=None,
|
||||
type_=None,
|
||||
cover_uri=None,
|
||||
major=None,
|
||||
duration_ms=None,
|
||||
|
@ -28,7 +28,7 @@ class Track(YandexMusicObject):
|
|||
available_full_without_permission=None,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.id = id
|
||||
self.id = id_
|
||||
self.title = title
|
||||
self.available = available
|
||||
self.artists = artists
|
||||
|
@ -38,7 +38,7 @@ class Track(YandexMusicObject):
|
|||
self.lyrics_available = lyrics_available
|
||||
self.real_id = real_id
|
||||
self.og_image = og_image
|
||||
self.type = type
|
||||
self.type = type_
|
||||
self.cover_uri = cover_uri
|
||||
self.major = major
|
||||
self.duration_ms = duration_ms
|
||||
|
|
|
@ -12,7 +12,7 @@ class TrackShort(YandexMusicObject):
|
|||
Music.
|
||||
|
||||
Args:
|
||||
id (:obj:`str`): Уникальный идентификатор трека.
|
||||
id_ (:obj:`str`): Уникальный идентификатор трека.
|
||||
timestamp (:obj:`str`): Дата TODO.
|
||||
album_id (:obj:`str`, optional): Уникальный идентификатор альбома.
|
||||
client (:obj:`yandex_music.Client`, optional): Объект класса :class:`yandex_music.Client` представляющий клиент
|
||||
|
@ -21,12 +21,12 @@ class TrackShort(YandexMusicObject):
|
|||
"""
|
||||
|
||||
def __init__(self,
|
||||
id,
|
||||
id_,
|
||||
timestamp,
|
||||
album_id=None,
|
||||
client=None,
|
||||
**kwargs):
|
||||
self.id = id
|
||||
self.id = id_
|
||||
self.timestamp = timestamp
|
||||
|
||||
self.album_id = album_id
|
||||
|
|
読み込み中…
新しいイシューから参照