nuxtify-api
Version:
Lightweight music API for client without third-party libraries.
1 lines • 2.17 kB
JavaScript
;var __awaiter=this&&this.__awaiter||function(t,e,i,r){return new(i||(i=Promise))((function(a,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function n(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?a(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,n)}c((r=r.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Podcast=void 0;const base_1=require("../base");class Podcast extends base_1.Base{getHome(){return __awaiter(this,void 0,void 0,(function*(){try{const t=this.createNoIdSig("/api/v2/page/get/radio");return yield this.createRequest("/api/v2/page/get/radio",{sig:t})}catch(t){throw t}}))}getTop(){return __awaiter(this,void 0,void 0,(function*(){try{const t=this.createNoIdSig("/api/v2/podcast/program/get/top-episode");return yield this.createRequest("/api/v2/podcast/program/get/top-episode",{sig:t})}catch(t){throw t}}))}getUrl(t){return __awaiter(this,void 0,void 0,(function*(){try{const e=this.createIdSig("/api/v2/podcast/episode/get/streaming",t);return yield this.createRequest("/api/v2/podcast/episode/get/streaming",{id:t,sig:e})}catch(t){throw t}}))}getCurrentMedia(t){return __awaiter(this,void 0,void 0,(function*(){try{const e=this.createIdSig("/api/v2/livestream/program/get/detail",t);return yield this.createRequest("/api/v2/livestream/program/get/detail",{id:t,sig:e})}catch(t){throw t}}))}getDetail(t){return __awaiter(this,void 0,void 0,(function*(){try{const e=this.createIdSig("/api/v2/livestream/get/info",t);return yield this.createRequest("/api/v2/livestream/get/info",{id:t,sig:e})}catch(t){throw t}}))}getComments(t){return __awaiter(this,void 0,void 0,(function*(){try{const e=this.createCommentSig("/api/v2/download/livestream/get/comments",t);return yield this.createRequest("/api/v2/download/livestream/get/comments",{id:t,sig:e,count:50})}catch(t){throw t}}))}getAll(){return __awaiter(this,void 0,void 0,(function*(){try{const t=this.createPodcastSig("/api/v2/livestream/get/list","promote");return yield this.createRequest("/api/v2/livestream/get/list",{type:"promote",count:20,sig:t,page:1})}catch(t){throw t}}))}}exports.Podcast=Podcast;