Migrate ym-dl from custom oapi-codegen Yandex Music API client to external gitea.mrixs.me/Mrixs/yandex-music-api-go library with token-only authentication. Key changes: - Replace custom Yandex API client with yandexmusic library wrapper - Token-based OAuth authentication only (no username/password fallback) - SQLite storage index with JSON index migration path - Extended ID3 tag support: genre, comment, lyrics, publisher, ISRC, copyright - High-resolution album covers (1000x1000) - Fixed album download check (requires all tracks, not just one)
4285 lines
124 KiB
YAML
4285 lines
124 KiB
YAML
openapi: 3.0.1
|
||
info:
|
||
title: Yandex Music Api
|
||
description: "Swagger документация для Yandex Music API. Не для всех аккаунтов работает авторизация по логину и паролю, в этом случае необходимо использовать авторизацию с помощью токена."
|
||
version: 0.0.1
|
||
servers:
|
||
- url: https://api.music.yandex.ru:443/
|
||
- url: https://api.music.yandex.net:443/
|
||
- url: http://api.music.yandex.net:443/
|
||
tags:
|
||
- name: "user"
|
||
- name: "tracks"
|
||
- name: "albums"
|
||
- name: "playlists"
|
||
- name: "landing"
|
||
- name: "artists"
|
||
- name: "rotor"
|
||
- name: "tags"
|
||
|
||
paths:
|
||
/token:
|
||
servers:
|
||
- url: https://oauth.yandex.ru
|
||
post:
|
||
summary: Получение токена по логину и паролю
|
||
operationId: getToken
|
||
tags:
|
||
- "user"
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/x-www-form-urlencoded:
|
||
schema:
|
||
type: object
|
||
required:
|
||
- "grant_type"
|
||
- "client_id"
|
||
- "client_secret"
|
||
- "username"
|
||
- "password"
|
||
properties:
|
||
grant_type:
|
||
type: string
|
||
enum: ["password"]
|
||
client_id:
|
||
type: string
|
||
enum: ["23cabbbdc6cd418abb4b39c32c41195d"]
|
||
client_secret:
|
||
type: string
|
||
enum: ["53bc75238f0c4d08a118e51fe9203300"]
|
||
username:
|
||
type: string
|
||
password:
|
||
type: string
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
required:
|
||
- "access_token"
|
||
- "expires_in"
|
||
- "token_type"
|
||
- "uid"
|
||
properties:
|
||
access_token:
|
||
type: string
|
||
expires_in:
|
||
type: number
|
||
token_type:
|
||
type: string
|
||
uid:
|
||
type: number
|
||
|
||
/settings:
|
||
description: Получение предложений по покупке. Нет обязательных параметров
|
||
get:
|
||
operationId: getSettings
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
$ref: "#/components/schemas/Settings"
|
||
|
||
/permission-alerts:
|
||
description: Получение оповещений. Нет обязательных параметров.
|
||
get:
|
||
operationId: getPermissionAlerts
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
$ref: "#/components/schemas/PermissionAlerts"
|
||
|
||
/account/experiments:
|
||
description: Получение значений экспериментальных функций аккаунта
|
||
get:
|
||
operationId: getAccountExperiments
|
||
tags:
|
||
- account
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
$ref: "#/components/schemas/Experiments"
|
||
|
||
/account/consume-promo-code:
|
||
description: Активация промо-кода
|
||
post:
|
||
operationId: activatePromoCode
|
||
tags:
|
||
- account
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/x-www-form-urlencoded:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
code:
|
||
type: string
|
||
language:
|
||
type: string
|
||
example: en
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
$ref: "#/components/schemas/PromoCodeStatus"
|
||
|
||
/feed/wizard/is-passed:
|
||
get:
|
||
#TODO: add operationId
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
properties:
|
||
isWizardPassed:
|
||
type: boolean
|
||
example: true
|
||
|
||
/account/settings:
|
||
description: Настройки текущего пользователя
|
||
get:
|
||
operationId: getAccountSettings
|
||
summary: Получение настроек текущего пользователя
|
||
tags:
|
||
- account
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
$ref: "#/components/schemas/UserSettings"
|
||
post:
|
||
operationId: changeAccountSettings
|
||
summary: Изменение настроек текущего пользователя
|
||
tags:
|
||
- account
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/x-www-form-urlencoded:
|
||
schema:
|
||
description: Словарь параметров и значений
|
||
type: object
|
||
additionalProperties: true
|
||
example:
|
||
theme: "black"
|
||
volumePercents: 80
|
||
adsDisabled: true
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
description: Настройки пользователя или "None"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
oneOf:
|
||
- $ref: "#/components/schemas/UserSettings"
|
||
- type: string
|
||
example: "None"
|
||
400:
|
||
description: Bad Request
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/BadRequest"
|
||
|
||
/account/status:
|
||
description: Get account status for current user
|
||
get:
|
||
operationId: getAccountStatus
|
||
tags:
|
||
- "account"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
$ref: "#/components/schemas/Status"
|
||
400:
|
||
description: Bad Request
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/BadRequest"
|
||
/feed:
|
||
get:
|
||
operationId: getFeed
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required: [invocationInfo, result]
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
required:
|
||
- canGetMoreEvents
|
||
- days
|
||
- generatedPlaylists
|
||
- headlines
|
||
- isWizardPassed
|
||
- pumpkin
|
||
- today
|
||
properties:
|
||
canGetMoreEvents:
|
||
type: boolean
|
||
days:
|
||
type: array
|
||
items:
|
||
type: object
|
||
generatedPlaylists:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/GeneratedPlaylistLandingBlock"
|
||
headlines:
|
||
type: array
|
||
items:
|
||
type: object
|
||
isWizardPassed:
|
||
type: boolean
|
||
pumpkin:
|
||
type: boolean
|
||
today:
|
||
type: string
|
||
|
||
/tags/{tagId}/playlist-ids:
|
||
summary: Получение тега (подборки)
|
||
parameters:
|
||
- in: path
|
||
name: tagId
|
||
schema:
|
||
type: string
|
||
required: true
|
||
example: "rock"
|
||
get:
|
||
operationId: getPlaylistsIdsByTag
|
||
tags:
|
||
- "tags"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
$ref: "#/components/schemas/TagResult"
|
||
|
||
/albums/{albumId}/:
|
||
parameters:
|
||
- in: path
|
||
name: albumId
|
||
schema:
|
||
type: number
|
||
required: true
|
||
example: 7019818
|
||
get:
|
||
operationId: getAlbumById
|
||
summary: Получение альбома по идентификатору
|
||
tags:
|
||
- "albums"
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
$ref: "#/components/schemas/Album"
|
||
|
||
/albums/{albumId}/with-tracks:
|
||
parameters:
|
||
- in: path
|
||
name: albumId
|
||
schema:
|
||
type: number
|
||
required: true
|
||
example: 7019818
|
||
get:
|
||
summary: Получение альбома с треками
|
||
operationId: getAlbumsWithTracks
|
||
tags:
|
||
- "albums"
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
$ref: "#/components/schemas/Album"
|
||
|
||
/albums:
|
||
post:
|
||
summary: Получение альбомов по идентификаторам
|
||
operationId: getAlbumsByIds
|
||
tags:
|
||
- "albums"
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/x-www-form-urlencoded:
|
||
schema:
|
||
type: object
|
||
required: ["album-ids"]
|
||
properties:
|
||
"album-ids":
|
||
type: string
|
||
example: "18837614,23899279,23754447,21808509,23529901,22231572,10935745,23342620,23190604,23240656"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/Album"
|
||
|
||
/landing3:
|
||
parameters:
|
||
- in: query
|
||
name: blocks
|
||
schema:
|
||
type: string
|
||
description: Одно или несколько значений блоков, разделенных запятой "promotions","new-releases","new-playlists","mixes","chart","playlists","play_contexts","podcasts"
|
||
examples:
|
||
single:
|
||
value: "new-releases"
|
||
all:
|
||
value: "personalplaylists,promotions,new-releases,new-playlists,mixes,chart,artists,albums,playlists,play_contexts,podcasts"
|
||
get:
|
||
operationId: getLandingBlocks
|
||
tags:
|
||
- "landing"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
$ref: "#/components/schemas/LandingResult"
|
||
headers:
|
||
"X-Yandex-Music-Device":
|
||
schema:
|
||
type: string
|
||
description: Данные заголовок использует Windows приложение Yandex.Music, если пользователь не авторизован
|
||
example: "os=unknown; os_version=unknown; manufacturer=unknown; model=unknown; clid=; device_id=unknown; uuid=unknown"
|
||
|
||
/landing3/{landingBlock}:
|
||
parameters:
|
||
- in: path
|
||
name: landingBlock
|
||
required: true
|
||
schema:
|
||
type: string
|
||
enum: ["new-playlists", "new-releases", "chart", "podcasts"]
|
||
get:
|
||
operationId: getLandingBlock
|
||
tags:
|
||
- "landing"
|
||
responses:
|
||
200:
|
||
description: ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
|
||
/landing3/new-releases:
|
||
get:
|
||
operationId: getNewReleases
|
||
tags:
|
||
- "landing"
|
||
responses:
|
||
200:
|
||
description: ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
required: [id, type, typeForFrom, title, newReleases]
|
||
properties:
|
||
id:
|
||
type: string
|
||
type:
|
||
type: string
|
||
enum: [new-releases]
|
||
typeForFrom:
|
||
type: string
|
||
title:
|
||
type: string
|
||
newReleases:
|
||
type: array
|
||
items:
|
||
type: number
|
||
|
||
/landing3/podcasts:
|
||
get:
|
||
operationId: getNewPodcasts
|
||
tags:
|
||
- "landing"
|
||
responses:
|
||
200:
|
||
description: ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
required: [type, typeForFrom, title, podcasts]
|
||
properties:
|
||
type:
|
||
type: string
|
||
enum: [non-music_main_podcasts]
|
||
typeForFrom:
|
||
type: string
|
||
title:
|
||
type: string
|
||
podcasts:
|
||
type: array
|
||
items:
|
||
type: number
|
||
|
||
/landing3/new-playlists:
|
||
get:
|
||
operationId: getNewPlaylists
|
||
tags:
|
||
- "landing"
|
||
responses:
|
||
200:
|
||
description: ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
required: [id, type, typeForFrom, title, newPlaylists]
|
||
properties:
|
||
id:
|
||
type: string
|
||
type:
|
||
type: string
|
||
enum: [new-playlists]
|
||
typeForFrom:
|
||
type: string
|
||
title:
|
||
type: string
|
||
newPlaylists:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/NewPlaylistItem"
|
||
|
||
/landing3/chart/{chartType}:
|
||
parameters:
|
||
- in: path
|
||
name: chartType
|
||
required: true
|
||
schema:
|
||
type: string
|
||
enum: ["russia", "world"]
|
||
get:
|
||
operationId: getChart
|
||
tags:
|
||
- "landing"
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
$ref: "#/components/schemas/FullChartResult"
|
||
|
||
/genres:
|
||
get:
|
||
operationId: getGenres
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/Genre"
|
||
|
||
/playlists/list:
|
||
post:
|
||
summary: Получение полной информации о плейлистах по их идентификатору
|
||
operationId: getPlaylistsByIds
|
||
tags:
|
||
- "playlists"
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/x-www-form-urlencoded:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
playlistIds:
|
||
type: array
|
||
description: uid владельца плейлиста и kind плейлиста через двоеточие и запятую
|
||
example:
|
||
- "103372440:1878"
|
||
- "460140864:1000"
|
||
items:
|
||
type: string
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/Playlist"
|
||
400:
|
||
description: Bad Request
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/BadRequest"
|
||
|
||
/users/{userId}/playlists/list:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: userId
|
||
description: Идентификатор пользователя
|
||
schema:
|
||
type: number
|
||
example: 541320800
|
||
get:
|
||
operationId: getPlayLists
|
||
summary: Получение списка плейлистов пользователя.
|
||
tags:
|
||
- "user"
|
||
- "playlists"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/Playlist"
|
||
405:
|
||
description: "Method Not Allowed"
|
||
content: {}
|
||
|
||
/users/{userId}/dislikes/tracks:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: userId
|
||
description: Идентификатор пользователя
|
||
schema:
|
||
type: number
|
||
example: 541320800
|
||
- in: query
|
||
required: false
|
||
name: if_modified_since_revision
|
||
description: TODO
|
||
schema:
|
||
type: number
|
||
get:
|
||
operationId: getDislikedTracksIds
|
||
summary: Получение треков с отметкой "Не рекомендовать"
|
||
tags:
|
||
- "user"
|
||
- "tracks"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
$ref: "#/components/schemas/TracksList"
|
||
/search:
|
||
parameters:
|
||
- in: query
|
||
name: text
|
||
required: true
|
||
description: Текст запроса
|
||
schema:
|
||
type: string
|
||
example: Король и Шут
|
||
- in: query
|
||
name: page
|
||
required: true
|
||
description: Номер страницы выдачи
|
||
schema:
|
||
type: number
|
||
example: 0
|
||
- in: query
|
||
name: type
|
||
required: true
|
||
schema:
|
||
$ref: "#/components/schemas/SearchType"
|
||
- in: query
|
||
name: nococrrect
|
||
schema:
|
||
type: boolean
|
||
default: false
|
||
get:
|
||
tags:
|
||
- "search"
|
||
operationId: "search"
|
||
summary: Осуществление поиска по запросу и типу, получение результатов
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
$ref: "#/components/schemas/Search"
|
||
|
||
/search/suggest:
|
||
parameters:
|
||
- in: query
|
||
required: true
|
||
name: part
|
||
description: Часть поискового запроса
|
||
schema:
|
||
type: string
|
||
example: Король
|
||
get:
|
||
# TODO: add operationId
|
||
tags:
|
||
- "search"
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
$ref: "#/components/schemas/Suggestions"
|
||
|
||
/users/{userId}/playlists/{kind}:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: userId
|
||
description: Идентификатор пользователя
|
||
schema:
|
||
type: number
|
||
example: 541320800
|
||
- in: path
|
||
required: true
|
||
name: kind
|
||
description: Идентификатор плейлиста
|
||
schema:
|
||
type: number
|
||
example: 1000
|
||
get:
|
||
operationId: getPlaylistById
|
||
summary: Получение плейлиста по уникальному идентификатору
|
||
tags:
|
||
- "user"
|
||
- "playlists"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
$ref: "#/components/schemas/Playlist"
|
||
|
||
/users/{userId}/playlists:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: userId
|
||
description: Идентификатор пользователя
|
||
schema:
|
||
type: number
|
||
example: 541320800
|
||
- in: query
|
||
required: true
|
||
name: kinds
|
||
schema:
|
||
type: string
|
||
example: "1000,1003"
|
||
- in: query
|
||
required: true
|
||
name: mixed
|
||
schema:
|
||
type: boolean
|
||
example: false
|
||
- in: query
|
||
required: true
|
||
name: rich-tracks
|
||
schema:
|
||
type: boolean
|
||
example: false
|
||
get:
|
||
operationId: getUserPlaylistsByIds
|
||
summary: Получение плейлистов по идентификаторам
|
||
tags:
|
||
- "user"
|
||
- "playlists"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/Playlist"
|
||
|
||
/users/{userId}/playlists/create:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: userId
|
||
description: Идентификатор пользователя
|
||
schema:
|
||
type: number
|
||
example: 541320800
|
||
post:
|
||
operationId: createPlaylist
|
||
tags:
|
||
- "user"
|
||
- "playlists"
|
||
summary: Создание нового плейлиста
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/x-www-form-urlencoded:
|
||
schema:
|
||
type: object
|
||
required:
|
||
- "title"
|
||
- "visibility"
|
||
properties:
|
||
title:
|
||
type: string
|
||
visibility:
|
||
$ref: "#/components/schemas/VisibilityEnum"
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
$ref: "#/components/schemas/Playlist"
|
||
400:
|
||
description: Bad Request
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/BadRequest"
|
||
401:
|
||
description: Unauthorized
|
||
|
||
/users/{userId}/playlists/{kind}/name:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: userId
|
||
description: Идентификатор пользователя
|
||
schema:
|
||
type: number
|
||
example: 541320800
|
||
- in: path
|
||
required: true
|
||
name: kind
|
||
description: Идентификатор плейлиста
|
||
schema:
|
||
type: number
|
||
example: 1000
|
||
post:
|
||
operationId: renamePlaylist
|
||
summary: Изменение названия плейлиста.
|
||
tags:
|
||
- "user"
|
||
- "playlists"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/x-www-form-urlencoded:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
value:
|
||
type: string
|
||
example: new-name
|
||
responses:
|
||
200:
|
||
description: Изменение видимости плейлиста
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
$ref: "#/components/schemas/Playlist"
|
||
|
||
/users/{userId}/playlists/{kind}/delete:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: userId
|
||
description: Идентификатор пользователя
|
||
schema:
|
||
type: number
|
||
example: 541320800
|
||
- in: path
|
||
required: true
|
||
name: kind
|
||
description: Идентификатор плейлиста
|
||
schema:
|
||
type: number
|
||
example: 1000
|
||
post:
|
||
operationId: deletePlaylist
|
||
summary: Удаление плейлиста
|
||
tags:
|
||
- "user"
|
||
- "playlists"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: string
|
||
|
||
/users/{userId}/playlists/{kind}/change-relative:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: userId
|
||
description: Идентификатор пользователя
|
||
schema:
|
||
type: number
|
||
example: 541320800
|
||
- in: path
|
||
required: true
|
||
name: kind
|
||
description: Идентификатор плейлиста
|
||
schema:
|
||
type: number
|
||
example: 1000
|
||
post:
|
||
operationId: changePlaylistTracks
|
||
summary: Добавление треков в плейлист
|
||
description: Используй '{"diff":{"op":"insert","at":0,"tracks":[{"id":"20599729","albumId":"2347459"}]}}' - для добавления, {"diff":{"op":"delete","from":0,"to":1,"tracks":[{"id":"20599729","albumId":"2347459"}]}} - для удаления треков
|
||
tags:
|
||
- "user"
|
||
- "playlists"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/x-www-form-urlencoded:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
diff:
|
||
type: string
|
||
revision:
|
||
type: string
|
||
example: "0"
|
||
examples:
|
||
insert:
|
||
value:
|
||
diff: '{"diff":{"op":"insert","at":0,"tracks":[{"id":"20599729","albumId":"2347459"}]}}'
|
||
revision: "0"
|
||
remove:
|
||
value:
|
||
diff: '{"diff":{"op":"delete","from":0,"to":1,"tracks":[{"id":"20599729","albumId":"2347459"}]}}'
|
||
revision: "0"
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
$ref: "#/components/schemas/Playlist"
|
||
412:
|
||
description: Wrong revision or Failed to patch current playlist
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
name:
|
||
type: string
|
||
message:
|
||
type: string
|
||
|
||
/users/{userId}/playlists/{kind}/recommendations:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: userId
|
||
description: Идентификатор пользователя
|
||
schema:
|
||
type: number
|
||
example: 541320800
|
||
- in: path
|
||
required: true
|
||
name: kind
|
||
description: Идентификатор плейлиста
|
||
schema:
|
||
type: number
|
||
example: 1000
|
||
get:
|
||
operationId: getRecommendations
|
||
summary: Получение рекомендаций для плейлиста
|
||
tags:
|
||
- "user"
|
||
- "playlists"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
$ref: "#/components/schemas/PlaylistRecommendations"
|
||
|
||
/users/{userId}/playlists/{kind}/visibility:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: userId
|
||
description: Идентификатор пользователя
|
||
schema:
|
||
type: number
|
||
example: 541320800
|
||
- in: path
|
||
required: true
|
||
name: kind
|
||
description: Идентификатор плейлиста
|
||
schema:
|
||
type: number
|
||
example: 1000
|
||
post:
|
||
operationId: changePlaylistVisibility
|
||
summary: Изменение видимости плейлиста
|
||
description: Необходимо передать "public" или "private" в качестве значения
|
||
tags:
|
||
- "user"
|
||
- "playlists"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/x-www-form-urlencoded:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
value:
|
||
$ref: "#/components/schemas/VisibilityEnum"
|
||
responses:
|
||
200:
|
||
description: Изменение видимости плейлиста
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
$ref: "#/components/schemas/Playlist"
|
||
400:
|
||
description: Bad Request
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/BadRequest"
|
||
|
||
/users/{userId}/likes/tracks/add-multiple:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: userId
|
||
description: Идентификатор пользователя
|
||
schema:
|
||
type: number
|
||
example: 541320800
|
||
post:
|
||
operationId: likeTracks
|
||
summary: Пометить треки как "Мне нравится"
|
||
tags:
|
||
- "user"
|
||
- "tracks"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/x-www-form-urlencoded:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
"track-ids":
|
||
type: array
|
||
items:
|
||
type: string
|
||
example: [7019818, 29238706, 83063895]
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
properties:
|
||
revision:
|
||
type: number
|
||
401:
|
||
description: Unauthorized
|
||
content: {}
|
||
|
||
/users/{userId}/likes/tracks/remove:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: userId
|
||
description: Идентификатор пользователя
|
||
schema:
|
||
type: number
|
||
example: 541320800
|
||
post:
|
||
operationId: removeLikedTracks
|
||
summary: Удаление треков из списка "Мне нравится"
|
||
tags:
|
||
- "user"
|
||
- "tracks"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/x-www-form-urlencoded:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
"track-ids":
|
||
type: array
|
||
items:
|
||
type: string
|
||
example: [7019818, 29238706, 83063895]
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content: {}
|
||
401:
|
||
description: Unauthorized
|
||
content: {}
|
||
|
||
/users/{userId}/likes/tracks:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: userId
|
||
description: Идентификатор пользователя
|
||
schema:
|
||
type: number
|
||
example: 541320800
|
||
get:
|
||
operationId: getLikedTracksIds
|
||
summary: Получение треков с отметкой "Мне нравится"
|
||
tags:
|
||
- "user"
|
||
- "tracks"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
required: [library]
|
||
properties:
|
||
library:
|
||
$ref: "#/components/schemas/TracksList"
|
||
404:
|
||
description: Not Found
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
properties:
|
||
name:
|
||
type: string
|
||
message:
|
||
type: string
|
||
|
||
/tracks/:
|
||
post:
|
||
operationId: getTracks
|
||
summary: Получение треков
|
||
tags:
|
||
- "tracks"
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/x-www-form-urlencoded:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
"track-ids":
|
||
description: Уникальные идентификаторы треков
|
||
type: array
|
||
items:
|
||
type: string
|
||
example: [7019818, 29238706]
|
||
"with-positions":
|
||
description: С позициями
|
||
type: boolean
|
||
example: false
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/Track"
|
||
400:
|
||
description: Bad Request
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/BadRequest"
|
||
|
||
/tracks/{trackId}/download-info:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: trackId
|
||
schema:
|
||
type: string
|
||
example: "78550148"
|
||
get:
|
||
operationId: getDownloadInfo
|
||
summary: Получение информации о доступных вариантах загрузки трека.
|
||
tags:
|
||
- "tracks"
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: array
|
||
items:
|
||
type: object
|
||
$ref: "#/components/schemas/TrackDownloadInfo"
|
||
|
||
/tracks/{trackId}/supplement:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: trackId
|
||
schema:
|
||
type: string
|
||
example: 32326555
|
||
get:
|
||
operationId: getTrackSupplement
|
||
description: Получение дополнительной информации о треке (Текст песни, видео, и т.д.).
|
||
summary: Получение дополнительной информации о треке (Текст песни, видео, и т.д.).
|
||
tags:
|
||
- "tracks"
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
$ref: "#/components/schemas/Supplement"
|
||
|
||
/tracks/{trackId}/similar:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: trackId
|
||
schema:
|
||
type: string
|
||
example: 32326555
|
||
get:
|
||
operationId: getSimilarTracks
|
||
summary: Получение похожих треков
|
||
description: Получение похожих треков
|
||
tags:
|
||
- tracks
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
$ref: "#/components/schemas/SimilarTracks"
|
||
|
||
/tracks/{trackId}/lyrics:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: trackId
|
||
schema:
|
||
type: string
|
||
- in: query
|
||
required: false
|
||
name: format
|
||
schema:
|
||
type: string
|
||
- in: query
|
||
required: false
|
||
name: timeStamp
|
||
schema:
|
||
type: string
|
||
- in: query
|
||
required: false
|
||
name: sign
|
||
schema:
|
||
type: string
|
||
get:
|
||
operationId: getTrackLyrics
|
||
summary: Получение текста песни с таймкодами
|
||
tags:
|
||
- tracks
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
# $ref: "#/components/schemas/SimilarTracks"
|
||
/play-audio:
|
||
post:
|
||
summary: Метод для отправки текущего состояния прослушиваемого трека
|
||
operationId: playAudio
|
||
tags:
|
||
- tracks
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/x-www-form-urlencoded:
|
||
schema:
|
||
required:
|
||
- from
|
||
type: object
|
||
properties:
|
||
track-id:
|
||
description: Уникальный идентификатор трека
|
||
type: string
|
||
from-cache:
|
||
type: boolean
|
||
description: Проигрывается ли трек из кеша
|
||
from:
|
||
type: string
|
||
description: Наименования клиента с которого происходит прослушивание
|
||
play-id:
|
||
type: string
|
||
description: Уникальный идентификатор проигрывания
|
||
uid:
|
||
type: number
|
||
description: Уникальный идентификатор пользователя
|
||
timestamp:
|
||
type: string
|
||
description: Текущая дата и время в ISO
|
||
example: "2021-03-17T18:13:40.000+00:00"
|
||
track-length-seconds:
|
||
type: number
|
||
description: Продолжительность трека в секундах
|
||
total-played-seconds:
|
||
type: number
|
||
description: Продолжительность трека в секундах
|
||
end-position-seconds:
|
||
type: number
|
||
description: Продолжительность трека в секундах
|
||
album-id:
|
||
description: Уникальный идентификатор альбома
|
||
type: string
|
||
playlist-id:
|
||
type: string
|
||
description: Уникальный идентификатор проигрывания
|
||
client-now:
|
||
type: string
|
||
description: Текущая дата и время клиента в ISO
|
||
example: "2021-03-17T18:13:40.000+00:00"
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
description: Возвращает строку "ok" при успешном выполнении запроса
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: string
|
||
example: ok
|
||
400:
|
||
description: Bad Request
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/BadRequest"
|
||
|
||
/artists/{artistId}/track-ids-by-rating:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: artistId
|
||
schema:
|
||
type: string
|
||
example: 218099
|
||
get:
|
||
summary: Получение популярных треков для артиста
|
||
operationId: getPopularTracks
|
||
tags:
|
||
- "artists"
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
required: [artist, tracks]
|
||
properties:
|
||
artist:
|
||
$ref: "#/components/schemas/Artist"
|
||
tracks:
|
||
type: array
|
||
items:
|
||
type: string
|
||
|
||
/artists/{artistId}/brief-info:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: artistId
|
||
schema:
|
||
type: string
|
||
example: 218099
|
||
get:
|
||
# TODO: add operationId
|
||
tags:
|
||
- "artists"
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content: {}
|
||
|
||
/artists/{artistId}/tracks:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: artistId
|
||
schema:
|
||
type: string
|
||
example: 218099
|
||
- in: query
|
||
required: false
|
||
name: page
|
||
schema:
|
||
type: number
|
||
example: 0
|
||
- in: query
|
||
required: false
|
||
name: page-size
|
||
schema:
|
||
type: number
|
||
example: 20
|
||
get:
|
||
operationId: getArtistTracks
|
||
tags:
|
||
- "artists"
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content: {}
|
||
|
||
/artists/{artistId}/direct-albums:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: artistId
|
||
schema:
|
||
type: string
|
||
example: 218099
|
||
- in: query
|
||
required: false
|
||
name: page
|
||
schema:
|
||
type: number
|
||
example: 0
|
||
- in: query
|
||
required: false
|
||
name: page-size
|
||
schema:
|
||
type: number
|
||
example: 20
|
||
- in: query
|
||
required: false
|
||
name: sort-by
|
||
schema:
|
||
type: string
|
||
enum:
|
||
- "year"
|
||
- "rating"
|
||
get:
|
||
# TODO: add operationId
|
||
tags:
|
||
- "artists"
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content: {}
|
||
|
||
/rotor/station/{stationId}/info:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: stationId
|
||
description: "ID радиостанции, для примера: user:onyourwave это моя волна"
|
||
schema:
|
||
type: string
|
||
example: user:onyourwave
|
||
get:
|
||
operationId: getStationInfo
|
||
summary: "Получение информации о станции и пользовательских настроек на неё"
|
||
tags:
|
||
- "rotor"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/Station"
|
||
|
||
/rotor/station/{stationId}/tracks:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: stationId
|
||
description: "ID радиостанции, для примера: user:onyourwave это моя волна"
|
||
schema:
|
||
type: string
|
||
example: user:onyourwave
|
||
- in: query
|
||
required: false
|
||
name: settings2
|
||
description: "Использовать ли второй набор настроек. Все официальные клиенты выполняют запросы с `settings2 = True`."
|
||
schema:
|
||
type: boolean
|
||
example: true
|
||
- in: query
|
||
required: false
|
||
name: queue
|
||
description: "Уникальной идентификатор трека, который только что был."
|
||
schema:
|
||
type: string
|
||
get:
|
||
operationId: getStationTracks
|
||
summary: "Получение цепочки треков определённой станции"
|
||
tags:
|
||
- "rotor"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
$ref: "#/components/schemas/StationTracksResult"
|
||
400:
|
||
description: Bad Request
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/BadRequest"
|
||
|
||
/rotor/account/status:
|
||
get:
|
||
# TODO: add operationId
|
||
summary: "Получение статуса пользователя с дополнителными полями"
|
||
tags:
|
||
- "rotor"
|
||
- "account"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content: {}
|
||
400:
|
||
description: Bad Request
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: "#/components/schemas/BadRequest"
|
||
|
||
/rotor/stations/list:
|
||
parameters:
|
||
- in: query
|
||
required: false
|
||
name: language
|
||
description: "Язык, на котором будет информация о станциях"
|
||
schema:
|
||
type: string
|
||
example: ru
|
||
get:
|
||
operationId: getStationsList
|
||
summary: "Получение всех радиостанций с настройками пользователя"
|
||
tags:
|
||
- "rotor"
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/StationResult"
|
||
|
||
/rotor/stations/dashboard:
|
||
get:
|
||
operationId: getRotorStationsDashboard
|
||
summary: "Получение рекомендованных станций текущего пользователя"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
tags:
|
||
- "rotor"
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/Dashboard"
|
||
|
||
/rotor/station/{stationId}/feedback:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: stationId
|
||
description: Станция
|
||
schema:
|
||
type: string
|
||
example: user:onyourwave
|
||
post:
|
||
operationId: sendStationFeedback
|
||
summary: "Отправка ответной реакции на происходящее при прослушивании радио. Сообщения о начале прослушивания радио, начале и конце трека, его пропуска."
|
||
tags:
|
||
- "rotor"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
parameters:
|
||
- in: query
|
||
description: Уникальный идентификатор партии треков. Возвращается при получении треков. Должен отсутствовать, для типа 'radioStarted'
|
||
name: 'batch-id'
|
||
schema:
|
||
type: string
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
required:
|
||
- "type"
|
||
properties:
|
||
type:
|
||
description: Тип отправляемого фидбека
|
||
type: string
|
||
enum:
|
||
- radioStarted
|
||
- trackStarted
|
||
- trackFinished
|
||
- skip
|
||
timestamp:
|
||
description: Текущее время и дата
|
||
type: string
|
||
example: "2023-02-26T09:41:23"
|
||
from:
|
||
description: Откуда начато воспроизведение радио
|
||
type: string
|
||
example: mobile-radio-user-onyourwave
|
||
trackId:
|
||
type: string
|
||
description: Уникальной идентификатор трека
|
||
example: 56157695:8288161
|
||
totalPlayedSeconds:
|
||
type: number
|
||
description: Сколько было проиграно секунд трека. Необходимо указывать только для типов 'trackFinished' и 'skip'
|
||
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
description: "ok"
|
||
type: string
|
||
|
||
/non-music/calague:
|
||
get:
|
||
operationId: getBooksAndPodcasts
|
||
summary: "Получение блоков книг и подкастов с главной страницы"
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
type: object
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
type: object
|
||
$ref: "#/components/schemas/BooksAndPodcastsResult"
|
||
|
||
/queues:
|
||
parameters:
|
||
- in: header
|
||
required: true
|
||
name: "X-Yandex-Music-Device"
|
||
description: Содержит информацию об устройстве с которого выполняется запрос. Именно к `device` привязывается очередь. На одном устройстве может быть создана одна очередь.
|
||
schema:
|
||
type: string
|
||
example: "os=unknown; os_version=unknown; manufacturer=unknown; model=unknown; clid=; device_id=unknown; uuid=unknown"
|
||
get:
|
||
operationId: getQueues
|
||
summary: Получение всех очередей треков с разных устройств для синхронизации между ними
|
||
tags:
|
||
- queues
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
$ref: "#/components/schemas/QueuesResult"
|
||
/queues/{queueId}:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: queueId
|
||
description: Идентификатор очереди
|
||
schema:
|
||
type: string
|
||
get:
|
||
operationId: getQueueById
|
||
summary: Получение очереди с треками по идентификатору
|
||
tags:
|
||
- queues
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
$ref: "#/components/schemas/QueueItem"
|
||
|
||
/queues/{queueId}/update-position:
|
||
parameters:
|
||
- in: path
|
||
required: true
|
||
name: queueId
|
||
description: Идентификатор очереди
|
||
schema:
|
||
type: string
|
||
- in: query
|
||
required: true
|
||
name: currentIndex
|
||
description: Текущий индекс
|
||
schema:
|
||
type: string
|
||
- in: query
|
||
required: true
|
||
name: IsInteractive
|
||
schema:
|
||
type: boolean
|
||
example: True
|
||
post:
|
||
operationId: updateQueuePosition
|
||
summary: Установка текущего индекса проигрываемого трека в очереди треков
|
||
tags:
|
||
- queues
|
||
security:
|
||
- oAuth: []
|
||
- oAuthProxied: []
|
||
responses:
|
||
200:
|
||
description: Ok
|
||
content:
|
||
application/json:
|
||
schema:
|
||
required:
|
||
- "invocationInfo"
|
||
- "result"
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
result:
|
||
$ref: "#/components/schemas/UpdateQueueResult"
|
||
|
||
components:
|
||
securitySchemes:
|
||
oAuthProxied:
|
||
type: oauth2
|
||
description: Authentication via proxy server to bypass cors
|
||
flows:
|
||
password:
|
||
tokenUrl: https://yandex-music-cors-proxy.onrender.com/https://oauth.yandex.ru/token
|
||
scopes: {}
|
||
oAuth:
|
||
type: oauth2
|
||
description: This API uses OAuth 2 with the implicit grant flow. [More info](https://api.example.com/docs/auth)
|
||
flows:
|
||
password:
|
||
tokenUrl: https://oauth.yandex.ru/token
|
||
scopes: {}
|
||
schemas:
|
||
UserSettings:
|
||
type: object
|
||
properties:
|
||
uid:
|
||
type: number
|
||
lastFmScrobblingEnabled:
|
||
type: boolean
|
||
example: false
|
||
facebookScrobblingEnabled:
|
||
type: boolean
|
||
example: false
|
||
shuffleEnabled:
|
||
type: boolean
|
||
example: false
|
||
addNewTrackOnPlaylistTop:
|
||
type: boolean
|
||
example: false
|
||
volumePercents:
|
||
type: boolean
|
||
example: 75
|
||
userMusicVisibility:
|
||
$ref: "#/components/schemas/VisibilityEnum"
|
||
userSocialVisibility:
|
||
$ref: "#/components/schemas/VisibilityEnum"
|
||
adsDisabled:
|
||
type: boolean
|
||
example: true
|
||
modified:
|
||
type: string
|
||
example: "2019-04-14T14:55:50+00:00"
|
||
rbtDisabled:
|
||
type: string
|
||
theme:
|
||
type: string
|
||
enum:
|
||
- "black"
|
||
- "default"
|
||
description: Тема оформления.
|
||
example: "black"
|
||
promosDisabled:
|
||
type: boolean
|
||
example: true
|
||
autoPlayRadio:
|
||
type: boolean
|
||
example: true
|
||
syncQueueEnabled:
|
||
type: boolean
|
||
example: false
|
||
VisibilityEnum:
|
||
type: string
|
||
enum:
|
||
- "private"
|
||
- "public"
|
||
example: "public"
|
||
InvocationInfo:
|
||
type: object
|
||
required:
|
||
- "exec-duration-millis"
|
||
- "hostname"
|
||
- "req-id"
|
||
properties:
|
||
"exec-duration-millis":
|
||
type: number
|
||
hostname:
|
||
type: string
|
||
"req-id":
|
||
type: string
|
||
"app-name":
|
||
example: music-play-queue
|
||
type: string
|
||
Error:
|
||
type: object
|
||
properties:
|
||
name:
|
||
type: string
|
||
example: "validate"
|
||
message:
|
||
type: string
|
||
example: "Parameters requirements are not met"
|
||
Account:
|
||
required:
|
||
- 'now'
|
||
- 'uid'
|
||
- 'login'
|
||
- 'region'
|
||
- 'fullName'
|
||
- 'secondName'
|
||
- 'fisrtName'
|
||
- 'displayName'
|
||
- 'serviceAvailable'
|
||
- 'hostedUser'
|
||
- 'passport-phones'
|
||
type: object
|
||
description: Основная информация об аккаунте
|
||
properties:
|
||
now:
|
||
type: string
|
||
description: Текущая дата и время
|
||
example: "2021-03-17T18:13:40+00:00"
|
||
uid:
|
||
type: number
|
||
description: Уникальный идентификатор
|
||
login:
|
||
type: string
|
||
description: Виртуальное имя (обычно e-mail)
|
||
region:
|
||
type: number
|
||
description: Регион
|
||
fullName:
|
||
type: string
|
||
description: Полное имя (имя и фамилия)
|
||
secondName:
|
||
type: string
|
||
description: Фамилия
|
||
firstName:
|
||
type: string
|
||
description: Имя
|
||
displayName:
|
||
type: string
|
||
description: Отображаемое имя
|
||
serviceAvailable:
|
||
type: boolean
|
||
description: Доступен ли сервис
|
||
hostedUser:
|
||
type: boolean
|
||
description: Является ли пользователем чьим-то другим
|
||
"passport-phones":
|
||
type: array
|
||
description: Мобильные номера
|
||
items:
|
||
type: object
|
||
properties:
|
||
phone:
|
||
type: string
|
||
Album:
|
||
type: object
|
||
required:
|
||
- "id"
|
||
- "title"
|
||
- "type"
|
||
- "metaType"
|
||
- "year"
|
||
- "releaseDate"
|
||
- "coverUri"
|
||
- "ogImage"
|
||
- "genre"
|
||
- "buy"
|
||
- "trackCount"
|
||
- "recent"
|
||
- "veryImportant"
|
||
- "artists"
|
||
- "labels"
|
||
- "available"
|
||
- "availableForPremiumUsers"
|
||
- "availableForMobile"
|
||
- "availablePartially"
|
||
- "bests"
|
||
- "prerolls"
|
||
- "volumes"
|
||
properties:
|
||
id:
|
||
type: number
|
||
description: Идентификатор альбома
|
||
error:
|
||
description: Ошибка получения альбома
|
||
type: string
|
||
nullable: true
|
||
title:
|
||
description: Название альбома
|
||
type: string
|
||
"type":
|
||
description: Тип альбома
|
||
type: string
|
||
enum: ["single", "podcast"]
|
||
metaType:
|
||
description: Мета тип
|
||
type: string
|
||
enum: ["single", "podcast", "music"]
|
||
year:
|
||
description: Год релиза
|
||
type: number
|
||
releaseDate:
|
||
description: Дата релиза в формате ISO 8601
|
||
type: string
|
||
coverUri:
|
||
description: Ссылка на обложку
|
||
type: string
|
||
ogImage:
|
||
description: Ссылка на превью Open Graph
|
||
type: string
|
||
genre:
|
||
description: Жанр музыки
|
||
type: string
|
||
buy:
|
||
type: array
|
||
items:
|
||
type: object
|
||
trackCount:
|
||
description: Количество треков.
|
||
type: number
|
||
recent:
|
||
description: Является ли альбом новым
|
||
type: boolean
|
||
veryImportant:
|
||
description: Популярен ли альбом у слушателей
|
||
type: boolean
|
||
artists:
|
||
description: Артисты
|
||
type: array
|
||
items:
|
||
type: object
|
||
$ref: "#/components/schemas/Artist"
|
||
labels:
|
||
description: Лейблы
|
||
type: array
|
||
items:
|
||
type: object
|
||
properties:
|
||
id:
|
||
type: number
|
||
name:
|
||
type: string
|
||
available:
|
||
description: Доступен ли альбом
|
||
type: boolean
|
||
availableForPremiumUsers:
|
||
description: Доступен ли альбом для пользователей с подпиской
|
||
type: boolean
|
||
availableForMobile:
|
||
description: Доступен ли альбом из приложения для телефона
|
||
type: boolean
|
||
availablePartially:
|
||
description: Доступен ли альбом частично для пользователей без подписки
|
||
type: boolean
|
||
bests:
|
||
description: ID лучших треков альбома
|
||
type: array
|
||
items:
|
||
type: number
|
||
prerolls:
|
||
description: Прероллы
|
||
type: array
|
||
items:
|
||
type: object
|
||
volumes:
|
||
description: Треки альбома, разделенные по дискам.
|
||
type: array
|
||
nullable: true
|
||
items:
|
||
type: array
|
||
items:
|
||
type: object
|
||
$ref: "#/components/schemas/Track"
|
||
Artist:
|
||
type: object
|
||
required:
|
||
- "id"
|
||
- "composer"
|
||
- "genres"
|
||
- "name"
|
||
- "various"
|
||
properties:
|
||
composer:
|
||
type: boolean
|
||
cover:
|
||
type: object
|
||
nullable: true
|
||
$ref: "#/components/schemas/Cover"
|
||
decomposed:
|
||
type: array
|
||
nullable: true
|
||
items:
|
||
type: object
|
||
genres:
|
||
type: array
|
||
items:
|
||
type: object
|
||
id:
|
||
oneOf:
|
||
- type: string
|
||
- type: number
|
||
name:
|
||
type: string
|
||
various:
|
||
type: boolean
|
||
popularTracks:
|
||
type: array
|
||
nullable: true
|
||
items:
|
||
type: object
|
||
$ref: "#/components/schemas/Track"
|
||
ticketsAvailable:
|
||
description: Имеются ли в продаже билеты на концерт
|
||
nullable: true
|
||
type: boolean
|
||
regions:
|
||
type: array
|
||
nullable: true
|
||
items:
|
||
type: string
|
||
Cover:
|
||
type: object
|
||
required: [custom, type]
|
||
properties:
|
||
custom:
|
||
type: boolean
|
||
dir:
|
||
description: Существует когда поле type = "pic"
|
||
type: string
|
||
type:
|
||
type: string
|
||
enum: ["pic", "mosaic"]
|
||
itemsUri:
|
||
description: Существует когда поле type = "mosaic"
|
||
type: array
|
||
items:
|
||
type: string
|
||
uri:
|
||
description: Существует когда поле type = "pic"
|
||
type: string
|
||
version:
|
||
type: string
|
||
error:
|
||
type: string
|
||
description: If exists other properties is missing
|
||
Owner:
|
||
type: object
|
||
required: [login, name, sex, uid, verified]
|
||
properties:
|
||
login:
|
||
type: string
|
||
name:
|
||
type: string
|
||
sex:
|
||
type: string
|
||
uid:
|
||
type: number
|
||
verified:
|
||
type: boolean
|
||
Track:
|
||
type: object
|
||
required:
|
||
- "albums"
|
||
- "artists"
|
||
- "available"
|
||
- "availableForPremiumUsers"
|
||
- "availableFullWithoutPermission"
|
||
- "coverUri"
|
||
- "durationMs"
|
||
- "fileSize"
|
||
- "id"
|
||
- "lyricsAvailable"
|
||
- "major"
|
||
- "normalization"
|
||
- "ogImage"
|
||
- "previewDurationMs"
|
||
- "realId"
|
||
- "rememberPosition"
|
||
- "storageDir"
|
||
- "title"
|
||
- "type"
|
||
properties:
|
||
albums:
|
||
type: array
|
||
items:
|
||
type: object
|
||
$ref: "#/components/schemas/Album"
|
||
artists:
|
||
type: array
|
||
items:
|
||
type: object
|
||
$ref: "#/components/schemas/Artist"
|
||
available:
|
||
type: boolean
|
||
availableForPremiumUsers:
|
||
type: boolean
|
||
availableFullWithoutPermission:
|
||
type: boolean
|
||
coverUri:
|
||
description: Cover uri template
|
||
type: string
|
||
durationMs:
|
||
type: number
|
||
fileSize:
|
||
type: number
|
||
id:
|
||
type: string
|
||
lyricsAvailable:
|
||
type: boolean
|
||
major:
|
||
type: object
|
||
required: [id, name]
|
||
properties:
|
||
id:
|
||
type: number
|
||
name:
|
||
type: string
|
||
normalization:
|
||
type: object
|
||
required: [gain, peak]
|
||
properties:
|
||
gain:
|
||
type: number
|
||
peak:
|
||
type: number
|
||
ogImage:
|
||
type: string
|
||
previewDurationMs:
|
||
type: number
|
||
realId:
|
||
type: string
|
||
rememberPosition:
|
||
type: boolean
|
||
storageDir:
|
||
type: string
|
||
title:
|
||
type: string
|
||
type:
|
||
type: string
|
||
TrackItem:
|
||
required: [id, playCount, recent, timestamp]
|
||
type: object
|
||
properties:
|
||
id:
|
||
type: number
|
||
playCount:
|
||
type: number
|
||
recent:
|
||
type: boolean
|
||
timestamp:
|
||
type: string
|
||
track:
|
||
description: Null when tracks are not riched
|
||
type: object
|
||
$ref: "#/components/schemas/Track"
|
||
Playlist:
|
||
description: play list data
|
||
required:
|
||
- "playlistUuid"
|
||
- "description"
|
||
- "descriptionFormatted"
|
||
- "available"
|
||
- "collective"
|
||
- "created"
|
||
- "modified"
|
||
- "backgroundColor"
|
||
- "textColor"
|
||
- "durationMs"
|
||
- "isBanner"
|
||
- "isPremiere"
|
||
- "kind"
|
||
- "owner"
|
||
- "revision"
|
||
- "snapshot"
|
||
- "tags"
|
||
- "title"
|
||
- "trackCount"
|
||
- "uid"
|
||
- "visibility"
|
||
- "likesCount"
|
||
- "tracks"
|
||
type: object
|
||
properties:
|
||
playlistUuid:
|
||
type: string
|
||
description:
|
||
type: string
|
||
descriptionFormatted:
|
||
type: string
|
||
available:
|
||
type: boolean
|
||
collective:
|
||
type: boolean
|
||
cover:
|
||
type: object
|
||
$ref: "#/components/schemas/Cover"
|
||
created:
|
||
type: string
|
||
modified:
|
||
type: string
|
||
backgroundColor:
|
||
type: string
|
||
textColor:
|
||
type: string
|
||
durationMs:
|
||
type: number
|
||
isBanner:
|
||
type: boolean
|
||
isPremiere:
|
||
type: boolean
|
||
kind:
|
||
type: number
|
||
ogImage:
|
||
type: string
|
||
owner:
|
||
type: object
|
||
$ref: "#/components/schemas/Owner"
|
||
prerolls:
|
||
type: array
|
||
items:
|
||
type: object
|
||
revision:
|
||
type: number
|
||
snapshot:
|
||
type: number
|
||
tags:
|
||
type: array
|
||
items:
|
||
type: object
|
||
properties:
|
||
id:
|
||
type: string
|
||
value:
|
||
type: string
|
||
title:
|
||
type: string
|
||
trackCount:
|
||
type: number
|
||
uid:
|
||
type: number
|
||
visibility:
|
||
type: string
|
||
enum: ["public", "private"]
|
||
likesCount:
|
||
type: number
|
||
tracks:
|
||
type: array
|
||
items:
|
||
type: object
|
||
$ref: "#/components/schemas/TrackItem"
|
||
Status:
|
||
required:
|
||
- "account"
|
||
- "permissions"
|
||
- "subscription"
|
||
- "subeditor"
|
||
- "subeditorLevel"
|
||
- "pretrialActive"
|
||
- "plus"
|
||
- "defaultEmail"
|
||
- "userhash"
|
||
type: object
|
||
properties:
|
||
account:
|
||
type: object
|
||
$ref: "#/components/schemas/Account"
|
||
permissions:
|
||
type: object
|
||
$ref: "#/components/schemas/Permissions"
|
||
subscription:
|
||
type: object
|
||
$ref: "#/components/schemas/Subscription"
|
||
subeditor:
|
||
type: boolean
|
||
description: Наличие статуса модератора проверки корректности информации
|
||
subeditorLevel:
|
||
type: number
|
||
description: Уровень статуса модератора
|
||
pretrialActive:
|
||
type: boolean
|
||
plus:
|
||
type: object
|
||
description: Информация о Plus подписке
|
||
properties:
|
||
hasPlus:
|
||
type: boolean
|
||
isTutorialCompleted:
|
||
type: boolean
|
||
migrated:
|
||
type: boolean
|
||
defaultEmail:
|
||
type: string
|
||
description: Основной e-mail адрес аккаунта
|
||
example: "email@example.com"
|
||
barBelow:
|
||
type: object
|
||
description: Блок с предупреждениями о конце подписки и подарках
|
||
$ref: "#/components/schemas/Alert"
|
||
userhash:
|
||
type: string
|
||
Permissions:
|
||
type: object
|
||
description: Информация о правах пользователя, их изначальных значениях и даты окончания
|
||
properties:
|
||
until:
|
||
type: string
|
||
example: "2021-03-24T18:13:40+00:00"
|
||
values:
|
||
type: array
|
||
items:
|
||
enum:
|
||
[
|
||
"landing-play",
|
||
"feed-play",
|
||
"radio-play",
|
||
"mix-play",
|
||
"radio-skips",
|
||
"play-radio-full-tracks",
|
||
]
|
||
default:
|
||
type: array
|
||
items:
|
||
enum:
|
||
[
|
||
"landing-play",
|
||
"feed-play",
|
||
"radio-play",
|
||
"mix-play",
|
||
"radio-skips",
|
||
"play-radio-full-tracks",
|
||
]
|
||
Subscription:
|
||
type: object
|
||
description: Информация о подписках пользователя
|
||
properties:
|
||
hadAnySubscription:
|
||
type: boolean
|
||
canStartTrial:
|
||
type: boolean
|
||
mcdonalds:
|
||
type: boolean
|
||
Alert:
|
||
type: object
|
||
description: Блок с предупреждениями о конце подписки и подарках
|
||
properties:
|
||
alertId:
|
||
type: string
|
||
description: Уникальный идентификатор
|
||
text:
|
||
type: string
|
||
description: Текст предупреждения
|
||
bgColor:
|
||
type: string
|
||
description: Цвет заднего фона (HTML)
|
||
textColor:
|
||
type: string
|
||
description: Цвет текста (HTML)
|
||
alertType:
|
||
type: string
|
||
description: Тип предупреждения
|
||
example: "Promo_rk360"
|
||
button:
|
||
type: object
|
||
$ref: "#/components/schemas/AlertButton"
|
||
closeButton:
|
||
type: boolean
|
||
description: Наличие кнопки "Закрыть"
|
||
AlertButton:
|
||
type: object
|
||
description: кнопка со ссылкой
|
||
properties:
|
||
text:
|
||
type: string
|
||
description: Текст на кнопке
|
||
bgColor:
|
||
type: string
|
||
description: Цвет заднего фона (HTML)
|
||
textColor:
|
||
type: string
|
||
description: Цвет текста (HTML)
|
||
uri:
|
||
type: string
|
||
description: Ссылка, куда ведет кнопка
|
||
Suggestions:
|
||
type: object
|
||
description: подсказки при поиске
|
||
properties:
|
||
best:
|
||
type: object
|
||
suggestions:
|
||
type: array
|
||
items:
|
||
type: string
|
||
Best:
|
||
type: object
|
||
description: лучший результат поиска
|
||
properties:
|
||
type:
|
||
type: string
|
||
description: Тип лучшего результата
|
||
text:
|
||
type: string
|
||
result:
|
||
oneOf:
|
||
- $ref: "#/components/schemas/Track"
|
||
- $ref: "#/components/schemas/Artist"
|
||
- $ref: "#/components/schemas/Album"
|
||
- $ref: "#/components/schemas/Playlist"
|
||
- $ref: "#/components/schemas/Video"
|
||
PlaylistRecommendations:
|
||
type: object
|
||
description: рекомендации для плейлиста
|
||
properties:
|
||
batch_id:
|
||
type: string
|
||
description: Уникальный идентификатор партии треков
|
||
tracks:
|
||
type: array
|
||
items:
|
||
type: object
|
||
$ref: "#/components/schemas/Track"
|
||
Settings:
|
||
type: object
|
||
description: Предложения по покупке
|
||
properties:
|
||
inAppProducts:
|
||
type: array
|
||
items:
|
||
type: object
|
||
$ref: "#/components/schemas/Product"
|
||
nativeProducts:
|
||
type: array
|
||
items:
|
||
type: object
|
||
$ref: "#/components/schemas/Product"
|
||
webPaymentUrl:
|
||
type: string
|
||
webPaymentMonthProductPrice:
|
||
type: object
|
||
$ref: "#/components/schemas/Price"
|
||
promoCodesEnabled:
|
||
type: boolean
|
||
Price:
|
||
type: object
|
||
description: цена
|
||
properties:
|
||
amount:
|
||
description: Количество единиц
|
||
type: number
|
||
currency:
|
||
description: Валюта
|
||
type: string
|
||
Product:
|
||
type: object
|
||
description: продаваемый продукт
|
||
properties:
|
||
productId:
|
||
description: Уникальный идентификатор.
|
||
type: string
|
||
type:
|
||
description: Тип продаваемого.
|
||
type: string
|
||
commonPeriodDuration:
|
||
description: Длительность общего периода.
|
||
type: string
|
||
duration:
|
||
description: Длительность.
|
||
type: number
|
||
trialDuration:
|
||
description: Длительность испытательного срока.
|
||
type: number
|
||
price:
|
||
description: Цена.
|
||
type: object
|
||
$ref: "#/components/schemas/Price"
|
||
feature:
|
||
description: Предоставляемая возможность.
|
||
type: string
|
||
debug:
|
||
description: Отладочный продукт.
|
||
type: boolean
|
||
plus:
|
||
description: Даёт ли подписку "Плюс".
|
||
type: boolean
|
||
cheapest:
|
||
description: Самый дешёвый (лучшее предложение).
|
||
type: boolean
|
||
title:
|
||
description: Заголовок продукта.
|
||
type: string
|
||
familySub:
|
||
description: Семейная ли подписка.
|
||
type: boolean
|
||
fbImage:
|
||
description: Картинка для превью на facebook.
|
||
type: string
|
||
fbName:
|
||
description: Заголовок превью на facebook.
|
||
type: string
|
||
family:
|
||
description: Доступно ли для семьи.
|
||
type: boolean
|
||
features:
|
||
description: Список предоставляемых возможностей.
|
||
type: array
|
||
items:
|
||
type: string
|
||
description:
|
||
description: Описание.
|
||
type: string
|
||
available:
|
||
description: Доступна ли покупка.
|
||
type: boolean
|
||
trialAvailable:
|
||
description: Доступен ли пробный период.
|
||
type: boolean
|
||
trialPeriodDuration:
|
||
description: Длительность пробного периода.
|
||
type: string
|
||
introPeriodDuration:
|
||
description: Длительность вступительного периода TODO.
|
||
type: string
|
||
introPrice:
|
||
description: Цена вступительного периода.
|
||
type: object
|
||
$ref: "#/components/schemas/Price"
|
||
startPeriodDuration:
|
||
description: Длительность первого срока (за меньшую цену).
|
||
type: string
|
||
startPrice:
|
||
description: Цена за первый срок.
|
||
type: object
|
||
$ref: "#/components/schemas/Price"
|
||
licenceTextParts:
|
||
description: Длительность пробного периода.
|
||
type: object
|
||
$ref: "#/components/schemas/LicenceTextPart"
|
||
vendorTrialAvailable:
|
||
description: Доступен испытательный срок продавца TODO.
|
||
type: boolean
|
||
buttonText:
|
||
description: Текст кнопки.
|
||
type: string
|
||
buttonAdditionalText:
|
||
description: Дополнительный текст кнопки.
|
||
type: string
|
||
paymentMethodTypes:
|
||
description: Способы оплаты.
|
||
type: array
|
||
items:
|
||
type: string
|
||
LicenceTextPart:
|
||
type: object
|
||
description: часть текста с ссылкой на лицензионное соглашение
|
||
properties:
|
||
text:
|
||
description: Часть текста.
|
||
type: string
|
||
url:
|
||
description: Ссылка на лицензионное соглашение.
|
||
type: string
|
||
PermissionAlerts:
|
||
type: object
|
||
description: оповещения
|
||
properties:
|
||
alerts:
|
||
type: array
|
||
items:
|
||
type: string
|
||
Experiments:
|
||
type: object
|
||
description: режимы экспериментальных функций
|
||
PromoCodeStatus:
|
||
type: object
|
||
description: статус активации промо-кода
|
||
properties:
|
||
status:
|
||
type: string
|
||
description: Статус операции
|
||
example: code-not-exists
|
||
statusDesc:
|
||
type: string
|
||
description: Описание статуса
|
||
example: Gift code does not exist
|
||
accountStatus:
|
||
type: object
|
||
description: Информация об аккаунте пользователя.
|
||
$ref: "#/components/schemas/Status"
|
||
Supplement:
|
||
type: object
|
||
description: дополнительная информация о треке
|
||
properties:
|
||
id:
|
||
type: number
|
||
description: Уникальный идентификатор дополнительной информации.
|
||
lyrics:
|
||
type: object
|
||
description: Текст песни.
|
||
$ref: "#/components/schemas/Lyrics"
|
||
videos:
|
||
type: object
|
||
description: Видео.
|
||
$ref: "#/components/schemas/VideoSupplement"
|
||
radioIsAvailable:
|
||
type: boolean
|
||
description: Доступно ли радио.
|
||
description:
|
||
type: string
|
||
description: Полное описание эпизода подкаста.
|
||
Lyrics:
|
||
type: object
|
||
description: текст трека
|
||
properties:
|
||
id:
|
||
type: number
|
||
description: Уникальный идентификатор текста трека.
|
||
lyrics:
|
||
type: string
|
||
description: Первые строки текст песни.
|
||
hasRights:
|
||
type: boolean
|
||
description: Есть ли права.
|
||
fullLyrics:
|
||
type: string
|
||
description: Текст песни.
|
||
textLanguage:
|
||
type: string
|
||
description: Язык текста.
|
||
showTranslation:
|
||
type: boolean
|
||
description: Доступен ли перевод.
|
||
url:
|
||
type: string
|
||
description: Ссылка на источник перевода. Обычно genius.com.
|
||
VideoSupplement:
|
||
type: object
|
||
description: видеоклипы
|
||
properties:
|
||
cover:
|
||
type: string
|
||
description: URL на обложку видео.
|
||
provider:
|
||
type: string
|
||
description: Сервис поставляющий видео.
|
||
title:
|
||
type: string
|
||
description: Название видео.
|
||
providerVideoId:
|
||
type: string
|
||
description: Уникальный идентификатор видео на сервисе.
|
||
url:
|
||
type: string
|
||
description: URL на видео.
|
||
embedUrl:
|
||
type: string
|
||
description: URL на видео, находящегося на серверах Яндекса.
|
||
embed:
|
||
type: string
|
||
description: HTML тег для встраивания видео.
|
||
Video:
|
||
type: object
|
||
description: Видео
|
||
properties:
|
||
title:
|
||
type: string
|
||
description: Название видео
|
||
cover:
|
||
type: string
|
||
description: Ссылка на изображение
|
||
embedUrl:
|
||
type: string
|
||
description: Ссылка на видео
|
||
provider:
|
||
type: string
|
||
description: Сервис поставляющий видео
|
||
providerVideoId:
|
||
type: string
|
||
description: Уникальный идентификатор видео на сервисе.
|
||
youtubeUrl:
|
||
type: string
|
||
description: Ссылка на видео Youtube
|
||
thumbnailUrl:
|
||
type: string
|
||
description: Ссылка на изображение
|
||
duration:
|
||
type: number
|
||
description: Длительность видео в секундах
|
||
text:
|
||
type: string
|
||
description: Текст
|
||
htmlAutoPlayVideoPlayer:
|
||
type: string
|
||
description: HTML тег для встраивания в разметку страницы
|
||
regions:
|
||
type: array
|
||
items:
|
||
type: string
|
||
example: ["RUSSIA_PREMIUM", "RUSSIA"]
|
||
TagResult:
|
||
type: object
|
||
description: Класс, представляющий тег и его плейлисты
|
||
properties:
|
||
tag:
|
||
$ref: "#/components/schemas/Tag"
|
||
ids:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/PlaylistId"
|
||
Tag:
|
||
type: object
|
||
description: Тег
|
||
required:
|
||
- id
|
||
- value
|
||
- name
|
||
- ogDescription
|
||
properties:
|
||
id:
|
||
type: string
|
||
description: Уникальный идентификатор тега
|
||
value:
|
||
type: string
|
||
description: Значение тега (название в lower case)
|
||
name:
|
||
type: string
|
||
description: Название тега (отображаемое)
|
||
ogDescription:
|
||
type: string
|
||
description: Описание тега для OpenGraph
|
||
ogImage:
|
||
type: string
|
||
description: Ссылка на изображение для OpenGraph
|
||
PlaylistId:
|
||
type: object
|
||
properties:
|
||
uid:
|
||
type: integer
|
||
description: Уникальный идентификатор пользователя владеющим плейлистом
|
||
kind:
|
||
type: integer
|
||
description: Уникальный идентификатор плейлиста
|
||
SimilarTracks:
|
||
type: object
|
||
description: список похожих треков на другой трек
|
||
properties:
|
||
track:
|
||
type: object
|
||
description: трек
|
||
$ref: "#/components/schemas/Track"
|
||
similarTracks:
|
||
type: array
|
||
description: Похожие треки
|
||
items:
|
||
$ref: "#/components/schemas/Track"
|
||
TracksList:
|
||
type: object
|
||
description: список треков
|
||
required: [uid, revisions, tracks]
|
||
properties:
|
||
uid:
|
||
type: number
|
||
description: Уникальный идентификатор пользователя
|
||
revisions:
|
||
type: number
|
||
description: Актуальность данных TODO
|
||
tracks:
|
||
type: array
|
||
description: Список треков в укороченной версии
|
||
items:
|
||
$ref: "#/components/schemas/TrackShort"
|
||
TrackShort:
|
||
type: object
|
||
description: Укороченная версия трека с неполными данными
|
||
required: [id, albumId, timestamp]
|
||
properties:
|
||
id:
|
||
type: string
|
||
description: Уникальный идентификатор трека
|
||
albumId:
|
||
type: string
|
||
description: Уникальный идентификатор альбома
|
||
timestamp:
|
||
type: string
|
||
description: Дата
|
||
TrackDownloadInfo:
|
||
type: object
|
||
description: информация о вариантах загрузки трека
|
||
required: [codec, gain, preview, downloadInfoUrl, direct, bitrateInKbps]
|
||
properties:
|
||
codec:
|
||
type: string
|
||
enum: [mp3, aac]
|
||
description: Кодек аудиофайла
|
||
gain:
|
||
type: boolean
|
||
description: Усиление
|
||
preview:
|
||
type: string
|
||
description: Предварительный просмотр
|
||
downloadInfoUrl:
|
||
type: string
|
||
description: Ссылка на XML документ содержащий данные для загрузки трека
|
||
direct:
|
||
type: boolean
|
||
description: Прямая ли ссылка
|
||
bitrateInKbps:
|
||
type: number
|
||
description: Битрейт аудиофайла в кбит/с
|
||
Search:
|
||
type: object
|
||
required:
|
||
- "albums"
|
||
- "artists"
|
||
- "best"
|
||
- "playlists"
|
||
- "searchRequestId"
|
||
- "misspellCorrected"
|
||
- "nocorrect"
|
||
- "text"
|
||
- "podcast_episodes"
|
||
- "tracks"
|
||
description: Результаты поиска
|
||
properties:
|
||
searchResultId:
|
||
type: string
|
||
description: ID запроса
|
||
text:
|
||
type: string
|
||
description: Текст запроса
|
||
best:
|
||
$ref: "#/components/schemas/Best"
|
||
albums:
|
||
description: Найденные альбомы
|
||
allOf:
|
||
- $ref: "#/components/schemas/SearchResult"
|
||
- type: object
|
||
required: [results]
|
||
properties:
|
||
results:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/Album"
|
||
artists:
|
||
description: Найденные артисты
|
||
allOf:
|
||
- $ref: "#/components/schemas/SearchResult"
|
||
- type: object
|
||
required: [results]
|
||
properties:
|
||
results:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/Artist"
|
||
playlists:
|
||
description: Найденные альбомы
|
||
allOf:
|
||
- $ref: "#/components/schemas/SearchResult"
|
||
- type: object
|
||
required: [results]
|
||
properties:
|
||
results:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/Playlist"
|
||
tracks:
|
||
description: Найденные треки
|
||
allOf:
|
||
- $ref: "#/components/schemas/SearchResult"
|
||
- type: object
|
||
required: [results]
|
||
properties:
|
||
results:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/Track"
|
||
videos:
|
||
description: Найденные видео
|
||
allOf:
|
||
- $ref: "#/components/schemas/SearchResult"
|
||
- type: object
|
||
required: [results]
|
||
properties:
|
||
results:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/Video"
|
||
podcasts:
|
||
description: Найденные подкасты
|
||
allOf:
|
||
- $ref: "#/components/schemas/SearchResult"
|
||
- type: object
|
||
required: [results]
|
||
properties:
|
||
results:
|
||
type: array
|
||
items:
|
||
type: object
|
||
podcast_episodes:
|
||
description: Найденные выпуски подкастов
|
||
allOf:
|
||
- $ref: "#/components/schemas/SearchResult"
|
||
- type: object
|
||
required: [results]
|
||
properties:
|
||
results:
|
||
type: array
|
||
items:
|
||
type: object
|
||
type:
|
||
$ref: "#/components/schemas/SearchType"
|
||
description: Тип результата по которому искали. Доступно, при использовании параметра type.
|
||
page:
|
||
type: number
|
||
description: Текущая страница. Доступно, при использовании параметра type.
|
||
perPage:
|
||
type: number
|
||
description: Результатов на странице. Доступно, при использовании параметра type.
|
||
misspellCorrected:
|
||
type: boolean
|
||
description: Был ли исправлен запрос
|
||
misspellOriginal:
|
||
type: string
|
||
description: Оригинальный запрос
|
||
nocorrect:
|
||
type: boolean
|
||
description: Было ли отключено исправление результата
|
||
SearchType:
|
||
type: string
|
||
enum: ["artist", "album", "track", "podcast", "all"]
|
||
default: "all"
|
||
SearchResult:
|
||
type: object
|
||
required:
|
||
- "type"
|
||
- "total"
|
||
- "perPage"
|
||
- "order"
|
||
properties:
|
||
type:
|
||
type: string
|
||
description: Тип результата
|
||
total:
|
||
type: number
|
||
description: Количество результатов
|
||
perPage:
|
||
type: number
|
||
description: Максимальное количество результатов на странице.
|
||
order:
|
||
type: number
|
||
description: Позиция блока
|
||
BadRequest:
|
||
type: object
|
||
properties:
|
||
invocationInfo:
|
||
$ref: "#/components/schemas/InvocationInfo"
|
||
error:
|
||
$ref: "#/components/schemas/Error"
|
||
LandingResult:
|
||
type: object
|
||
required: [pumpkin, contentId, blocks]
|
||
properties:
|
||
pumpkin:
|
||
type: boolean
|
||
contentId:
|
||
type: string
|
||
blocks:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/LandingBlock"
|
||
LandingBlock:
|
||
type: object
|
||
required:
|
||
- "id"
|
||
- "title"
|
||
- "type"
|
||
- "typeForFrom"
|
||
- "description"
|
||
- "entities"
|
||
properties:
|
||
id:
|
||
type: string
|
||
title:
|
||
type: string
|
||
type:
|
||
description: the follwing values are allowed or combination of these values separated by comman - personal-playlists, podcasts, play-context, chart, new-playlists, new-releases, promotions
|
||
type: string
|
||
typeForFrom:
|
||
$ref: "#/components/schemas/LandingBlockType"
|
||
description:
|
||
type: string
|
||
entities:
|
||
type: array
|
||
items:
|
||
oneOf:
|
||
- $ref: "#/components/schemas/LandingPodcastItem"
|
||
- $ref: "#/components/schemas/LandingBlockItem"
|
||
LandingBlockItem:
|
||
type: object
|
||
required: [id, type, data]
|
||
properties:
|
||
id:
|
||
type: string
|
||
type:
|
||
$ref: "#/components/schemas/LandingBlockType"
|
||
data:
|
||
type: object
|
||
oneOf:
|
||
- $ref: "#/components/schemas/Album"
|
||
- $ref: "#/components/schemas/Playlist"
|
||
- $ref: "#/components/schemas/Promotion"
|
||
- $ref: "#/components/schemas/MixLink"
|
||
- $ref: "#/components/schemas/GeneratedPlaylistLandingBlock"
|
||
- $ref: "#/components/schemas/ChartItem"
|
||
LandingBlockType:
|
||
type: string
|
||
enum:
|
||
- "personalplaylists"
|
||
- "promotions"
|
||
- "new-releases"
|
||
- "new-playlists"
|
||
- "mixes"
|
||
- "chart"
|
||
- "artists"
|
||
- "albums"
|
||
- "playlists"
|
||
- "play_contexts"
|
||
- "podcasts"
|
||
LandingPodcastItem:
|
||
type: object
|
||
required:
|
||
- "type"
|
||
- "description"
|
||
- "descriptionFormatted"
|
||
- "lastUpdated"
|
||
- "data"
|
||
properties:
|
||
type:
|
||
type: string
|
||
description:
|
||
type: string
|
||
descriptionFormatted:
|
||
type: string
|
||
lastUpdated:
|
||
type: string
|
||
data:
|
||
type: object
|
||
required:
|
||
- "podcast"
|
||
- "description"
|
||
- "descriptionFormatted"
|
||
- "lastUpdated"
|
||
properties:
|
||
podcast:
|
||
type: object
|
||
$ref: "#/components/schemas/Album"
|
||
description:
|
||
type: string
|
||
descriptionFormatted:
|
||
type: string
|
||
lastUpdated:
|
||
type: string
|
||
FullChartResult:
|
||
type: object
|
||
required:
|
||
- "id"
|
||
- "type"
|
||
- "typeForFrom"
|
||
- "title"
|
||
- "chartDescription"
|
||
- "menu"
|
||
- "chart"
|
||
properties:
|
||
id:
|
||
type: string
|
||
type:
|
||
type: string
|
||
enum:
|
||
- "chart"
|
||
typeForFrom:
|
||
type: string
|
||
title:
|
||
type: string
|
||
chartDescription:
|
||
type: string
|
||
menu:
|
||
required:
|
||
- "menu"
|
||
type: object
|
||
properties:
|
||
menu:
|
||
type: object
|
||
$ref: "#/components/schemas/MenuItem"
|
||
chart:
|
||
type: object
|
||
$ref: "#/components/schemas/Playlist"
|
||
MenuItem:
|
||
type: object
|
||
properties:
|
||
title:
|
||
type: string
|
||
url:
|
||
type: string
|
||
selected:
|
||
type: boolean
|
||
NewPlaylistItem:
|
||
type: object
|
||
required:
|
||
- "uid"
|
||
- "kind"
|
||
properties:
|
||
uid:
|
||
description: id пользователя
|
||
type: number
|
||
kind:
|
||
description: id плейлиста
|
||
type: number
|
||
GeneratedPlaylist:
|
||
description: Плейлист дня, дежавю, премьера, ...
|
||
allOf:
|
||
- $ref: "#/components/schemas/Playlist"
|
||
- type: object
|
||
properties:
|
||
animatedCoverUri:
|
||
description: Доступно для плейлиста дня
|
||
type: string
|
||
coverWithoutText:
|
||
$ref: "#/components/schemas/Cover"
|
||
everPlayed:
|
||
type: boolean
|
||
generatedPlaylistType:
|
||
type: string
|
||
idForFrom:
|
||
type: string
|
||
madeFor:
|
||
type: object
|
||
playCounter:
|
||
type: object
|
||
required: [description, descriptionNext, updated, value]
|
||
properties:
|
||
description:
|
||
type: string
|
||
descriptionNext:
|
||
type: string
|
||
updated:
|
||
type: boolean
|
||
value:
|
||
type: number
|
||
GeneratedPlaylistLandingBlock:
|
||
type: object
|
||
required: [notify, ready, type, data]
|
||
properties:
|
||
notify:
|
||
type: boolean
|
||
ready:
|
||
type: boolean
|
||
type:
|
||
type: string
|
||
enum: [playlistOfTheDay]
|
||
data:
|
||
$ref: "#/components/schemas/GeneratedPlaylist"
|
||
Chart:
|
||
type: object
|
||
required: [bgColor, position, progress, listeners, shift]
|
||
properties:
|
||
bgColor:
|
||
type: string
|
||
position:
|
||
type: number
|
||
progress:
|
||
type: string
|
||
enum: [same, up, down]
|
||
listeners:
|
||
type: number
|
||
shift:
|
||
type: number
|
||
Promotion:
|
||
type: object
|
||
required:
|
||
- "promoId"
|
||
- "title"
|
||
- "subtitle"
|
||
- "heading"
|
||
- "urlScheme"
|
||
- "url"
|
||
- "textColor"
|
||
- "gradient"
|
||
- "image"
|
||
properties:
|
||
promoId:
|
||
type: string
|
||
title:
|
||
type: string
|
||
subtitle:
|
||
type: string
|
||
heading:
|
||
type: string
|
||
urlScheme:
|
||
type: string
|
||
url:
|
||
type: string
|
||
textColor:
|
||
type: string
|
||
gradient:
|
||
type: string
|
||
image:
|
||
type: string
|
||
MixLink:
|
||
type: object
|
||
required:
|
||
- "title"
|
||
- "url"
|
||
- "urlScheme"
|
||
- "textColor"
|
||
- "backgroundColor"
|
||
- "coverWhite"
|
||
properties:
|
||
title:
|
||
type: string
|
||
url:
|
||
type: string
|
||
urlScheme:
|
||
type: string
|
||
textColor:
|
||
type: string
|
||
backgroundColor:
|
||
type: string
|
||
coverWhite:
|
||
type: string
|
||
ChartItem:
|
||
required:
|
||
- "track"
|
||
- "chart"
|
||
allOf:
|
||
- $ref: "#/components/schemas/TrackItem"
|
||
- type: object
|
||
properties:
|
||
# track:
|
||
# $ref: '#/components/schemas/Track'
|
||
chart:
|
||
$ref: "#/components/schemas/Chart"
|
||
StationTracksResult:
|
||
type: object
|
||
required:
|
||
- "id"
|
||
- "sequence"
|
||
- "batchId"
|
||
- "pumpkin"
|
||
- "radioSessionId"
|
||
properties:
|
||
id:
|
||
type: object
|
||
required:
|
||
- type
|
||
- tag
|
||
properties:
|
||
type:
|
||
type: string
|
||
tag:
|
||
type: string
|
||
sequence:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/SequenceItem"
|
||
batchId:
|
||
type: string
|
||
pumpkin:
|
||
type: boolean
|
||
radioSessionId:
|
||
type: string
|
||
SequenceItem:
|
||
type: object
|
||
description: Класс, представляющий звено последовательности радио станции
|
||
required:
|
||
- "type"
|
||
- "track"
|
||
- "liked"
|
||
- "trackParameters"
|
||
properties:
|
||
type:
|
||
type: string
|
||
track:
|
||
$ref: "#/components/schemas/Track"
|
||
liked:
|
||
type: boolean
|
||
trackParameters:
|
||
type: object
|
||
required:
|
||
- "bpm"
|
||
- "hue"
|
||
- "energy"
|
||
properties:
|
||
bpm:
|
||
type: number
|
||
hue:
|
||
type: number
|
||
energy:
|
||
type: number
|
||
BooksAndPodcastsResult:
|
||
type: object
|
||
description: Блоки главной страницы кнги и подкастов
|
||
required:
|
||
- "title"
|
||
- "blocks"
|
||
properties:
|
||
title:
|
||
type: string
|
||
blocks:
|
||
type: array
|
||
items:
|
||
type: object
|
||
required:
|
||
- "id"
|
||
- "type"
|
||
- "typeForFrom"
|
||
properties:
|
||
id:
|
||
type: string
|
||
title:
|
||
type: string
|
||
type:
|
||
type: string
|
||
typeForFrom:
|
||
type: string
|
||
entities:
|
||
type: array
|
||
items:
|
||
type: object
|
||
properties:
|
||
id:
|
||
type: string
|
||
type:
|
||
type: string
|
||
# TODO: complete "data" type
|
||
data:
|
||
type: object
|
||
StationResult:
|
||
type: object
|
||
properties:
|
||
station:
|
||
$ref: "#/components/schemas/Station"
|
||
data:
|
||
$ref: "#/components/schemas/RotorData"
|
||
settings:
|
||
$ref: "#/components/schemas/RotorSettings"
|
||
settings2:
|
||
$ref: "#/components/schemas/RotorSettings2"
|
||
adParams:
|
||
$ref: "#/components/schemas/AdParams"
|
||
rupTitle:
|
||
type: string
|
||
rupDescription:
|
||
type: string
|
||
Station:
|
||
type: object
|
||
required:
|
||
- "id"
|
||
- "name"
|
||
- "icon"
|
||
- "mtsIcon"
|
||
properties:
|
||
id:
|
||
$ref: "#/components/schemas/StationId"
|
||
description: Уникальный идентификатор станции
|
||
parentId:
|
||
$ref: "#/components/schemas/StationId"
|
||
description: Уникальный идентификатор станции, являющейся предком текущей
|
||
name:
|
||
type: string
|
||
description: Название станции
|
||
icon:
|
||
$ref: "#/components/schemas/Icon"
|
||
description: Иконка станции
|
||
mtsIcon:
|
||
$ref: "#/components/schemas/Icon"
|
||
description: Иконка станции
|
||
fullImageUrl:
|
||
type: string
|
||
description: Ссылка на полное изображение
|
||
mtsFullImageUrl:
|
||
type: string
|
||
description: Ссылка на полную иконку
|
||
idForFrom:
|
||
type: string
|
||
description: Категория (тип) станции
|
||
restrictions:
|
||
$ref: "#/components/schemas/Restrictions"
|
||
description: Ограничения для настроек станции старого формата
|
||
restrictions2:
|
||
$ref: "#/components/schemas/Restrictions2"
|
||
description: Ограничения для настроек станции
|
||
RotorSettings:
|
||
type: object
|
||
required:
|
||
- "language"
|
||
- "diversity"
|
||
- "mood"
|
||
- "energy"
|
||
properties:
|
||
language:
|
||
type: string
|
||
diversity:
|
||
type: string
|
||
mood:
|
||
type: number
|
||
energy:
|
||
type: number
|
||
RotorSettings2:
|
||
type: object
|
||
required:
|
||
- "language"
|
||
- "diversity"
|
||
- "moodEnergy"
|
||
properties:
|
||
language:
|
||
type: string
|
||
diversity:
|
||
type: string
|
||
moodEnergy:
|
||
type: string
|
||
AdParams:
|
||
type: object
|
||
required:
|
||
- "partnerId"
|
||
- "categoryId"
|
||
- "pageRef"
|
||
- "targetRef"
|
||
- "otherParams"
|
||
properties:
|
||
partnerId:
|
||
type: string
|
||
categoryId:
|
||
type: string
|
||
pageRef:
|
||
type: string
|
||
targetRef:
|
||
type: string
|
||
otherParams:
|
||
type: string
|
||
adVolume:
|
||
type: number
|
||
genreId:
|
||
type: number
|
||
genreName:
|
||
type: string
|
||
RotorData:
|
||
type: object
|
||
required:
|
||
- "title"
|
||
- "description"
|
||
- "imageUrl"
|
||
- "artists"
|
||
properties:
|
||
title:
|
||
type: string
|
||
description:
|
||
type: string
|
||
imageUrl:
|
||
type: string
|
||
artists:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/Artist"
|
||
Icon:
|
||
type: object
|
||
required:
|
||
- "backgroundColor"
|
||
- "imageUrl"
|
||
properties:
|
||
backgroundColor:
|
||
type: string
|
||
imageUrl:
|
||
type: string
|
||
StationId:
|
||
required:
|
||
- "type"
|
||
- "tag"
|
||
properties:
|
||
type:
|
||
type: string
|
||
tag:
|
||
type: string
|
||
Restrictions:
|
||
type: object
|
||
description: Ограничения для настроек станции старого формата
|
||
properties:
|
||
language:
|
||
$ref: "#/components/schemas/RestrictionEnum"
|
||
mood:
|
||
$ref: "#/components/schemas/DiscreteScale"
|
||
energy:
|
||
$ref: "#/components/schemas/DiscreteScale"
|
||
diversity:
|
||
$ref: "#/components/schemas/RestrictionEnum"
|
||
Restrictions2:
|
||
type: object
|
||
description: Ограничения для настроек станции
|
||
properties:
|
||
diversity:
|
||
$ref: "#/components/schemas/RestrictionEnum2"
|
||
moodEnergy:
|
||
$ref: "#/components/schemas/RestrictionEnum2"
|
||
language:
|
||
$ref: "#/components/schemas/RestrictionEnum2"
|
||
DiscreteScale:
|
||
type: object
|
||
description: Класс, представляющий дискретное значение
|
||
properties:
|
||
type:
|
||
type: string
|
||
name:
|
||
type: string
|
||
min:
|
||
$ref: "#/components/schemas/MinMax"
|
||
max:
|
||
$ref: "#/components/schemas/MinMax"
|
||
MinMax:
|
||
type: object
|
||
required:
|
||
- "value"
|
||
- "name"
|
||
properties:
|
||
value:
|
||
type: number
|
||
name:
|
||
type: string
|
||
RestrictionEnum:
|
||
required:
|
||
- "type"
|
||
- "name"
|
||
- "possibleValues"
|
||
properties:
|
||
type:
|
||
type: string
|
||
name:
|
||
type: string
|
||
possibleValues:
|
||
type: object
|
||
required:
|
||
- "name"
|
||
- "value"
|
||
properties:
|
||
name:
|
||
type: string
|
||
value:
|
||
type: string
|
||
RestrictionEnum2:
|
||
type: object
|
||
required:
|
||
- "type"
|
||
- "name"
|
||
- "possibleValues"
|
||
properties:
|
||
type:
|
||
type: string
|
||
name:
|
||
type: string
|
||
possibleValues:
|
||
type: object
|
||
required:
|
||
- "name"
|
||
- "value"
|
||
- "imageUrl"
|
||
- "serializedSeed"
|
||
properties:
|
||
name:
|
||
type: string
|
||
value:
|
||
type: string
|
||
imageUrl:
|
||
type: string
|
||
serializedSeed:
|
||
type: string
|
||
Dashboard:
|
||
type: object
|
||
required:
|
||
- "dashboardId"
|
||
- "stations"
|
||
- "pumpkin"
|
||
properties:
|
||
dashboardId:
|
||
type: string
|
||
stations:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/StationResult"
|
||
pumpkin:
|
||
type: boolean
|
||
Genre:
|
||
type: object
|
||
required:
|
||
- "id"
|
||
- "weight"
|
||
- "composerTop"
|
||
- "title"
|
||
- "titles"
|
||
- "images"
|
||
- "showInMenu"
|
||
properties:
|
||
id:
|
||
description: Уникальный идентификатор жанра
|
||
type: string
|
||
weight:
|
||
description: Вес TODO (возможно, чем выше показатель, тем больше нравится пользователю)
|
||
type: number
|
||
composerTop:
|
||
type: boolean
|
||
title:
|
||
description: Заголовок жанра
|
||
type: string
|
||
titles:
|
||
description: Словарь заголовков на разных языках, где ключ - язык
|
||
type: object
|
||
additionalProperties:
|
||
type: object
|
||
required:
|
||
- "title"
|
||
- "fullTitle"
|
||
properties:
|
||
title:
|
||
type: string
|
||
fullTitle:
|
||
type: string
|
||
images:
|
||
description: Изображение жанра
|
||
type: object
|
||
additionalProperties:
|
||
type: string
|
||
example:
|
||
"208x208": "http://avatars.mds.yandex.net/get-music-misc/29541/metagenre-other-x208/orig"
|
||
"300x300": "http://avatars.mds.yandex.net/get-music-misc/49997/metagenre-other-x300/orig"
|
||
showInMenu:
|
||
description: Показывать в меню
|
||
type: boolean
|
||
showInRegions:
|
||
description: Список регионов в которых отображается жанр в списках
|
||
type: array
|
||
items:
|
||
type: number
|
||
fullTitle:
|
||
description: Полный заголовок
|
||
type: string
|
||
urlPart:
|
||
description: Часть ссылки на жанр для открытия в браузере
|
||
type: string
|
||
color:
|
||
description: Цвет фона изображения
|
||
type: string
|
||
radioIcon:
|
||
description: Иконка радио жанра
|
||
$ref: "#/components/schemas/Icon"
|
||
subGenres:
|
||
description: Поджанры текущего жанра музыки
|
||
$ref: "#/components/schemas/Genre"
|
||
hideInRegions:
|
||
description: В каких регионах скрывать жанр
|
||
type: array
|
||
items:
|
||
type: number
|
||
QueuesResult:
|
||
type: object
|
||
required:
|
||
- "queues"
|
||
properties:
|
||
queues:
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/QueueItem"
|
||
QueueItem:
|
||
type: object
|
||
description: Очередь треков в списке очередей устройств
|
||
required:
|
||
- "id"
|
||
- "context"
|
||
- "modified"
|
||
properties:
|
||
id:
|
||
description: Уникальный идентификатор очереди
|
||
type: string
|
||
context:
|
||
$ref: "#/components/schemas/QueueContext"
|
||
modified:
|
||
type: string
|
||
tracks:
|
||
description: Поле присутствует, только при запросе очереди по идентификатору
|
||
type: array
|
||
items:
|
||
$ref: "#/components/schemas/QueueTrack"
|
||
currentIndex:
|
||
description: Поле присутствует, только при запросе очереди по идентификатору
|
||
type: number
|
||
QueueContext:
|
||
type: object
|
||
description: Содержимое очереди, на основе чего она построена (плейлист, радио, ...)
|
||
required:
|
||
- "type"
|
||
properties:
|
||
id:
|
||
description: Уникальный идентификатор типа содержимого (плейлиста, альбома и т.д.). При `type` равным `my_music` или `various` поле `id` отсутствует.
|
||
type: string
|
||
description:
|
||
description: Описание содержимого (например, название плейлиста, радиостанции) - `various`, `my_music`, `radio`, `playlist`, `artist`. Тип `various` используется при прослушивании из раздела "Моя музыка" с сайта, а `my_music` с мобильных клиентов.
|
||
type: string
|
||
type:
|
||
description: Тип содержимого, на основе чего построена очередь. Значение есть зачастую только когда `type` имеет значение `my_music` или `various`.
|
||
type: string
|
||
example: "radio"
|
||
QueueTrack:
|
||
type: object
|
||
required:
|
||
- "trackId"
|
||
- "albumId"
|
||
- "from"
|
||
properties:
|
||
trackId:
|
||
type: string
|
||
albumId:
|
||
type: string
|
||
from:
|
||
type: string
|
||
UpdateQueueResult:
|
||
type: object
|
||
required:
|
||
- "status"
|
||
- "mostRecentQueue"
|
||
properties:
|
||
status:
|
||
type: string
|
||
mostRecentQueue:
|
||
type: string
|