@bitmovin/api-sdk
Version:
Bitmovin JS/TS API SDK
94 lines (93 loc) • 3.97 kB
JavaScript
;
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 ProgressiveMovMuxing_1 = require("../../../../models/ProgressiveMovMuxing");
const PaginationResponse_1 = require("../../../../models/PaginationResponse");
const ProgressiveMovMuxingListQueryParams_1 = require("./ProgressiveMovMuxingListQueryParams");
/**
* ProgressiveMovApi - object-oriented interface
* @export
* @class ProgressiveMovApi
* @extends {BaseAPI}
*/
class ProgressiveMovApi 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 MOV muxing
* @param {string} encodingId Id of the encoding.
* @param {ProgressiveMovMuxing} progressiveMovMuxing The Progressive MOV muxing to be created
* @throws {BitmovinError}
* @memberof ProgressiveMovApi
*/
create(encodingId, progressiveMovMuxing) {
const pathParamMap = {
encoding_id: encodingId
};
return this.restClient.post('/encoding/encodings/{encoding_id}/muxings/progressive-mov', pathParamMap, progressiveMovMuxing).then((response) => {
return (0, Mapper_1.map)(response, ProgressiveMovMuxing_1.default);
});
}
/**
* @summary Delete Progressive MOV muxing
* @param {string} encodingId Id of the encoding.
* @param {string} muxingId Id of the Progressive MOV muxing
* @throws {BitmovinError}
* @memberof ProgressiveMovApi
*/
delete(encodingId, muxingId) {
const pathParamMap = {
encoding_id: encodingId,
muxing_id: muxingId
};
return this.restClient.delete('/encoding/encodings/{encoding_id}/muxings/progressive-mov/{muxing_id}', pathParamMap).then((response) => {
return (0, Mapper_1.map)(response, BitmovinResponse_1.default);
});
}
/**
* @summary Progressive MOV muxing details
* @param {string} encodingId Id of the encoding.
* @param {string} muxingId Id of the Progressive MOV muxing
* @throws {BitmovinError}
* @memberof ProgressiveMovApi
*/
get(encodingId, muxingId) {
const pathParamMap = {
encoding_id: encodingId,
muxing_id: muxingId
};
return this.restClient.get('/encoding/encodings/{encoding_id}/muxings/progressive-mov/{muxing_id}', pathParamMap).then((response) => {
return (0, Mapper_1.map)(response, ProgressiveMovMuxing_1.default);
});
}
/**
* @summary List Progressive MOV muxings
* @param {string} encodingId Id of the encoding.
* @param {*} [queryParameters] query parameters for filtering, sorting and pagination
* @throws {BitmovinError}
* @memberof ProgressiveMovApi
*/
list(encodingId, queryParameters) {
const pathParamMap = {
encoding_id: encodingId
};
let queryParams = {};
if (typeof queryParameters === 'function') {
queryParams = queryParameters(new ProgressiveMovMuxingListQueryParams_1.ProgressiveMovMuxingListQueryParamsBuilder()).buildQueryParams();
}
else if (queryParameters) {
queryParams = queryParameters;
}
return this.restClient.get('/encoding/encodings/{encoding_id}/muxings/progressive-mov', pathParamMap, queryParams).then((response) => {
return new PaginationResponse_1.default(response, ProgressiveMovMuxing_1.default);
});
}
}
exports.default = ProgressiveMovApi;