UNPKG

@bitmovin/api-sdk

Version:

Bitmovin JS/TS API SDK

47 lines (46 loc) 1.79 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const BaseAPI_1 = require("../../../../common/BaseAPI"); const Mapper_1 = require("../../../../common/Mapper"); const LiveStandbyPoolEncoding_1 = require("../../../../models/LiveStandbyPoolEncoding"); /** * ActionsApi - object-oriented interface * @export * @class ActionsApi * @extends {BaseAPI} */ class ActionsApi extends BaseAPI_1.BaseAPI { constructor(configuration) { super(configuration); } /** * @summary Acquire an encoding from a standby pool * @param {string} poolId Id of the standby pool * @param {LiveStandbyPoolAcquireEncoding} [liveStandbyPoolAcquireEncoding] The optionally provided payload for acquiring an encoding * @throws {BitmovinError} * @memberof ActionsApi */ acquireEncoding(poolId, liveStandbyPoolAcquireEncoding) { const pathParamMap = { pool_id: poolId }; return this.restClient.post('/encoding/live/standby-pools/{pool_id}/actions/acquire-encoding', pathParamMap, liveStandbyPoolAcquireEncoding).then((response) => { return (0, Mapper_1.map)(response, LiveStandbyPoolEncoding_1.default); }); } /** * @summary Delete error encodings from the standby pool * @param {string} poolId Id of the standby pool * @throws {BitmovinError} * @memberof ActionsApi */ deleteErrorEncodings(poolId) { const pathParamMap = { pool_id: poolId }; return this.restClient.post('/encoding/live/standby-pools/{pool_id}/actions/delete-error-encodings', pathParamMap).then((response) => { return (0, Mapper_1.map)(response, LiveStandbyPoolEncoding_1.default); }); } } exports.default = ActionsApi;