@bitmovin/api-sdk
Version:
Bitmovin JS/TS API SDK
83 lines (82 loc) • 4.01 kB
JavaScript
;
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 TypeApi_1 = require("./type/TypeApi");
var VttApi_1 = require("./vtt/VttApi");
var ImscApi_1 = require("./imsc/ImscApi");
var SpriteApi_1 = require("./sprite/SpriteApi");
var Fmp4Api_1 = require("./fmp4/Fmp4Api");
var ChunkedTextApi_1 = require("./chunkedText/ChunkedTextApi");
var CmafApi_1 = require("./cmaf/CmafApi");
var Mp4Api_1 = require("./mp4/Mp4Api");
var WebmApi_1 = require("./webm/WebmApi");
var ProgressiveWebmApi_1 = require("./progressiveWebm/ProgressiveWebmApi");
var DashRepresentation_1 = require("../../../../../../models/DashRepresentation");
var PaginationResponse_1 = require("../../../../../../models/PaginationResponse");
var DashRepresentationListQueryParams_1 = require("./DashRepresentationListQueryParams");
/**
* RepresentationsApi - object-oriented interface
* @export
* @class RepresentationsApi
* @extends {BaseAPI}
*/
var RepresentationsApi = /** @class */ (function (_super) {
__extends(RepresentationsApi, _super);
function RepresentationsApi(configuration) {
var _this = _super.call(this, configuration) || this;
_this.type = new TypeApi_1.default(configuration);
_this.vtt = new VttApi_1.default(configuration);
_this.imsc = new ImscApi_1.default(configuration);
_this.sprite = new SpriteApi_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.mp4 = new Mp4Api_1.default(configuration);
_this.webm = new WebmApi_1.default(configuration);
_this.progressiveWebm = new ProgressiveWebmApi_1.default(configuration);
return _this;
}
/**
* @summary List all DASH Representations
* @param {string} manifestId Id of the manifest
* @param {string} periodId Id of the period
* @param {string} adaptationsetId Id of the adaptation set
* @param {*} [queryParameters] query parameters for filtering, sorting and pagination
* @throws {BitmovinError}
* @memberof RepresentationsApi
*/
RepresentationsApi.prototype.list = function (manifestId, periodId, adaptationsetId, queryParameters) {
var pathParamMap = {
manifest_id: manifestId,
period_id: periodId,
adaptationset_id: adaptationsetId
};
var queryParams = {};
if (typeof queryParameters === 'function') {
queryParams = queryParameters(new DashRepresentationListQueryParams_1.DashRepresentationListQueryParamsBuilder()).buildQueryParams();
}
else if (queryParameters) {
queryParams = queryParameters;
}
return this.restClient.get('/encoding/manifests/dash/{manifest_id}/periods/{period_id}/adaptationsets/{adaptationset_id}/representations', pathParamMap, queryParams).then(function (response) {
return new PaginationResponse_1.default(response, DashRepresentation_1.default);
});
};
return RepresentationsApi;
}(BaseAPI_1.BaseAPI));
exports.default = RepresentationsApi;