UNPKG

yandex-music

Version:

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

45 lines (44 loc) 1.85 kB
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Feed = void 0; const log_decorator_1 = require("../decorators/log.decorator"); class Feed { constructor(client) { this.client = client; } /** * Getting a stream of information (feed) tailored to the user. Contains smart playlists. * @returns Smart user Playlists. */ async feed() { return await this.client.request.get(`/feed`); } /** * @returns True or false */ async wizard() { return await this.client.request.get(`/feed/wizard/is-passed`); } } __decorate([ (0, log_decorator_1.log)(), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise) ], Feed.prototype, "feed", null); __decorate([ (0, log_decorator_1.log)(), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise) ], Feed.prototype, "wizard", null); exports.Feed = Feed;