@bitmovin/api-sdk
Version:
Bitmovin JS/TS API SDK
52 lines (51 loc) • 2.12 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 LatestApi_1 = require("./latest/LatestApi");
var PlayerVersion_1 = require("../../../models/PlayerVersion");
var PaginationResponse_1 = require("../../../models/PaginationResponse");
/**
* VersionsApi - object-oriented interface
* @export
* @class VersionsApi
* @extends {BaseAPI}
*/
var VersionsApi = /** @class */ (function (_super) {
__extends(VersionsApi, _super);
function VersionsApi(configuration) {
var _this = _super.call(this, configuration) || this;
_this.latest = new LatestApi_1.default(configuration);
return _this;
}
/**
* @summary List Player Versions for Channel
* @param {string} channelName Name of the channel to get the player versions for.
* @throws {BitmovinError}
* @memberof VersionsApi
*/
VersionsApi.prototype.list = function (channelName) {
var pathParamMap = {
channel_name: channelName
};
return this.restClient.get('/player/channels/{channel_name}/versions', pathParamMap).then(function (response) {
return new PaginationResponse_1.default(response, PlayerVersion_1.default);
});
};
return VersionsApi;
}(BaseAPI_1.BaseAPI));
exports.default = VersionsApi;