Исправлена документация, код перед импортом, тайпхинты
このコミットが含まれているのは:
コミット
0f736857b9
|
@ -12,4 +12,3 @@
|
||||||
yandex_music.artist.brief_info
|
yandex_music.artist.brief_info
|
||||||
yandex_music.artist.artist_tracks
|
yandex_music.artist.artist_tracks
|
||||||
yandex_music.artist.artist_albums
|
yandex_music.artist.artist_albums
|
||||||
yandex_music.artist.pager
|
|
||||||
|
|
|
@ -3,5 +3,4 @@ yandex_music.Pager
|
||||||
|
|
||||||
.. autoclass:: yandex_music.Pager
|
.. autoclass:: yandex_music.Pager
|
||||||
:members:
|
:members:
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
:show-inheritance:
|
|
@ -3,30 +3,32 @@
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
|
|
||||||
yandex_music.artist
|
|
||||||
yandex_music.playlist
|
|
||||||
yandex_music.utils
|
|
||||||
yandex_music.genre
|
|
||||||
yandex_music.track
|
|
||||||
yandex_music.account
|
|
||||||
yandex_music.likes
|
|
||||||
yandex_music.album
|
|
||||||
yandex_music.search
|
|
||||||
yandex_music.landing
|
|
||||||
yandex_music.feed
|
|
||||||
yandex_music.rotor
|
|
||||||
yandex_music.supplement
|
|
||||||
|
|
||||||
yandex_music.base
|
|
||||||
yandex_music.client
|
yandex_music.client
|
||||||
yandex_music.settings
|
yandex_music.base
|
||||||
yandex_music.permission_alerts
|
|
||||||
yandex_music.experiments
|
|
||||||
yandex_music.track_short
|
|
||||||
yandex_music.promo_code_status
|
|
||||||
yandex_music.invocation_info
|
|
||||||
yandex_music.icon
|
|
||||||
yandex_music.cover
|
yandex_music.cover
|
||||||
yandex_music.download_info
|
yandex_music.download_info
|
||||||
|
yandex_music.experiments
|
||||||
|
yandex_music.icon
|
||||||
|
yandex_music.invocation_info
|
||||||
|
yandex_music.pager
|
||||||
|
yandex_music.permission_alerts
|
||||||
|
yandex_music.promo_code_status
|
||||||
|
yandex_music.settings
|
||||||
|
yandex_music.track_short
|
||||||
yandex_music.tracks_list
|
yandex_music.tracks_list
|
||||||
yandex_music.video
|
yandex_music.video
|
||||||
|
|
||||||
|
yandex_music.account
|
||||||
|
yandex_music.album
|
||||||
|
yandex_music.artist
|
||||||
|
yandex_music.feed
|
||||||
|
yandex_music.genre
|
||||||
|
yandex_music.landing
|
||||||
|
yandex_music.likes
|
||||||
|
yandex_music.playlist
|
||||||
|
yandex_music.rotor
|
||||||
|
yandex_music.search
|
||||||
|
yandex_music.shot
|
||||||
|
yandex_music.supplement
|
||||||
|
yandex_music.track
|
||||||
|
yandex_music.utils
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
Пакет yandex_music.shot
|
||||||
|
=======================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
|
||||||
|
yandex_music.shot.shot
|
||||||
|
yandex_music.shot.shot_data
|
||||||
|
yandex_music.shot.shot_event
|
||||||
|
yandex_music.shot.shot_type
|
|
@ -0,0 +1,7 @@
|
||||||
|
yandex_music.Shot
|
||||||
|
=================
|
||||||
|
|
||||||
|
.. autoclass:: yandex_music.Shot
|
||||||
|
:members:
|
||||||
|
:undoc-members:
|
||||||
|
:show-inheritance:
|
|
@ -0,0 +1,7 @@
|
||||||
|
yandex_music.ShotData
|
||||||
|
=====================
|
||||||
|
|
||||||
|
.. autoclass:: yandex_music.ShotData
|
||||||
|
:members:
|
||||||
|
:undoc-members:
|
||||||
|
:show-inheritance:
|
|
@ -0,0 +1,7 @@
|
||||||
|
yandex_music.ShotEvent
|
||||||
|
======================
|
||||||
|
|
||||||
|
.. autoclass:: yandex_music.ShotEvent
|
||||||
|
:members:
|
||||||
|
:undoc-members:
|
||||||
|
:show-inheritance:
|
|
@ -0,0 +1,7 @@
|
||||||
|
yandex_music.ShotType
|
||||||
|
=====================
|
||||||
|
|
||||||
|
.. autoclass:: yandex_music.ShotType
|
||||||
|
:members:
|
||||||
|
:undoc-members:
|
||||||
|
:show-inheritance:
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, PassportPhone
|
from yandex_music import Client, PassportPhone
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Account(YandexMusicObject):
|
class Account(YandexMusicObject):
|
||||||
"""Класс, представляющий основную информацию об аккаунте пользователя.
|
"""Класс, представляющий основную информацию об аккаунте пользователя.
|
||||||
|
@ -92,9 +92,8 @@ class Account(YandexMusicObject):
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
filename (:obj:`str`): Путь для сохранения файла с названием и расширением.
|
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
|
@classmethod
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Product
|
from yandex_music import Client, Product
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class AutoRenewable(YandexMusicObject):
|
class AutoRenewable(YandexMusicObject):
|
||||||
"""Класс, представляющий автопродление подписки.
|
"""Класс, представляющий автопродление подписки.
|
||||||
|
@ -87,7 +87,8 @@ class AutoRenewable(YandexMusicObject):
|
||||||
Music.
|
Music.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
:obj:`list` из :obj:`yandex_music.AutoRenewable`: Список объектов класса :class:`yandex_music.AutoRenewable`.
|
:obj:`list` из :obj:`yandex_music.AutoRenewable`: Список объектов класса
|
||||||
|
:class:`yandex_music.AutoRenewable`.
|
||||||
"""
|
"""
|
||||||
if not data:
|
if not data:
|
||||||
return []
|
return []
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class PassportPhone(YandexMusicObject):
|
class PassportPhone(YandexMusicObject):
|
||||||
"""Класс, представляющий номер телефона пользователя.
|
"""Класс, представляющий номер телефона пользователя.
|
||||||
|
@ -59,7 +59,8 @@ class PassportPhone(YandexMusicObject):
|
||||||
Music.
|
Music.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
:obj:`list` из :obj:`yandex_music.PassportPhone`: Список объектов класса :class:`yandex_music.PassportPhone`.
|
:obj:`list` из :obj:`yandex_music.PassportPhone`: Список объектов класса
|
||||||
|
:class:`yandex_music.PassportPhone`.
|
||||||
"""
|
"""
|
||||||
if not data:
|
if not data:
|
||||||
return []
|
return []
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Permissions(YandexMusicObject):
|
class Permissions(YandexMusicObject):
|
||||||
"""Класс, представляющий информацию о правах пользователя, их изначальных значениях и даты окончания.
|
"""Класс, представляющий информацию о правах пользователя, их изначальных значениях и даты окончания.
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Plus(YandexMusicObject):
|
class Plus(YandexMusicObject):
|
||||||
"""Класс, представляющий Plus подписку.
|
"""Класс, представляющий `Plus` подписку.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
has_plus (:obj:`bool`): Наличие.
|
has_plus (:obj:`bool`): Наличие.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Price(YandexMusicObject):
|
class Price(YandexMusicObject):
|
||||||
"""Класс, представляющий цену.
|
"""Класс, представляющий цену.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Price
|
from yandex_music import Client, Price
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Product(YandexMusicObject):
|
class Product(YandexMusicObject):
|
||||||
"""Класс, представляющий продаваемый продукт.
|
"""Класс, представляющий продаваемый продукт.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Account, Permissions, Subscription, Plus
|
from yandex_music import Client, Account, Permissions, Subscription, Plus
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Status(YandexMusicObject):
|
class Status(YandexMusicObject):
|
||||||
"""Класс, представляющий подробную информацию об аккаунте пользователя.
|
"""Класс, представляющий подробную информацию об аккаунте пользователя.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, AutoRenewable
|
from yandex_music import Client, AutoRenewable
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Subscription(YandexMusicObject):
|
class Subscription(YandexMusicObject):
|
||||||
"""Класс, представляющий информацию о подписках пользователя.
|
"""Класс, представляющий информацию о подписках пользователя.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class UserSettings(YandexMusicObject):
|
class UserSettings(YandexMusicObject):
|
||||||
"""Класс, представляющий настройки пользователя.
|
"""Класс, представляющий настройки пользователя.
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Artist, Label, TrackPosition, Track
|
from yandex_music import Client, Artist, Label, TrackPosition, Track
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Album(YandexMusicObject):
|
class Album(YandexMusicObject):
|
||||||
"""Класс, представляющий альбом.
|
"""Класс, представляющий альбом.
|
||||||
|
|
||||||
Известные типы альбома: `single` - сингл, `compilation` - сборник.
|
Note:
|
||||||
|
Известные типы альбома: `single` - сингл, `compilation` - сборник.
|
||||||
|
|
||||||
Известные предупреждения о содержимом: `explicit` - ненормативная лексика.
|
Известные предупреждения о содержимом: `explicit` - ненормативная лексика.
|
||||||
|
|
||||||
Известные ошибки: `not-found` - альбом с таким ID не существует.
|
Известные ошибки: `not-found` - альбом с таким ID не существует.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
id (:obj:`int`): Идентификатор альбома.
|
id (:obj:`int`): Идентификатор альбома.
|
||||||
|
@ -144,7 +145,6 @@ class Album(YandexMusicObject):
|
||||||
|
|
||||||
client.albums_with_tracks(album.id, *args, **kwargs)
|
client.albums_with_tracks(album.id, *args, **kwargs)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return self.client.albums_with_tracks(self.id, *args, **kwargs)
|
return self.client.albums_with_tracks(self.id, *args, **kwargs)
|
||||||
|
|
||||||
def download_cover(self, filename: str, size: str = '200x200') -> None:
|
def download_cover(self, filename: str, size: str = '200x200') -> None:
|
||||||
|
@ -154,19 +154,17 @@ class Album(YandexMusicObject):
|
||||||
filename (:obj:`str`): Путь для сохранения файла с названием и расширением.
|
filename (:obj:`str`): Путь для сохранения файла с названием и расширением.
|
||||||
size (:obj:`str`, optional): Размер обложки.
|
size (:obj:`str`, optional): Размер обложки.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self.client.request.download(f'https://{self.cover_uri.replace("%%", size)}', filename)
|
self.client.request.download(f'https://{self.cover_uri.replace("%%", size)}', filename)
|
||||||
|
|
||||||
def download_og_image(self, filename: str, size: str = '200x200') -> None:
|
def download_og_image(self, filename: str, size: str = '200x200') -> None:
|
||||||
"""Загрузка обложки.
|
"""Загрузка обложки.
|
||||||
|
|
||||||
Предпочтительнее использовать self.download_cover().
|
Предпочтительнее использовать `self.download_cover()`.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
filename (:obj:`str`): Путь для сохранения файла с названием и расширением.
|
filename (:obj:`str`): Путь для сохранения файла с названием и расширением.
|
||||||
size (:obj:`str`, optional): Размер обложки.
|
size (:obj:`str`, optional): Размер обложки.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self.client.request.download(f'https://{self.og_image.replace("%%", size)}', filename)
|
self.client.request.download(f'https://{self.og_image.replace("%%", size)}', filename)
|
||||||
|
|
||||||
def like(self, *args, **kwargs) -> bool:
|
def like(self, *args, **kwargs) -> bool:
|
||||||
|
|
|
@ -1,26 +1,27 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Label(YandexMusicObject):
|
class Label(YandexMusicObject):
|
||||||
"""Класс, представляющий лейбл альбома.
|
"""Класс, представляющий лейбл альбома.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
id (:obj:`int`): Идентификатор альбома.
|
id (:obj:`int`): Идентификатор альбома.
|
||||||
name (:obj:`str`): Название альбома.
|
name (:obj:`str`): Название альбома.
|
||||||
client (:obj:`yandex_music.Client`): Объект класса :class:`yandex_music.Client` представляющий клиент Yandex
|
client (:obj:`yandex_music.Client`): Объект класса :class:`yandex_music.Client` представляющий клиент Yandex
|
||||||
Music.
|
Music.
|
||||||
Args:
|
Args:
|
||||||
id_ (:obj:`int`): Идентификатор альбома.
|
id_ (:obj:`int`): Идентификатор альбома.
|
||||||
name (:obj:`str`): Название альбома.
|
name (:obj:`str`): Название альбома.
|
||||||
client (:obj:`yandex_music.Client`, optional): Объект класса :class:`yandex_music.Client` представляющий
|
client (:obj:`yandex_music.Client`, optional): Объект класса :class:`yandex_music.Client` представляющий
|
||||||
клиент Yandex Music.
|
клиент Yandex Music.
|
||||||
**kwargs: Произвольные ключевые аргументы полученные от API.
|
**kwargs: Произвольные ключевые аргументы полученные от API.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
id_: int,
|
id_: int,
|
||||||
name: str,
|
name: str,
|
||||||
|
@ -36,12 +37,12 @@ class Label(YandexMusicObject):
|
||||||
def de_json(cls, data: dict, client: 'Client') -> Optional['Label']:
|
def de_json(cls, data: dict, client: 'Client') -> Optional['Label']:
|
||||||
"""Десериализация объекта.
|
"""Десериализация объекта.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
data (:obj:`dict`): Поля и значения десериализуемого объекта.
|
data (:obj:`dict`): Поля и значения десериализуемого объекта.
|
||||||
client (:obj:`yandex_music.Client`): Объект класса :class:`yandex_music.Client` представляющий клиент
|
client (:obj:`yandex_music.Client`): Объект класса :class:`yandex_music.Client` представляющий клиент
|
||||||
Yandex Music.
|
Yandex Music.
|
||||||
Returns:
|
Returns:
|
||||||
:obj:`yandex_music.Label`: Объект класса :class:`yandex_music.Label`.
|
:obj:`yandex_music.Label`: Объект класса :class:`yandex_music.Label`.
|
||||||
"""
|
"""
|
||||||
if not data:
|
if not data:
|
||||||
return None
|
return None
|
||||||
|
@ -54,12 +55,12 @@ class Label(YandexMusicObject):
|
||||||
def de_list(cls, data: dict, client: 'Client') -> List['Label']:
|
def de_list(cls, data: dict, client: 'Client') -> List['Label']:
|
||||||
"""Десериализация списка объектов.
|
"""Десериализация списка объектов.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
data (:obj:`list`): Список словарей с полями и значениями десериализуемого объекта.
|
data (:obj:`list`): Список словарей с полями и значениями десериализуемого объекта.
|
||||||
client (:obj:`yandex_music.Client`): Объект класса :class:`yandex_music.Client` представляющий клиент
|
client (:obj:`yandex_music.Client`): Объект класса :class:`yandex_music.Client` представляющий клиент
|
||||||
Yandex Music.
|
Yandex Music.
|
||||||
Returns:
|
Returns:
|
||||||
:obj:`list` из :obj:`yandex_music.Label`: Список объектов класса :class:`yandex_music.Label`.
|
:obj:`list` из :obj:`yandex_music.Label`: Список объектов класса :class:`yandex_music.Label`.
|
||||||
"""
|
"""
|
||||||
if not data:
|
if not data:
|
||||||
return []
|
return []
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class TrackPosition(YandexMusicObject):
|
class TrackPosition(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Cover, Ratings, Counts, Link, Track, Description, ArtistTracks, ArtistAlbums
|
from yandex_music import Client, Cover, Ratings, Counts, Link, Track, Description, ArtistTracks, ArtistAlbums
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Artist(YandexMusicObject):
|
class Artist(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Album, Pager
|
from yandex_music import Client, Album, Pager
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class ArtistAlbums(YandexMusicObject):
|
class ArtistAlbums(YandexMusicObject):
|
||||||
"""Класс, представляющий страницу списка альбомов артиста.
|
"""Класс, представляющий страницу списка альбомов артиста.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Track, Pager
|
from yandex_music import Client, Track, Pager
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class ArtistTracks(YandexMusicObject):
|
class ArtistTracks(YandexMusicObject):
|
||||||
"""Класс, представляющий страницу списка треков артиста.
|
"""Класс, представляющий страницу списка треков артиста.
|
||||||
|
@ -18,8 +18,8 @@ class ArtistTracks(YandexMusicObject):
|
||||||
Args:
|
Args:
|
||||||
tracks (:obj:`list` из :obj:`yandex_music.Track`): Список треков артиста.
|
tracks (:obj:`list` из :obj:`yandex_music.Track`): Список треков артиста.
|
||||||
pager (:obj:`yandex_music.Pager`): Объект класса :class:`yandex_music.Pager` представляющий пагинатор.
|
pager (:obj:`yandex_music.Pager`): Объект класса :class:`yandex_music.Pager` представляющий пагинатор.
|
||||||
client (:obj:`yandex_music.Client`, optional): Объект класса :class:`yandex_music.Client` представляющий клиент Yandex
|
client (:obj:`yandex_music.Client`, optional): Объект класса :class:`yandex_music.Client` представляющий клиент
|
||||||
Music.
|
Yandex Music.
|
||||||
**kwargs: Произвольные ключевые аргументы полученные от API.
|
**kwargs: Произвольные ключевые аргументы полученные от API.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Artist, Track, Album, Cover, PlaylistId, Video, Chart, Vinyl
|
from yandex_music import Client, Artist, Track, Album, Cover, PlaylistId, Video, Chart, Vinyl
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class BriefInfo(YandexMusicObject):
|
class BriefInfo(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Counts(YandexMusicObject):
|
class Counts(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Description(YandexMusicObject):
|
class Description(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Link(YandexMusicObject):
|
class Link(YandexMusicObject):
|
||||||
"""Класс, представляющий ссылку на официальную страницу исполнителя.
|
"""Класс, представляющий ссылку на официальную страницу исполнителя.
|
||||||
|
|
||||||
Известные типы страниц: `official` - официальный сайт и `social` - социальная сеть.
|
Note:
|
||||||
|
Известные типы страниц: `official` - официальный сайт и `social` - социальная сеть.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
title (:obj:`str`): Название страницы.
|
title (:obj:`str`): Название страницы.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Ratings(YandexMusicObject):
|
class Ratings(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Vinyl(YandexMusicObject):
|
class Vinyl(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
@ -38,7 +38,6 @@ class Vinyl(YandexMusicObject):
|
||||||
Returns:
|
Returns:
|
||||||
:obj:`yandex_music.Vinyl`: Объект класса :class:`yandex_music.Vinyl`.
|
:obj:`yandex_music.Vinyl`: Объект класса :class:`yandex_music.Vinyl`.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not data:
|
if not data:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ class YandexMusicObject:
|
||||||
elif isinstance(val, list):
|
elif isinstance(val, list):
|
||||||
return [parse(it) for it in val]
|
return [parse(it) for it in val]
|
||||||
elif isinstance(val, dict):
|
elif isinstance(val, dict):
|
||||||
return {k: parse(v) for k, v in val.items()}
|
return {key: parse(value) for key, value in val.items()}
|
||||||
else:
|
else:
|
||||||
return val
|
return val
|
||||||
|
|
||||||
|
|
|
@ -243,7 +243,7 @@ class Client(YandexMusicObject):
|
||||||
return Status.de_json(result, self)
|
return Status.de_json(result, self)
|
||||||
|
|
||||||
@log
|
@log
|
||||||
def account_settings(self, timeout: Union[int, float] = None, *args, **kwargs) -> Optional[Settings]:
|
def account_settings(self, timeout: Union[int, float] = None, *args, **kwargs) -> Optional[UserSettings]:
|
||||||
"""Получение настроек текущего пользователя.
|
"""Получение настроек текущего пользователя.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -268,7 +268,7 @@ class Client(YandexMusicObject):
|
||||||
@log
|
@log
|
||||||
def account_settings_set(self, param: str = None, value: Union[str, int, bool] = None,
|
def account_settings_set(self, param: str = None, value: Union[str, int, bool] = None,
|
||||||
data: Dict[str, Union[str, int, bool]] = None, timeout: Union[int, float] = None,
|
data: Dict[str, Union[str, int, bool]] = None, timeout: Union[int, float] = None,
|
||||||
*args, **kwargs) -> Optional[Settings]:
|
*args, **kwargs) -> Optional[UserSettings]:
|
||||||
"""Изменение настроек текущего пользователя.
|
"""Изменение настроек текущего пользователя.
|
||||||
|
|
||||||
Note:
|
Note:
|
||||||
|
@ -530,7 +530,7 @@ class Client(YandexMusicObject):
|
||||||
|
|
||||||
@log
|
@log
|
||||||
def tracks_similar(self, track_id: Union[str, int], timeout: Union[int, float] = None,
|
def tracks_similar(self, track_id: Union[str, int], timeout: Union[int, float] = None,
|
||||||
*args, **kwargs) -> Optional:
|
*args, **kwargs) -> Optional[SimilarTracks]:
|
||||||
"""Получение похожих треков.
|
"""Получение похожих треков.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -713,7 +713,7 @@ class Client(YandexMusicObject):
|
||||||
|
|
||||||
@log
|
@log
|
||||||
def users_settings(self, user_id: Union[str, int] = None, timeout: Union[int, float] = None,
|
def users_settings(self, user_id: Union[str, int] = None, timeout: Union[int, float] = None,
|
||||||
*args, **kwargs) -> Optional[Settings]:
|
*args, **kwargs) -> Optional[UserSettings]:
|
||||||
"""Получение настроек пользователя.
|
"""Получение настроек пользователя.
|
||||||
|
|
||||||
Note:
|
Note:
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Cover(YandexMusicObject):
|
class Cover(YandexMusicObject):
|
||||||
"""Класс, представляющий обложку.
|
"""Класс, представляющий обложку.
|
||||||
|
@ -12,7 +12,7 @@ class Cover(YandexMusicObject):
|
||||||
Attributes:
|
Attributes:
|
||||||
type (:obj:`str`): Тип обложки.
|
type (:obj:`str`): Тип обложки.
|
||||||
uri (:obj:`str`): Ссылка на изображение.
|
uri (:obj:`str`): Ссылка на изображение.
|
||||||
items_uri (:obj:`str`): ССписок ссылок на изображения.
|
items_uri (:obj:`str`): Список ссылок на изображения.
|
||||||
dir (:obj:`str`): Директория хранения изображения на сервере.
|
dir (:obj:`str`): Директория хранения изображения на сервере.
|
||||||
version (:obj:`str`): Версия.
|
version (:obj:`str`): Версия.
|
||||||
custom (:obj:`bool`): Является ли обложка пользовательской.
|
custom (:obj:`bool`): Является ли обложка пользовательской.
|
||||||
|
@ -63,7 +63,7 @@ class Cover(YandexMusicObject):
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
filename (:obj:`str`): Путь для сохранения файла с названием и расширением.
|
filename (:obj:`str`): Путь для сохранения файла с названием и расширением.
|
||||||
index (:obj:`int`, optional): Индекс элемента в списке ссылок на обложки если нет self.uri.
|
index (:obj:`int`, optional): Индекс элемента в списке ссылок на обложки если нет `self.uri`.
|
||||||
size (:obj:`str`, optional): Размер изображения.
|
size (:obj:`str`, optional): Размер изображения.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
from yandex_music import Client
|
|
||||||
from xml.dom.minicompat import NodeList
|
|
||||||
|
|
||||||
from hashlib import md5
|
from hashlib import md5
|
||||||
import xml.dom.minidom as minidom
|
import xml.dom.minidom as minidom
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from yandex_music import Client
|
||||||
|
from xml.dom.minicompat import NodeList
|
||||||
|
|
||||||
|
|
||||||
class DownloadInfo(YandexMusicObject):
|
class DownloadInfo(YandexMusicObject):
|
||||||
"""Класс, представляющий информацию о вариантах загрузки трека.
|
"""Класс, представляющий информацию о вариантах загрузки трека.
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Experiments(YandexMusicObject):
|
class Experiments(YandexMusicObject):
|
||||||
"""Класс представления каких-то свистелок-перделок, флажков, режимов экспериментальных функций.
|
"""Класс представления каких-то свистелок-перделок, флажков, режимов экспериментальных функций.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Album, Track
|
from yandex_music import Client, Album, Track
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class AlbumEvent(YandexMusicObject):
|
class AlbumEvent(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Artist, Track
|
from yandex_music import Client, Artist, Track
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class ArtistEvent(YandexMusicObject):
|
class ArtistEvent(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Event, Track, TrackWithAds
|
from yandex_music import Client, Event, Track, TrackWithAds
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Day(YandexMusicObject):
|
class Day(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Track, AlbumEvent, ArtistEvent
|
from yandex_music import Client, Track, AlbumEvent, ArtistEvent
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Event(YandexMusicObject):
|
class Event(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, GeneratedPlaylist, Day
|
from yandex_music import Client, GeneratedPlaylist, Day
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Feed(YandexMusicObject):
|
class Feed(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Playlist
|
from yandex_music import Client, Playlist
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class GeneratedPlaylist(YandexMusicObject):
|
class GeneratedPlaylist(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Track
|
from yandex_music import Client, Track
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class TrackWithAds(YandexMusicObject):
|
class TrackWithAds(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List, Dict
|
from typing import TYPE_CHECKING, Optional, List, Dict
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Title, Icon, Images
|
from yandex_music import Client, Title, Icon, Images
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Genre(YandexMusicObject):
|
class Genre(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Images(YandexMusicObject):
|
class Images(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, Dict
|
from typing import TYPE_CHECKING, Optional, Dict
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Title(YandexMusicObject):
|
class Title(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Icon(YandexMusicObject):
|
class Icon(YandexMusicObject):
|
||||||
"""Класс, представляющий иконку.
|
"""Класс, представляющий иконку.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class InvocationInfo(YandexMusicObject):
|
class InvocationInfo(YandexMusicObject):
|
||||||
"""Класс, представляющий информацию о запросе.
|
"""Класс, представляющий информацию о запросе.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List, Union
|
from typing import TYPE_CHECKING, Optional, List, Union
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, BlockEntity, PersonalPlaylistsData, PlayContextsData
|
from yandex_music import Client, BlockEntity, PersonalPlaylistsData, PlayContextsData
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Block(YandexMusicObject):
|
class Block(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List, Union
|
from typing import TYPE_CHECKING, Optional, List, Union
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject, Promotion, Album, Playlist, MixLink, PlayContext, ChartItem, \
|
||||||
|
GeneratedPlaylist
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject, Promotion, Album, Playlist, MixLink, PlayContext, ChartItem,\
|
|
||||||
GeneratedPlaylist
|
|
||||||
|
|
||||||
|
|
||||||
de_json = {
|
de_json = {
|
||||||
'personal-playlist': GeneratedPlaylist.de_json,
|
'personal-playlist': GeneratedPlaylist.de_json,
|
||||||
'promotion': Promotion.de_json,
|
'promotion': Promotion.de_json,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, TrackId
|
from yandex_music import Client, TrackId
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Chart(YandexMusicObject):
|
class Chart(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Track, Chart
|
from yandex_music import Client, Track, Chart
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class ChartItem(YandexMusicObject):
|
class ChartItem(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List, Union
|
from typing import TYPE_CHECKING, Optional, List, Union
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Block
|
from yandex_music import Client, Block
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Landing(YandexMusicObject):
|
class Landing(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class MixLink(YandexMusicObject):
|
class MixLink(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class PersonalPlaylistsData(YandexMusicObject):
|
class PersonalPlaylistsData(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, TrackShortOld
|
from yandex_music import Client, TrackShortOld
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class PlayContext(YandexMusicObject):
|
class PlayContext(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, TrackShortOld
|
from yandex_music import Client, TrackShortOld
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class PlayContextsData(YandexMusicObject):
|
class PlayContextsData(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Promotion(YandexMusicObject):
|
class Promotion(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class TrackId(YandexMusicObject):
|
class TrackId(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, TrackId
|
from yandex_music import Client, TrackId
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class TrackShortOld(YandexMusicObject):
|
class TrackShortOld(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Album
|
from yandex_music import Client, Album
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class AlbumsLikes(YandexMusicObject):
|
class AlbumsLikes(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Artist
|
from yandex_music import Client, Artist
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class ArtistsLikes(YandexMusicObject):
|
class ArtistsLikes(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Playlist
|
from yandex_music import Client, Playlist
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class PlaylistsLikes(YandexMusicObject):
|
class PlaylistsLikes(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Pager(YandexMusicObject):
|
class Pager(YandexMusicObject):
|
||||||
"""Класс, представляющий пагинатор.
|
"""Класс, представляющий пагинатор.
|
||||||
|
@ -20,8 +20,8 @@ class Pager(YandexMusicObject):
|
||||||
total (:obj:`int`): Всего треков.
|
total (:obj:`int`): Всего треков.
|
||||||
page (:obj:`int`): Номер страницы.
|
page (:obj:`int`): Номер страницы.
|
||||||
per_page (:obj:`int`): Количество треков на странице.
|
per_page (:obj:`int`): Количество треков на странице.
|
||||||
client (:obj:`yandex_music.Client`, optional): Объект класса :class:`yandex_music.Client` представляющий клиент Yandex
|
client (:obj:`yandex_music.Client`, optional): Объект класса :class:`yandex_music.Client` представляющий клиент
|
||||||
Music.
|
Yandex Music.
|
||||||
**kwargs: Произвольные ключевые аргументы полученные от API.
|
**kwargs: Произвольные ключевые аргументы полученные от API.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class PermissionAlerts(YandexMusicObject):
|
class PermissionAlerts(YandexMusicObject):
|
||||||
"""Класс, представляющий оповещения.
|
"""Класс, представляющий оповещения.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class CaseForms(YandexMusicObject):
|
class CaseForms(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, User, CaseForms
|
from yandex_music import Client, User, CaseForms
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class MadeFor(YandexMusicObject):
|
class MadeFor(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class PlayCounter(YandexMusicObject):
|
class PlayCounter(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, User, Cover, MadeFor, TrackShort, PlaylistAbsence, PlayCounter
|
from yandex_music import Client, User, Cover, MadeFor, TrackShort, PlaylistAbsence, PlayCounter
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Playlist(YandexMusicObject):
|
class Playlist(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class PlaylistAbsence(YandexMusicObject):
|
class PlaylistAbsence(YandexMusicObject):
|
||||||
"""Класс, представляющий причину отсутствия плейлиста.
|
"""Класс, представляющий причину отсутствия плейлиста.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class PlaylistId(YandexMusicObject):
|
class PlaylistId(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class User(YandexMusicObject):
|
class User(YandexMusicObject):
|
||||||
"""Класс, представляющий пользователя.
|
"""Класс, представляющий пользователя.
|
||||||
|
@ -51,7 +51,7 @@ class User(YandexMusicObject):
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
filename (:obj:`str`): Путь для сохранения файла с названием и расширением.
|
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)
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Status
|
from yandex_music import Client, Status
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class PromoCodeStatus(YandexMusicObject):
|
class PromoCodeStatus(YandexMusicObject):
|
||||||
"""Класс, представляющий статус активации промо-кода.
|
"""Класс, представляющий статус активации промо-кода.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, Union
|
from typing import TYPE_CHECKING, Optional, Union
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class AdParams(YandexMusicObject):
|
class AdParams(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, StationResult
|
from yandex_music import Client, StationResult
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Dashboard(YandexMusicObject):
|
class Dashboard(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Value
|
from yandex_music import Client, Value
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class DiscreteScale(YandexMusicObject):
|
class DiscreteScale(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Value
|
from yandex_music import Client, Value
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Enum(YandexMusicObject):
|
class Enum(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Id(YandexMusicObject):
|
class Id(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
from typing import TYPE_CHECKING, Optional, Union
|
from typing import TYPE_CHECKING, Optional, Union
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
from yandex_music import Client
|
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject, Enum, DiscreteScale
|
from yandex_music import YandexMusicObject, Enum, DiscreteScale
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from yandex_music import Client
|
||||||
|
|
||||||
de_json = {
|
de_json = {
|
||||||
'enum': Enum.de_json,
|
'enum': Enum.de_json,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class RotorSettings(YandexMusicObject):
|
class RotorSettings(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Track
|
from yandex_music import Client, Track
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Sequence(YandexMusicObject):
|
class Sequence(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Id, Icon, Restrictions
|
from yandex_music import Client, Id, Icon, Restrictions
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Station(YandexMusicObject):
|
class Station(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Station, RotorSettings, AdParams
|
from yandex_music import Client, Station, RotorSettings, AdParams
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class StationResult(YandexMusicObject):
|
class StationResult(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Id, Sequence
|
from yandex_music import Client, Id, Sequence
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class StationTracksResult(YandexMusicObject):
|
class StationTracksResult(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Value(YandexMusicObject):
|
class Value(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, Union
|
from typing import TYPE_CHECKING, Optional, Union
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject, Artist, Album, Track, Playlist, Video
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject, Artist, Album, Track, Playlist, Video
|
|
||||||
|
|
||||||
|
|
||||||
de_json_result = {
|
de_json_result = {
|
||||||
'track': Track.de_json,
|
'track': Track.de_json,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Best, SearchResult
|
from yandex_music import Client, Best, SearchResult
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Search(YandexMusicObject):
|
class Search(YandexMusicObject):
|
||||||
"""Класс, представляющий результаты поиска.
|
"""Класс, представляющий результаты поиска.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List, Union
|
from typing import TYPE_CHECKING, Optional, List, Union
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject, Artist, Album, Track, Playlist, Video
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject, Artist, Album, Track, Playlist, Video
|
|
||||||
|
|
||||||
|
|
||||||
de_json_result = {
|
de_json_result = {
|
||||||
'track': Track.de_list,
|
'track': Track.de_list,
|
||||||
|
@ -18,24 +18,24 @@ de_json_result = {
|
||||||
class SearchResult(YandexMusicObject):
|
class SearchResult(YandexMusicObject):
|
||||||
"""Класс, представляющий результаты поиска.
|
"""Класс, представляющий результаты поиска.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
total (:obj:`int`): Количество результатов.
|
total (:obj:`int`): Количество результатов.
|
||||||
per_page (:obj:`int`): Максимальное количество результатов на странице.
|
per_page (:obj:`int`): Максимальное количество результатов на странице.
|
||||||
order (:obj:`int`): Позиция блока.
|
order (:obj:`int`): Позиция блока.
|
||||||
results (:obj:`list` из :obj:`yandex_music.Track` | :obj:`yandex_music.Artist` | :obj:`yandex_music.Album` \
|
results (:obj:`list` из :obj:`yandex_music.Track` | :obj:`yandex_music.Artist` | :obj:`yandex_music.Album` \
|
||||||
| :obj:`yandex_music.Playlist` | :obj:`yandex_music.Video`): Результаты поиска.
|
| :obj:`yandex_music.Playlist` | :obj:`yandex_music.Video`): Результаты поиска.
|
||||||
client (:obj:`yandex_music.Client`): Объект класса :class:`yandex_music.Client` представляющий клиент Yandex
|
client (:obj:`yandex_music.Client`): Объект класса :class:`yandex_music.Client` представляющий клиент Yandex
|
||||||
Music.
|
Music.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
total (:obj:`int`): Количество результатов.
|
total (:obj:`int`): Количество результатов.
|
||||||
per_page (:obj:`int`): Максимальное количество результатов на странице.
|
per_page (:obj:`int`): Максимальное количество результатов на странице.
|
||||||
order (:obj:`int`): Позиция блока.
|
order (:obj:`int`): Позиция блока.
|
||||||
results (:obj:`list` из :obj:`yandex_music.Track` | :obj:`yandex_music.Artist` | :obj:`yandex_music.Album` \
|
results (:obj:`list` из :obj:`yandex_music.Track` | :obj:`yandex_music.Artist` | :obj:`yandex_music.Album` \
|
||||||
| :obj:`yandex_music.Playlist` | :obj:`yandex_music.Video`): Результаты поиска.
|
| :obj:`yandex_music.Playlist` | :obj:`yandex_music.Video`): Результаты поиска.
|
||||||
client (:obj:`yandex_music.Client`, optional): Объект класса :class:`yandex_music.Client` представляющий клиент Yandex
|
client (:obj:`yandex_music.Client`, optional): Объект класса :class:`yandex_music.Client` представляющий клиент
|
||||||
Music.
|
Yandex Music.
|
||||||
**kwargs: Произвольные ключевые аргументы полученные от API.
|
**kwargs: Произвольные ключевые аргументы полученные от API.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Best
|
from yandex_music import Client, Best
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Suggestions(YandexMusicObject):
|
class Suggestions(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Product, Price
|
from yandex_music import Client, Product, Price
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Settings(YandexMusicObject):
|
class Settings(YandexMusicObject):
|
||||||
"""Класс, представляющий предложения по покупке.
|
"""Класс, представляющий предложения по покупке.
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, ShotData
|
from yandex_music import Client, ShotData
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Shot(YandexMusicObject):
|
class Shot(YandexMusicObject):
|
||||||
"""Класс, представляющий шот от Алисы.
|
"""Класс, представляющий шот от Алисы.
|
||||||
|
|
||||||
Известные значения поля `status`: `ready`.
|
Note:
|
||||||
|
Известные значения поля `status`: `ready`.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
order (:obj:`int`): Порядковый номер при воспроизведении.
|
order (:obj:`int`): Порядковый номер при воспроизведении.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, ShotType
|
from yandex_music import Client, ShotType
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class ShotData(YandexMusicObject):
|
class ShotData(YandexMusicObject):
|
||||||
"""Класс, представляющий основную информацию о шоте.
|
"""Класс, представляющий основную информацию о шоте.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Shot
|
from yandex_music import Client, Shot
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class ShotEvent(YandexMusicObject):
|
class ShotEvent(YandexMusicObject):
|
||||||
"""Класс, представляющий событие-шот перед началом следующего трека.
|
"""Класс, представляющий событие-шот перед началом следующего трека.
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class ShotType(YandexMusicObject):
|
class ShotType(YandexMusicObject):
|
||||||
"""Класс, представляющий тип шота от Алисы.
|
"""Класс, представляющий тип шота от Алисы.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
id_ (:obj:`str`): Уникальный идентификатор типа.
|
id (:obj:`str`): Уникальный идентификатор типа.
|
||||||
title (:obj:`str`): Заголовок шота.
|
title (:obj:`str`): Заголовок шота.
|
||||||
client (:obj:`yandex_music.Client`): Объект класса :class:`yandex_music.Client` представляющий клиент Yandex
|
client (:obj:`yandex_music.Client`): Объект класса :class:`yandex_music.Client` представляющий клиент Yandex
|
||||||
Music.
|
Music.
|
||||||
|
@ -28,11 +28,11 @@ class ShotType(YandexMusicObject):
|
||||||
title: str,
|
title: str,
|
||||||
client: Optional['Client'] = None,
|
client: Optional['Client'] = None,
|
||||||
**kwargs):
|
**kwargs):
|
||||||
self.id_ = id_
|
self.id = id_
|
||||||
self.title = title
|
self.title = title
|
||||||
|
|
||||||
self.client = client
|
self.client = client
|
||||||
self._id_attrs = (self.id_, self.title)
|
self._id_attrs = (self.id, self.title)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def de_json(cls, data: dict, client: 'Client') -> Optional['ShotType']:
|
def de_json(cls, data: dict, client: 'Client') -> Optional['ShotType']:
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Lyrics(YandexMusicObject):
|
class Lyrics(YandexMusicObject):
|
||||||
"""Класс, представляющий текст трека.
|
"""Класс, представляющий текст трека.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Lyrics, VideoSupplement
|
from yandex_music import Client, Lyrics, VideoSupplement
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Supplement(YandexMusicObject):
|
class Supplement(YandexMusicObject):
|
||||||
"""Класс, представляющий дополнительную информацию о треке.
|
"""Класс, представляющий дополнительную информацию о треке.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class VideoSupplement(YandexMusicObject):
|
class VideoSupplement(YandexMusicObject):
|
||||||
"""Класс, представляющий видеоклипы.
|
"""Класс, представляющий видеоклипы.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Major(YandexMusicObject):
|
class Major(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client
|
from yandex_music import Client
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Normalization(YandexMusicObject):
|
class Normalization(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List, Union
|
from typing import TYPE_CHECKING, Optional, List, Union
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Normalization, Major, Album, Artist, Supplement, DownloadInfo
|
from yandex_music import Client, Normalization, Major, Album, Artist, Supplement, DownloadInfo
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class Track(YandexMusicObject):
|
class Track(YandexMusicObject):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
|
@ -88,7 +88,7 @@ class Track(YandexMusicObject):
|
||||||
def download_og_image(self, filename: str, size: str = '200x200') -> None:
|
def download_og_image(self, filename: str, size: str = '200x200') -> None:
|
||||||
"""Загрузка обложки.
|
"""Загрузка обложки.
|
||||||
|
|
||||||
Предпочтительнее использовать self.download_cover().
|
Предпочтительнее использовать `self.download_cover()`.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
filename (:obj:`str`): Путь для сохранения файла с названием и расширением.
|
filename (:obj:`str`): Путь для сохранения файла с названием и расширением.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Optional, List
|
from typing import TYPE_CHECKING, Optional, List
|
||||||
|
|
||||||
|
from yandex_music import YandexMusicObject
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from yandex_music import Client, Track
|
from yandex_music import Client, Track
|
||||||
|
|
||||||
from yandex_music import YandexMusicObject
|
|
||||||
|
|
||||||
|
|
||||||
class SimilarTracks(YandexMusicObject):
|
class SimilarTracks(YandexMusicObject):
|
||||||
"""Класс, представляющий список похожих треков на другой трек.
|
"""Класс, представляющий список похожих треков на другой трек.
|
||||||
|
|
変更されたファイルが多すぎるため、一部のファイルは表示されません さらに表示
読み込み中…
新しいイシューから参照