UNPKG

@bitmovin/api-sdk

Version:

Bitmovin JS/TS API SDK

41 lines (40 loc) 1.66 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const BaseAPI_1 = require("../../../../../common/BaseAPI"); const LiveEncodingStatsEvent_1 = require("../../../../../models/LiveEncodingStatsEvent"); const PaginationResponse_1 = require("../../../../../models/PaginationResponse"); const LiveEncodingStatsEventListQueryParams_1 = require("./LiveEncodingStatsEventListQueryParams"); /** * EventsApi - object-oriented interface * @export * @class EventsApi * @extends {BaseAPI} */ class EventsApi extends BaseAPI_1.BaseAPI { constructor(configuration) { super(configuration); } /** * @summary List Events of Live Statistics from an Encoding * @param {string} encodingId Id of the encoding. * @param {*} [queryParameters] query parameters for filtering, sorting and pagination * @throws {BitmovinError} * @memberof EventsApi */ list(encodingId, queryParameters) { const pathParamMap = { encoding_id: encodingId }; let queryParams = {}; if (typeof queryParameters === 'function') { queryParams = queryParameters(new LiveEncodingStatsEventListQueryParams_1.LiveEncodingStatsEventListQueryParamsBuilder()).buildQueryParams(); } else if (queryParameters) { queryParams = queryParameters; } return this.restClient.get('/encoding/statistics/encodings/{encoding_id}/live-statistics/events', pathParamMap, queryParams).then((response) => { return new PaginationResponse_1.default(response, LiveEncodingStatsEvent_1.default); }); } } exports.default = EventsApi;