UNPKG

@bitmovin/api-sdk

Version:

Bitmovin JS/TS API SDK

100 lines (99 loc) 4.52 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const BaseAPI_1 = require("../../../../../common/BaseAPI"); const Mapper_1 = require("../../../../../common/Mapper"); const CustomdataApi_1 = require("./customdata/CustomdataApi"); const BitmovinResponse_1 = require("../../../../../models/BitmovinResponse"); const NexGuardFileMarker_1 = require("../../../../../models/NexGuardFileMarker"); const PaginationResponse_1 = require("../../../../../models/PaginationResponse"); const NexGuardFileMarkerListQueryParams_1 = require("./NexGuardFileMarkerListQueryParams"); /** * NexguardFileMarkerApi - object-oriented interface * @export * @class NexguardFileMarkerApi * @extends {BaseAPI} */ class NexguardFileMarkerApi extends BaseAPI_1.BaseAPI { constructor(configuration) { super(configuration); this.customdata = new CustomdataApi_1.default(configuration); } /** * @summary Add a nexguard file marker watermarking configurations * @param {string} encodingId Id of the encoding. * @param {string} streamId Id of the stream. * @param {NexGuardFileMarker} nexGuardFileMarker The nexguard file marker configurations * @throws {BitmovinError} * @memberof NexguardFileMarkerApi */ create(encodingId, streamId, nexGuardFileMarker) { const pathParamMap = { encoding_id: encodingId, stream_id: streamId }; return this.restClient.post('/encoding/encodings/{encoding_id}/streams/{stream_id}/watermarking/nexguard-file-marker', pathParamMap, nexGuardFileMarker).then((response) => { return (0, Mapper_1.map)(response, NexGuardFileMarker_1.default); }); } /** * @summary Delete nexguard file marker watermarking configurations * @param {string} encodingId Id of the encoding. * @param {string} streamId Id of the stream. * @param {string} nexguardId Id of the nexguard file marker watermarking configurations * @throws {BitmovinError} * @memberof NexguardFileMarkerApi */ delete(encodingId, streamId, nexguardId) { const pathParamMap = { encoding_id: encodingId, stream_id: streamId, nexguard_id: nexguardId }; return this.restClient.delete('/encoding/encodings/{encoding_id}/streams/{stream_id}/watermarking/nexguard-file-marker/{nexguard_id}', pathParamMap).then((response) => { return (0, Mapper_1.map)(response, BitmovinResponse_1.default); }); } /** * @summary Nexguard file marker watermarking configurations details * @param {string} encodingId Id of the encoding. * @param {string} streamId Id of the stream. * @param {string} nexguardId Id of the nexguard file marker watermarking configurations. * @throws {BitmovinError} * @memberof NexguardFileMarkerApi */ get(encodingId, streamId, nexguardId) { const pathParamMap = { encoding_id: encodingId, stream_id: streamId, nexguard_id: nexguardId }; return this.restClient.get('/encoding/encodings/{encoding_id}/streams/{stream_id}/watermarking/nexguard-file-marker/{nexguard_id}', pathParamMap).then((response) => { return (0, Mapper_1.map)(response, NexGuardFileMarker_1.default); }); } /** * @summary List nexguard file marker watermarking configurations * @param {string} encodingId Id of the encoding. * @param {string} streamId Id of the stream. * @param {*} [queryParameters] query parameters for filtering, sorting and pagination * @throws {BitmovinError} * @memberof NexguardFileMarkerApi */ list(encodingId, streamId, queryParameters) { const pathParamMap = { encoding_id: encodingId, stream_id: streamId }; let queryParams = {}; if (typeof queryParameters === 'function') { queryParams = queryParameters(new NexGuardFileMarkerListQueryParams_1.NexGuardFileMarkerListQueryParamsBuilder()).buildQueryParams(); } else if (queryParameters) { queryParams = queryParameters; } return this.restClient.get('/encoding/encodings/{encoding_id}/streams/{stream_id}/watermarking/nexguard-file-marker', pathParamMap, queryParams).then((response) => { return new PaginationResponse_1.default(response, NexGuardFileMarker_1.default); }); } } exports.default = NexguardFileMarkerApi;