UNPKG

@bitmovin/api-sdk

Version:

Bitmovin JS/TS API SDK

59 lines (58 loc) 3.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const BaseAPI_1 = require("../../../../../common/BaseAPI"); const Mapper_1 = require("../../../../../common/Mapper"); const WebhookNotificationWithStreamConditions_1 = require("../../../../../models/WebhookNotificationWithStreamConditions"); /** * LiveInputStreamChangedApi - object-oriented interface * @export * @class LiveInputStreamChangedApi * @extends {BaseAPI} */ class LiveInputStreamChangedApi extends BaseAPI_1.BaseAPI { constructor(configuration) { super(configuration); } /** * @summary Add Live Input Stream Changed Webhook Notification (All Encodings) * @param {WebhookNotificationWithStreamConditionsRequest} webhookNotificationWithStreamConditionsRequest The webhook notifications object * @throws {BitmovinError} * @memberof LiveInputStreamChangedApi */ create(webhookNotificationWithStreamConditionsRequest) { return this.restClient.post('/notifications/webhooks/encoding/encodings/live-input-stream-changed', {}, webhookNotificationWithStreamConditionsRequest).then((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 */ createByEncodingId(encodingId, webhookNotificationWithStreamConditionsRequest) { const pathParamMap = { encoding_id: encodingId }; return this.restClient.post('/notifications/webhooks/encoding/encodings/{encoding_id}/live-input-stream-changed', pathParamMap, webhookNotificationWithStreamConditionsRequest).then((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 */ update(notificationId, webhookNotificationWithStreamConditionsRequest) { const pathParamMap = { notification_id: notificationId }; return this.restClient.put('/notifications/webhooks/encoding/encodings/live-input-stream-changed/{notification_id}', pathParamMap, webhookNotificationWithStreamConditionsRequest).then((response) => { return (0, Mapper_1.map)(response, WebhookNotificationWithStreamConditions_1.default); }); } } exports.default = LiveInputStreamChangedApi;