UNPKG

@bitmovin/api-sdk

Version:

Bitmovin JS/TS API SDK

94 lines (93 loc) 3.97 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const BaseAPI_1 = require("../../../../common/BaseAPI"); const Mapper_1 = require("../../../../common/Mapper"); const CustomdataApi_1 = require("./customdata/CustomdataApi"); const InformationApi_1 = require("./information/InformationApi"); const BitmovinResponse_1 = require("../../../../models/BitmovinResponse"); const ProgressiveWavMuxing_1 = require("../../../../models/ProgressiveWavMuxing"); const PaginationResponse_1 = require("../../../../models/PaginationResponse"); const ProgressiveWavMuxingListQueryParams_1 = require("./ProgressiveWavMuxingListQueryParams"); /** * ProgressiveWavApi - object-oriented interface * @export * @class ProgressiveWavApi * @extends {BaseAPI} */ class ProgressiveWavApi extends BaseAPI_1.BaseAPI { constructor(configuration) { super(configuration); this.customdata = new CustomdataApi_1.default(configuration); this.information = new InformationApi_1.default(configuration); } /** * @summary Add Progressive Wav muxing * @param {string} encodingId Id of the encoding. * @param {ProgressiveWavMuxing} progressiveWavMuxing The Progressive WAV muxing to be created * @throws {BitmovinError} * @memberof ProgressiveWavApi */ create(encodingId, progressiveWavMuxing) { const pathParamMap = { encoding_id: encodingId }; return this.restClient.post('/encoding/encodings/{encoding_id}/muxings/progressive-wav', pathParamMap, progressiveWavMuxing).then((response) => { return (0, Mapper_1.map)(response, ProgressiveWavMuxing_1.default); }); } /** * @summary Delete Progressive WAV muxing * @param {string} encodingId Id of the encoding. * @param {string} muxingId Id of the Progressive WAV muxing * @throws {BitmovinError} * @memberof ProgressiveWavApi */ delete(encodingId, muxingId) { const pathParamMap = { encoding_id: encodingId, muxing_id: muxingId }; return this.restClient.delete('/encoding/encodings/{encoding_id}/muxings/progressive-wav/{muxing_id}', pathParamMap).then((response) => { return (0, Mapper_1.map)(response, BitmovinResponse_1.default); }); } /** * @summary Progressive WAV muxing details * @param {string} encodingId Id of the encoding. * @param {string} muxingId Id of the Progressive WAV muxing * @throws {BitmovinError} * @memberof ProgressiveWavApi */ get(encodingId, muxingId) { const pathParamMap = { encoding_id: encodingId, muxing_id: muxingId }; return this.restClient.get('/encoding/encodings/{encoding_id}/muxings/progressive-wav/{muxing_id}', pathParamMap).then((response) => { return (0, Mapper_1.map)(response, ProgressiveWavMuxing_1.default); }); } /** * @summary List Progressive WAV muxings * @param {string} encodingId Id of the encoding. * @param {*} [queryParameters] query parameters for filtering, sorting and pagination * @throws {BitmovinError} * @memberof ProgressiveWavApi */ list(encodingId, queryParameters) { const pathParamMap = { encoding_id: encodingId }; let queryParams = {}; if (typeof queryParameters === 'function') { queryParams = queryParameters(new ProgressiveWavMuxingListQueryParams_1.ProgressiveWavMuxingListQueryParamsBuilder()).buildQueryParams(); } else if (queryParameters) { queryParams = queryParameters; } return this.restClient.get('/encoding/encodings/{encoding_id}/muxings/progressive-wav', pathParamMap, queryParams).then((response) => { return new PaginationResponse_1.default(response, ProgressiveWavMuxing_1.default); }); } } exports.default = ProgressiveWavApi;