How to use the @here/olp-sdk-dataservice-api.CoverageApi.getDataCoverageSummary function in @here/olp-sdk-dataservice-api

To help you get started, we’ve selected a few @here/olp-sdk-dataservice-api examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github heremaps / here-olp-sdk-typescript / @here / olp-sdk-dataservice-read / lib / client / StatisticsClient.ts View on Github external
public async getSummary(
        summaryRequest: SummaryRequest
    ): Promise {
        const layerId = summaryRequest.getLayerId();
        const catalogHrn = summaryRequest.getCatalogHrn();

        if (catalogHrn === undefined) {
            return Promise.reject(new Error(`No catalogHrn provided`));
        }
        if (layerId === undefined) {
            return Promise.reject(new Error(`No layerId provided`));
        }
        const coverageRequestBuilder = await this.getRequestBuilder(
            catalogHrn
        ).catch(error => Promise.reject(error));
        return CoverageApi.getDataCoverageSummary(coverageRequestBuilder, {
            layerId
        }).catch(this.errorHandler);
    }