How to use the @here/olp-sdk-dataservice-api.MetadataApi.listVersions 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 / CatalogClient.ts View on Github external
public async getVersions(
        request: CatalogVersionRequest,
        abortSignal?: AbortSignal
    ): Promise {
        const startVersion = request.getStartVersion() || -1;
        let endVersion = request.getEndVersion();
        if (endVersion === undefined) {
            endVersion = await this.getLatestVersion(request);
        }

        const builder = await this.getRequestBuilder(
            "metadata",
            HRN.fromString(this.hrn),
            abortSignal
        ).catch(error => Promise.reject(error));
        return MetadataApi.listVersions(builder, {
            startVersion,
            endVersion,
            billingTag: request.getBillingTag()
        });
    }