@bitmovin/api-sdk
Version:
Bitmovin JS/TS API SDK
62 lines (61 loc) • 2.39 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 PlayerThirdPartyLicensing_1 = require("../../../models/PlayerThirdPartyLicensing");
/**
* ThirdPartyLicensingApi - object-oriented interface
* @export
* @class ThirdPartyLicensingApi
* @extends {BaseAPI}
*/
class ThirdPartyLicensingApi extends BaseAPI_1.BaseAPI {
constructor(configuration) {
super(configuration);
}
/**
* @summary Enable Third Party Licensing
* @param {string} licenseId Id of the Player License
* @param {PlayerThirdPartyLicensing} playerThirdPartyLicensing Third Party Licensing settings to apply to Player License
* @throws {BitmovinError}
* @memberof ThirdPartyLicensingApi
*/
create(licenseId, playerThirdPartyLicensing) {
const pathParamMap = {
license_id: licenseId
};
return this.restClient.post('/player/licenses/{license_id}/third-party-licensing', pathParamMap, playerThirdPartyLicensing).then((response) => {
return (0, Mapper_1.map)(response, PlayerThirdPartyLicensing_1.default);
});
}
/**
* @summary Delete Third Party Licensing Configuration
* @param {string} licenseId Id of the Player License
* @throws {BitmovinError}
* @memberof ThirdPartyLicensingApi
*/
delete(licenseId) {
const pathParamMap = {
license_id: licenseId
};
return this.restClient.delete('/player/licenses/{license_id}/third-party-licensing', pathParamMap).then((response) => {
return (0, Mapper_1.map)(response, BitmovinResponse_1.default);
});
}
/**
* @summary Get Third Party Licensing Configuration
* @param {string} licenseId Id of the Player License
* @throws {BitmovinError}
* @memberof ThirdPartyLicensingApi
*/
get(licenseId) {
const pathParamMap = {
license_id: licenseId
};
return this.restClient.get('/player/licenses/{license_id}/third-party-licensing', pathParamMap).then((response) => {
return (0, Mapper_1.map)(response, PlayerThirdPartyLicensing_1.default);
});
}
}
exports.default = ThirdPartyLicensingApi;