UNPKG

yandex-music

Version:

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

34 lines 1.36 kB
import { YandexMusicClient } from "../../client"; import { List } from "../../interfaces"; import { Albums } from "./albums"; import { Artists } from "./artists"; import { Playlists } from "./playlists"; import { Tracks } from "./tracks"; declare type action = "track" | "artist" | "playlist" | "album"; export declare class Likes { readonly client: YandexMusicClient; readonly albums: Albums; readonly artists: Artists; readonly playlists: Playlists; readonly tracks: Tracks; constructor(client: YandexMusicClient); /** * Actions marked "I like". * @param {action} type The type of the object. * @param {List} ids * @param {boolean} remove If True, then removes the mark, otherwise puts. * @param {number} user_id Unique user ID. * @returns OK if the request is successful. */ action(type: action, ids: List, remove?: boolean, user_id?: number): Promise<string>; /** * Getting objects marked "I like". * @param {action} type The type of the object. * @param {number} user_id Unique user ID. * @param {Record<string, any>} params Parameters to be passed to the request. * @returns Obj type. */ get<T>(type: action, user_id?: number, params?: Record<string, any>): Promise<T>; } export {}; //# sourceMappingURL=index.d.ts.map