UNPKG

@bitmovin/api-sdk

Version:

Bitmovin JS/TS API SDK

34 lines (33 loc) 1.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const BaseAPI_1 = require("../../../common/BaseAPI"); const LatestApi_1 = require("./latest/LatestApi"); const PlayerVersion_1 = require("../../../models/PlayerVersion"); const PaginationResponse_1 = require("../../../models/PaginationResponse"); /** * VersionsApi - object-oriented interface * @export * @class VersionsApi * @extends {BaseAPI} */ class VersionsApi extends BaseAPI_1.BaseAPI { constructor(configuration) { super(configuration); this.latest = new LatestApi_1.default(configuration); } /** * @summary List Player Versions for Channel * @param {string} channelName Name of the channel to get the player versions for. * @throws {BitmovinError} * @memberof VersionsApi */ list(channelName) { const pathParamMap = { channel_name: channelName }; return this.restClient.get('/player/channels/{channel_name}/versions', pathParamMap).then((response) => { return new PaginationResponse_1.default(response, PlayerVersion_1.default); }); } } exports.default = VersionsApi;