yandex-music
Version:
Creative and progressive Node.js framework for applications that interact with yandex music
17 lines (16 loc) • 565 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.list = void 0;
const url_1 = require("url");
/**
* Getting an object/objects.
* @param {ObjType} type The type of the object.
* @param {List} ids The unique identifier of the object or objects.
* @returns The requested object.
*/
const list = (type, ids) => {
const playlist = type === "playlist" ? "/list" : "";
const q = { [`${type}-ids`]: ids.toString() };
return [`/${type}s${playlist}`, new url_1.URLSearchParams(q)];
};
exports.list = list;