yandex_music.account.alert#

class yandex_music.account.alert.Alert(alert_id: str, text: str, bg_color: str, text_color: str, alert_type: str, button: AlertButton, close_button: bool, client: Optional[Client] = None)#

Bases: YandexMusicObject

Класс, представляющий блок с предупреждением.

Note

Данные предупреждения, скорее всего, только обкатываются. У них нет ID, вместо этого xxx, а еще присутствуют слова “тест” в тексте.

Используют как предупреждение о конце подписки, так и о раздаче подарков.

alert_id#

Уникальный идентификатор.

Type

str

text#

Текст предупреждения.

Type

str

bg_color#

Цвет заднего фона.

Type

str

text_color#

Цвет текста.

Type

str

alert_type#

Тип предупреждения.

Type

str

button#

Кнопка с ссылкой.

Type

yandex_music.AlertButton

close_button#

Наличие кнопки “Закрыть”.

Type

bool

client#

Клиент Yandex Music.

Type

yandex_music.Client, optional

alert_id: str#
alert_type: str#
bg_color: str#
button: AlertButton#
client: Optional[Client] = None#
close_button: bool#
classmethod de_json(data: dict, client: Client) Optional[Alert]#

Десериализация объекта.

Parameters
  • data (dict) – Поля и значения десериализуемого объекта.

  • client (yandex_music.Client, optional) – Клиент Yandex Music.

Returns

Сообщение о статусе подписки.

Return type

yandex_music.Alert

text: str#
text_color: str#