UNPKG

@bitmovin/api-sdk

Version:

Bitmovin JS/TS API SDK

110 lines (109 loc) 5.13 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var BaseAPI_1 = require("../../../common/BaseAPI"); var Mapper_1 = require("../../../common/Mapper"); var TypeApi_1 = require("./type/TypeApi"); var Fmp4Api_1 = require("./fmp4/Fmp4Api"); var ChunkedTextApi_1 = require("./chunkedText/ChunkedTextApi"); var CmafApi_1 = require("./cmaf/CmafApi"); var SegmentedRawApi_1 = require("./segmentedRaw/SegmentedRawApi"); var PackedAudioApi_1 = require("./packedAudio/PackedAudioApi"); var TextApi_1 = require("./text/TextApi"); var TsApi_1 = require("./ts/TsApi"); var WebmApi_1 = require("./webm/WebmApi"); var Mp3Api_1 = require("./mp3/Mp3Api"); var Mp4Api_1 = require("./mp4/Mp4Api"); var MxfApi_1 = require("./mxf/MxfApi"); var ProgressiveTsApi_1 = require("./progressiveTs/ProgressiveTsApi"); var BroadcastTsApi_1 = require("./broadcastTs/BroadcastTsApi"); var ProgressiveWavApi_1 = require("./progressiveWav/ProgressiveWavApi"); var ProgressiveWebmApi_1 = require("./progressiveWebm/ProgressiveWebmApi"); var ProgressiveMovApi_1 = require("./progressiveMov/ProgressiveMovApi"); var Muxing_1 = require("../../../models/Muxing"); var PaginationResponse_1 = require("../../../models/PaginationResponse"); var MuxingListQueryParams_1 = require("./MuxingListQueryParams"); /** * MuxingsApi - object-oriented interface * @export * @class MuxingsApi * @extends {BaseAPI} */ var MuxingsApi = /** @class */ (function (_super) { __extends(MuxingsApi, _super); function MuxingsApi(configuration) { var _this = _super.call(this, configuration) || this; _this.type = new TypeApi_1.default(configuration); _this.fmp4 = new Fmp4Api_1.default(configuration); _this.chunkedText = new ChunkedTextApi_1.default(configuration); _this.cmaf = new CmafApi_1.default(configuration); _this.segmentedRaw = new SegmentedRawApi_1.default(configuration); _this.packedAudio = new PackedAudioApi_1.default(configuration); _this.text = new TextApi_1.default(configuration); _this.ts = new TsApi_1.default(configuration); _this.webm = new WebmApi_1.default(configuration); _this.mp3 = new Mp3Api_1.default(configuration); _this.mp4 = new Mp4Api_1.default(configuration); _this.mxf = new MxfApi_1.default(configuration); _this.progressiveTs = new ProgressiveTsApi_1.default(configuration); _this.broadcastTs = new BroadcastTsApi_1.default(configuration); _this.progressiveWav = new ProgressiveWavApi_1.default(configuration); _this.progressiveWebm = new ProgressiveWebmApi_1.default(configuration); _this.progressiveMov = new ProgressiveMovApi_1.default(configuration); return _this; } /** * @summary Muxing Details * @param {string} encodingId Id of the encoding. * @param {string} muxingId Id of the muxing. * @throws {BitmovinError} * @memberof MuxingsApi */ MuxingsApi.prototype.get = function (encodingId, muxingId) { var pathParamMap = { encoding_id: encodingId, muxing_id: muxingId }; return this.restClient.get('/encoding/encodings/{encoding_id}/muxings/{muxing_id}', pathParamMap).then(function (response) { return (0, Mapper_1.map)(response, Muxing_1.default); }); }; /** * @summary List All Muxings * @param {string} encodingId Id of the encoding. * @param {*} [queryParameters] query parameters for filtering, sorting and pagination * @throws {BitmovinError} * @memberof MuxingsApi */ MuxingsApi.prototype.list = function (encodingId, queryParameters) { var pathParamMap = { encoding_id: encodingId }; var queryParams = {}; if (typeof queryParameters === 'function') { queryParams = queryParameters(new MuxingListQueryParams_1.MuxingListQueryParamsBuilder()).buildQueryParams(); } else if (queryParameters) { queryParams = queryParameters; } return this.restClient.get('/encoding/encodings/{encoding_id}/muxings', pathParamMap, queryParams).then(function (response) { return new PaginationResponse_1.default(response, Muxing_1.default); }); }; return MuxingsApi; }(BaseAPI_1.BaseAPI)); exports.default = MuxingsApi;