@bitmovin/api-sdk
Version:
Bitmovin JS/TS API SDK
75 lines (74 loc) • 3.07 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 Mapper_1 = require("../../../../../common/Mapper");
var CencApi_1 = require("./cenc/CencApi");
var SpekeApi_1 = require("./speke/SpekeApi");
var Drm_1 = require("../../../../../models/Drm");
var PaginationResponse_1 = require("../../../../../models/PaginationResponse");
/**
* DrmApi - object-oriented interface
* @export
* @class DrmApi
* @extends {BaseAPI}
*/
var DrmApi = /** @class */ (function (_super) {
__extends(DrmApi, _super);
function DrmApi(configuration) {
var _this = _super.call(this, configuration) || this;
_this.cenc = new CencApi_1.default(configuration);
_this.speke = new SpekeApi_1.default(configuration);
return _this;
}
/**
* @summary DRM Details of a Progressive WEBM muxing
* @param {string} encodingId Id of the encoding.
* @param {string} muxingId Id of the Progressive WEBM muxing
* @param {string} drmId Id of the DRM.
* @throws {BitmovinError}
* @memberof DrmApi
*/
DrmApi.prototype.get = function (encodingId, muxingId, drmId) {
var pathParamMap = {
encoding_id: encodingId,
muxing_id: muxingId,
drm_id: drmId
};
return this.restClient.get('/encoding/encodings/{encoding_id}/muxings/progressive-webm/{muxing_id}/drm/{drm_id}', pathParamMap).then(function (response) {
return (0, Mapper_1.map)(response, Drm_1.default);
});
};
/**
* @summary List all DRMs of Progressive WEBM muxing
* @param {string} encodingId Id of the encoding.
* @param {string} muxingId Id of the Progressive WEBM muxing
* @throws {BitmovinError}
* @memberof DrmApi
*/
DrmApi.prototype.list = function (encodingId, muxingId) {
var pathParamMap = {
encoding_id: encodingId,
muxing_id: muxingId
};
return this.restClient.get('/encoding/encodings/{encoding_id}/muxings/progressive-webm/{muxing_id}/drm', pathParamMap).then(function (response) {
return new PaginationResponse_1.default(response, Drm_1.default);
});
};
return DrmApi;
}(BaseAPI_1.BaseAPI));
exports.default = DrmApi;