@bitmovin/api-sdk
Version:
Bitmovin JS/TS API SDK
78 lines (77 loc) • 3.19 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 H265V2VideoConfiguration_1 = require("../../../../models/H265V2VideoConfiguration");
const PaginationResponse_1 = require("../../../../models/PaginationResponse");
const H265V2VideoConfigurationListQueryParams_1 = require("./H265V2VideoConfigurationListQueryParams");
/**
* H265v2Api - object-oriented interface
* @export
* @class H265v2Api
* @extends {BaseAPI}
*/
class H265v2Api extends BaseAPI_1.BaseAPI {
constructor(configuration) {
super(configuration);
}
/**
* @summary Create H265 V2 Codec Configuration
* @param {H265V2VideoConfiguration} h265V2VideoConfiguration The H265 V2 Codec Configuration to be created
* @throws {BitmovinError}
* @memberof H265v2Api
*/
create(h265V2VideoConfiguration) {
return this.restClient.post('/encoding/configurations/video/h265v2', {}, h265V2VideoConfiguration).then((response) => {
return (0, Mapper_1.map)(response, H265V2VideoConfiguration_1.default);
});
}
/**
* @summary Delete H265 V2 Codec Configuration
* @param {string} configurationId Id of the codec configuration
* @throws {BitmovinError}
* @memberof H265v2Api
*/
delete(configurationId) {
const pathParamMap = {
configuration_id: configurationId
};
return this.restClient.delete('/encoding/configurations/video/h265v2/{configuration_id}', pathParamMap).then((response) => {
return (0, Mapper_1.map)(response, BitmovinResponse_1.default);
});
}
/**
* @summary H265 V2 Codec Configuration Details
* @param {string} configurationId Id of the codec configuration
* @throws {BitmovinError}
* @memberof H265v2Api
*/
get(configurationId) {
const pathParamMap = {
configuration_id: configurationId
};
return this.restClient.get('/encoding/configurations/video/h265v2/{configuration_id}', pathParamMap).then((response) => {
return (0, Mapper_1.map)(response, H265V2VideoConfiguration_1.default);
});
}
/**
* @summary List H265 V2 Codec Configurations
* @param {*} [queryParameters] query parameters for filtering, sorting and pagination
* @throws {BitmovinError}
* @memberof H265v2Api
*/
list(queryParameters) {
let queryParams = {};
if (typeof queryParameters === 'function') {
queryParams = queryParameters(new H265V2VideoConfigurationListQueryParams_1.H265V2VideoConfigurationListQueryParamsBuilder()).buildQueryParams();
}
else if (queryParameters) {
queryParams = queryParameters;
}
return this.restClient.get('/encoding/configurations/video/h265v2', {}, queryParams).then((response) => {
return new PaginationResponse_1.default(response, H265V2VideoConfiguration_1.default);
});
}
}
exports.default = H265v2Api;