UNPKG

@bitmovin/api-sdk

Version:

Bitmovin JS/TS API SDK

41 lines (40 loc) 1.6 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const BaseAPI_1 = require("../../../../common/BaseAPI"); const LiveStandbyPoolEventLog_1 = require("../../../../models/LiveStandbyPoolEventLog"); const PaginationResponse_1 = require("../../../../models/PaginationResponse"); const LiveStandbyPoolEventLogListQueryParams_1 = require("./LiveStandbyPoolEventLogListQueryParams"); /** * LogsApi - object-oriented interface * @export * @class LogsApi * @extends {BaseAPI} */ class LogsApi extends BaseAPI_1.BaseAPI { constructor(configuration) { super(configuration); } /** * @summary List event logs for a standby pool * @param {string} poolId Id of the standby pool * @param {*} [queryParameters] query parameters for filtering, sorting and pagination * @throws {BitmovinError} * @memberof LogsApi */ list(poolId, queryParameters) { const pathParamMap = { pool_id: poolId }; let queryParams = {}; if (typeof queryParameters === 'function') { queryParams = queryParameters(new LiveStandbyPoolEventLogListQueryParams_1.LiveStandbyPoolEventLogListQueryParamsBuilder()).buildQueryParams(); } else if (queryParameters) { queryParams = queryParameters; } return this.restClient.get('/encoding/live/standby-pools/{pool_id}/logs', pathParamMap, queryParams).then((response) => { return new PaginationResponse_1.default(response, LiveStandbyPoolEventLog_1.default); }); } } exports.default = LogsApi;