UNPKG

yandex-music

Version:

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

35 lines (34 loc) 1.69 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.Radio = void 0; const log_decorator_1 = require("../../decorators/log.decorator"); class Radio { constructor(rotor) { this.rotor = rotor; } /** * @param {string} station Station. * @param {string} from Where the radio playback started from. * @param {string} batch_id Unique identifier of the batch of tracks. Returned when receiving tracks. * @returns Ok if the request is successful */ async started(station, from, batch_id) { return await this.rotor.feedback(station, "radioStarted", from, batch_id); } } __decorate([ (0, log_decorator_1.log)(), __metadata("design:type", Function), __metadata("design:paramtypes", [String, String, String]), __metadata("design:returntype", Promise) ], Radio.prototype, "started", null); exports.Radio = Radio;