UNPKG

@bitmovin/api-sdk

Version:

Bitmovin JS/TS API SDK

32 lines (31 loc) 1.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const BaseAPI_1 = require("../../../../common/BaseAPI"); const Mapper_1 = require("../../../../common/Mapper"); const PlayerVersion_1 = require("../../../../models/PlayerVersion"); /** * LatestApi - object-oriented interface * @export * @class LatestApi * @extends {BaseAPI} */ class LatestApi extends BaseAPI_1.BaseAPI { constructor(configuration) { super(configuration); } /** * @summary Get Latest Player Version for Channel * @param {string} channelName Name of the channel to get the player versions for. * @throws {BitmovinError} * @memberof LatestApi */ get(channelName) { const pathParamMap = { channel_name: channelName }; return this.restClient.get('/player/channels/{channel_name}/versions/latest', pathParamMap).then((response) => { return (0, Mapper_1.map)(response, PlayerVersion_1.default); }); } } exports.default = LatestApi;