UNPKG

@bitmovin/api-sdk

Version:

Bitmovin JS/TS API SDK

48 lines (47 loc) 1.76 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const BaseAPI_1 = require("../../../../../../common/BaseAPI"); const Mapper_1 = require("../../../../../../common/Mapper"); const CustomData_1 = require("../../../../../../models/CustomData"); /** * CustomdataApi - object-oriented interface * @export * @class CustomdataApi * @extends {BaseAPI} */ class CustomdataApi extends BaseAPI_1.BaseAPI { constructor(configuration) { super(configuration); } /** * @summary 'Encoding Finished' Webhook Custom Data for a specific Encoding * @param {string} encodingId Id of the encoding * @param {string} webhookId Id of the webhook * @throws {BitmovinError} * @memberof CustomdataApi */ getCustomDataByEncodingIdAndWebhookId(encodingId, webhookId) { const pathParamMap = { encoding_id: encodingId, webhook_id: webhookId }; return this.restClient.get('/notifications/webhooks/encoding/encodings/{encoding_id}/finished/{webhook_id}/customData', pathParamMap).then((response) => { return (0, Mapper_1.map)(response, CustomData_1.default); }); } /** * @summary 'Encoding Finished' Webhook Custom Data * @param {string} webhookId Id of the webhook * @throws {BitmovinError} * @memberof CustomdataApi */ getCustomDataByWebhookId(webhookId) { const pathParamMap = { webhook_id: webhookId }; return this.restClient.get('/notifications/webhooks/encoding/encodings/finished/{webhook_id}/customData', pathParamMap).then((response) => { return (0, Mapper_1.map)(response, CustomData_1.default); }); } } exports.default = CustomdataApi;