UNPKG

yandex-music

Version:

Creative and progressive Node.js framework for applications that interact with yandex music

65 lines 2.88 kB
import { YandexMusicClient } from "../client"; import { Radio } from "./radio"; import { Track } from "./track"; import { RotorDashboard, RotorList, RotorStatus, RotorTracks, Union } from "../interfaces"; declare type FeedbackType = "radioStarted" | "trackStarted" | "trackFinished" | "skip"; declare type energy = "fun" | "active" | "calm" | "sad" | "all"; declare type diver = "favorite" | "popular" | "discover" | "default"; declare type lang = "not-russian" | "russian" | "any"; declare type settings = "rotor" | "generative"; export declare class Rotor { private readonly client; readonly radio: Radio; readonly track: Track; constructor(client: YandexMusicClient); /** * Getting the user status with additional fields. * @returns User status with additional fields from the radio. */ status(): Promise<RotorStatus>; /** * Getting the recommended stations of the current user. * @returns Recommended stations. */ dashboard(): Promise<RotorDashboard>; /** * Getting all radio stations with user settings. * @returns Stations. */ list(): Promise<Array<RotorList>>; /** * Getting a chain of tracks of a certain station. * @param {string} station Station. * @returns Tracks. */ tracks(station: string): Promise<RotorTracks>; /** * Getting information about the station and user settings for it. * @param {string} station Station. * @returns Tracks. */ info(station: string): Promise<RotorList>; /** * Changing the settings of a specific station. * @param {string} station Station. * @param {energy} moodEnergy Mood. * @param {diver} diversity The type of tracks. * @param {lang} language Language. * @param {settings} type Type. * @returns OK if the request is successful. */ settings(station: string, moodEnergy: energy, diversity: diver, language?: lang, type?: settings): Promise<string>; /** * Sending a response to what is happening when listening to the radio. * @param {string} station Station * @param {FeedbackType} type Type of feedback being sent: "radioStarted", "trackStarted", "trackFinished", "skip". * @param {string} from Where the radio playback started from. * @param {string} batch_id Unique identifier of the batch of tracks. Returned when receiving tracks. * @param {number} totalPlayedSeconds How many seconds of the track were played before the action. * @param {Union} trackId The unique ID of the track. * @returns OK if the request is successful. */ feedback(station: string, type: FeedbackType, from: string, batch_id: string, totalPlayedSeconds?: number, trackId?: Union): Promise<string>; } export {}; //# sourceMappingURL=index.d.ts.map