UNPKG

@bitmovin/api-sdk

Version:

Bitmovin JS/TS API SDK

75 lines (74 loc) 3.55 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 TypeApi_1 = require("./type/TypeApi"); var AudioApi_1 = require("./audio/AudioApi"); var VideoApi_1 = require("./video/VideoApi"); var SubtitleApi_1 = require("./subtitle/SubtitleApi"); var ImageApi_1 = require("./image/ImageApi"); var RepresentationsApi_1 = require("./representations/RepresentationsApi"); var ContentprotectionApi_1 = require("./contentprotection/ContentprotectionApi"); var AdaptationSet_1 = require("../../../../../models/AdaptationSet"); var PaginationResponse_1 = require("../../../../../models/PaginationResponse"); var AdaptationSetListQueryParams_1 = require("./AdaptationSetListQueryParams"); /** * AdaptationsetsApi - object-oriented interface * @export * @class AdaptationsetsApi * @extends {BaseAPI} */ var AdaptationsetsApi = /** @class */ (function (_super) { __extends(AdaptationsetsApi, _super); function AdaptationsetsApi(configuration) { var _this = _super.call(this, configuration) || this; _this.type = new TypeApi_1.default(configuration); _this.audio = new AudioApi_1.default(configuration); _this.video = new VideoApi_1.default(configuration); _this.subtitle = new SubtitleApi_1.default(configuration); _this.image = new ImageApi_1.default(configuration); _this.representations = new RepresentationsApi_1.default(configuration); _this.contentprotection = new ContentprotectionApi_1.default(configuration); return _this; } /** * @summary List all AdaptationSets * @param {string} manifestId Id of the Manifest * @param {string} periodId Id of the Period * @param {*} [queryParameters] query parameters for filtering, sorting and pagination * @throws {BitmovinError} * @memberof AdaptationsetsApi */ AdaptationsetsApi.prototype.list = function (manifestId, periodId, queryParameters) { var pathParamMap = { manifest_id: manifestId, period_id: periodId }; var queryParams = {}; if (typeof queryParameters === 'function') { queryParams = queryParameters(new AdaptationSetListQueryParams_1.AdaptationSetListQueryParamsBuilder()).buildQueryParams(); } else if (queryParameters) { queryParams = queryParameters; } return this.restClient.get('/encoding/manifests/dash/{manifest_id}/periods/{period_id}/adaptationsets', pathParamMap, queryParams).then(function (response) { return new PaginationResponse_1.default(response, AdaptationSet_1.default); }); }; return AdaptationsetsApi; }(BaseAPI_1.BaseAPI)); exports.default = AdaptationsetsApi;