How to use the @here/olp-sdk-dataservice-api.ArtifactApi.getSchemaUsingGET 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 / ArtifactClient.ts View on Github external
return Promise.reject(
                new Error(
                    `Please provide the schema HRN by schemaDetailsRequest.withScema()`
                )
            );
        }

        const hrnStr = hrn.toString();

        const request = await RequestFactory.create(
            "artifact",
            this.apiVersion,
            this.settings
        ).catch(error => Promise.reject(error));

        return ArtifactApi.getSchemaUsingGET(request, {
            schemaHrn: hrnStr
        }).catch(() => Promise.reject(`Cannot get schema details: ${hrnStr}`));
    }