@bitmovin/api-sdk
Version:
Bitmovin JS/TS API SDK
62 lines (61 loc) • 2.29 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const BaseAPI_1 = require("../../../common/BaseAPI");
const Mapper_1 = require("../../../common/Mapper");
const BitmovinResponse_1 = require("../../../models/BitmovinResponse");
const KantarWatermark_1 = require("../../../models/KantarWatermark");
/**
* KantarWatermarkApi - object-oriented interface
* @export
* @class KantarWatermarkApi
* @extends {BaseAPI}
*/
class KantarWatermarkApi extends BaseAPI_1.BaseAPI {
constructor(configuration) {
super(configuration);
}
/**
* @summary Create or replace the Kantar Watermark for an encoding
* @param {string} encodingId Id of the encoding.
* @param {KantarWatermark} kantarWatermark The Kantar Watermark to be created
* @throws {BitmovinError}
* @memberof KantarWatermarkApi
*/
create(encodingId, kantarWatermark) {
const pathParamMap = {
encoding_id: encodingId
};
return this.restClient.post('/encoding/encodings/{encoding_id}/kantar-watermark', pathParamMap, kantarWatermark).then((response) => {
return (0, Mapper_1.map)(response, KantarWatermark_1.default);
});
}
/**
* @summary Delete the Kantar Watermark for an encoding
* @param {string} encodingId Id of the encoding.
* @throws {BitmovinError}
* @memberof KantarWatermarkApi
*/
delete(encodingId) {
const pathParamMap = {
encoding_id: encodingId
};
return this.restClient.delete('/encoding/encodings/{encoding_id}/kantar-watermark', pathParamMap).then((response) => {
return (0, Mapper_1.map)(response, BitmovinResponse_1.default);
});
}
/**
* @summary Get the Kantar Watermark for an encoding
* @param {string} encodingId Id of the encoding.
* @throws {BitmovinError}
* @memberof KantarWatermarkApi
*/
get(encodingId) {
const pathParamMap = {
encoding_id: encodingId
};
return this.restClient.get('/encoding/encodings/{encoding_id}/kantar-watermark', pathParamMap).then((response) => {
return (0, Mapper_1.map)(response, KantarWatermark_1.default);
});
}
}
exports.default = KantarWatermarkApi;