@bitmovin/api-sdk
Version:
Bitmovin JS/TS API SDK
98 lines (97 loc) • 4.13 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 Id3Api_1 = require("./id3/Id3Api");
const DrmApi_1 = require("./drm/DrmApi");
const BitmovinResponse_1 = require("../../../../models/BitmovinResponse");
const ProgressiveTsMuxing_1 = require("../../../../models/ProgressiveTsMuxing");
const PaginationResponse_1 = require("../../../../models/PaginationResponse");
const ProgressiveTsMuxingListQueryParams_1 = require("./ProgressiveTsMuxingListQueryParams");
/**
* ProgressiveTsApi - object-oriented interface
* @export
* @class ProgressiveTsApi
* @extends {BaseAPI}
*/
class ProgressiveTsApi extends BaseAPI_1.BaseAPI {
constructor(configuration) {
super(configuration);
this.customdata = new CustomdataApi_1.default(configuration);
this.information = new InformationApi_1.default(configuration);
this.id3 = new Id3Api_1.default(configuration);
this.drm = new DrmApi_1.default(configuration);
}
/**
* @summary Add Progressive TS muxing
* @param {string} encodingId ID of the encoding.
* @param {ProgressiveTsMuxing} progressiveTsMuxing The Progressive TS muxing to be created
* @throws {BitmovinError}
* @memberof ProgressiveTsApi
*/
create(encodingId, progressiveTsMuxing) {
const pathParamMap = {
encoding_id: encodingId
};
return this.restClient.post('/encoding/encodings/{encoding_id}/muxings/progressive-ts', pathParamMap, progressiveTsMuxing).then((response) => {
return (0, Mapper_1.map)(response, ProgressiveTsMuxing_1.default);
});
}
/**
* @summary Delete Progressive TS muxing
* @param {string} encodingId ID of the Encoding.
* @param {string} muxingId ID of the Progressive TS muxing
* @throws {BitmovinError}
* @memberof ProgressiveTsApi
*/
delete(encodingId, muxingId) {
const pathParamMap = {
encoding_id: encodingId,
muxing_id: muxingId
};
return this.restClient.delete('/encoding/encodings/{encoding_id}/muxings/progressive-ts/{muxing_id}', pathParamMap).then((response) => {
return (0, Mapper_1.map)(response, BitmovinResponse_1.default);
});
}
/**
* @summary Progressive TS muxing details
* @param {string} encodingId ID of the Encoding.
* @param {string} muxingId ID of the Progressive TS muxing
* @throws {BitmovinError}
* @memberof ProgressiveTsApi
*/
get(encodingId, muxingId) {
const pathParamMap = {
encoding_id: encodingId,
muxing_id: muxingId
};
return this.restClient.get('/encoding/encodings/{encoding_id}/muxings/progressive-ts/{muxing_id}', pathParamMap).then((response) => {
return (0, Mapper_1.map)(response, ProgressiveTsMuxing_1.default);
});
}
/**
* @summary List Progressive TS muxings
* @param {string} encodingId ID of the Encoding.
* @param {*} [queryParameters] query parameters for filtering, sorting and pagination
* @throws {BitmovinError}
* @memberof ProgressiveTsApi
*/
list(encodingId, queryParameters) {
const pathParamMap = {
encoding_id: encodingId
};
let queryParams = {};
if (typeof queryParameters === 'function') {
queryParams = queryParameters(new ProgressiveTsMuxingListQueryParams_1.ProgressiveTsMuxingListQueryParamsBuilder()).buildQueryParams();
}
else if (queryParameters) {
queryParams = queryParameters;
}
return this.restClient.get('/encoding/encodings/{encoding_id}/muxings/progressive-ts', pathParamMap, queryParams).then((response) => {
return new PaginationResponse_1.default(response, ProgressiveTsMuxing_1.default);
});
}
}
exports.default = ProgressiveTsApi;