@bitmovin/api-sdk
Version:
Bitmovin JS/TS API SDK
76 lines (75 loc) • 4.13 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 WebhookNotificationWithStreamConditions_1 = require("../../../../../models/WebhookNotificationWithStreamConditions");
/**
* LiveInputStreamChangedApi - object-oriented interface
* @export
* @class LiveInputStreamChangedApi
* @extends {BaseAPI}
*/
var LiveInputStreamChangedApi = /** @class */ (function (_super) {
__extends(LiveInputStreamChangedApi, _super);
function LiveInputStreamChangedApi(configuration) {
return _super.call(this, configuration) || this;
}
/**
* @summary Add Live Input Stream Changed Webhook Notification (All Encodings)
* @param {WebhookNotificationWithStreamConditionsRequest} webhookNotificationWithStreamConditionsRequest The webhook notifications object
* @throws {BitmovinError}
* @memberof LiveInputStreamChangedApi
*/
LiveInputStreamChangedApi.prototype.create = function (webhookNotificationWithStreamConditionsRequest) {
return this.restClient.post('/notifications/webhooks/encoding/encodings/live-input-stream-changed', {}, webhookNotificationWithStreamConditionsRequest).then(function (response) {
return (0, Mapper_1.map)(response, WebhookNotificationWithStreamConditions_1.default);
});
};
/**
* @summary Add Live Input Stream Changed Webhook Notification (Specific Encoding)
* @param {string} encodingId Id of the encoding resource
* @param {WebhookNotificationWithStreamConditionsRequest} webhookNotificationWithStreamConditionsRequest The webhook notifications object
* @throws {BitmovinError}
* @memberof LiveInputStreamChangedApi
*/
LiveInputStreamChangedApi.prototype.createByEncodingId = function (encodingId, webhookNotificationWithStreamConditionsRequest) {
var pathParamMap = {
encoding_id: encodingId
};
return this.restClient.post('/notifications/webhooks/encoding/encodings/{encoding_id}/live-input-stream-changed', pathParamMap, webhookNotificationWithStreamConditionsRequest).then(function (response) {
return (0, Mapper_1.map)(response, WebhookNotificationWithStreamConditions_1.default);
});
};
/**
* @summary Replace Live Input Stream Changed Webhook Notification
* @param {string} notificationId Id of the webhook notification
* @param {WebhookNotificationWithStreamConditionsRequest} webhookNotificationWithStreamConditionsRequest The webhook notification with the updated values
* @throws {BitmovinError}
* @memberof LiveInputStreamChangedApi
*/
LiveInputStreamChangedApi.prototype.update = function (notificationId, webhookNotificationWithStreamConditionsRequest) {
var pathParamMap = {
notification_id: notificationId
};
return this.restClient.put('/notifications/webhooks/encoding/encodings/live-input-stream-changed/{notification_id}', pathParamMap, webhookNotificationWithStreamConditionsRequest).then(function (response) {
return (0, Mapper_1.map)(response, WebhookNotificationWithStreamConditions_1.default);
});
};
return LiveInputStreamChangedApi;
}(BaseAPI_1.BaseAPI));
exports.default = LiveInputStreamChangedApi;