@bimdata/typescript-fetch-api-client
TypeScript icon, indicating that this package has built-in type declarations

10.1.0 • Public • Published

@bimdata/typescript-fetch-api-client

This package provide a javascript client to interact with BIMData API as well as all necessary typings for usage in typescript projects and autocompletion in VSCode.

This package is generated using OpenAPI Generator.

Installation

To install this package simply run: npm install @bimdata/typescript-fetch-api-client

Usage

Note: This section is about using the typescript-fetch API client in your project, if you want to know more about BIMData API and what's possible to do with it, please refer to the documentation.

Initialize and use an API client

In order to perform calls to the API you'll need to create an API client with a configuration object. The snippet below shows an example of how to do it.

The credentials argument is optional and adds this option to the fetch method. If it is not set, the default option for fetch will be used.

import { makeBIMDataApiClient } from '@bimdata/typescript-fetch-api-client';

const apiClient = makeBIMDataApiClient({ apiUrl, accessToken, credentials });

apiClient.collaborationApi.getClouds().then(
  clouds => console.log('Here is the list of clouds: ', clouds)
);

Once the client is created you can update its access token this way:

apiClient.accessToken = newAccessToken

Readme

Keywords

none

Package Sidebar

Install

npm i @bimdata/typescript-fetch-api-client

Weekly Downloads

90

Version

10.1.0

License

none

Unpacked Size

2.36 MB

Total Files

504

Last publish

Collaborators

  • amoki
  • gaellelrx
  • kurtil
  • amineau-bimdata
  • bimdata-io
  • nykori