@borneodata/borneo-client
TypeScript icon, indicating that this package has built-in type declarations

3.14.1 • Public • Published

@borneodata/borneo-client

Borneo Client SDK

Installing

To install the this package, simply add or install using your favorite package manager:

  • npm install @borneodata/borneo-client
  • yarn add @borneodata/borneo-client

Getting Started

This SDK is used along with @borneodata/borneo-client-auth-provider SDK.

Usage

To send a request using @borneodata/borneo-client and an example command:

import { BorneoClient, DescribeCatalogResourceCommand } from '@borneodata/borneo-client';
import { BorneoAuthProvider } from '@borneodata/borneo-client-auth-provider';

async function getData() {
  const authProvider = await BorneoAuthProvider.fromConfigFile(`./Borneo-Service-Account-Token.json`);
  const client = new BorneoClient({
    endpoint: authProvider.getApiEndpoint(),
    apiKey: authProvider.getApiKey()
  });
  const input = {
    resourceId: '1bea4d02-8ce7-11ee-942f-3c7d0a1cd55d'
  };
  const cmd = new DescribeCatalogResourceCommand(input)
  const data = await client.send(cmd)
  
  // The data is returned here and can be further processed.
  console.log(data)
  return data
}

getData()

Config

const config = {
  clientId: 'STRING_VALUE', /* required */
  region: 'STRING_VALUE', /* required */
  token: 'STRING_VALUE', /* required */
  apiEndpoint: 'STRING_VALUE', /* required */
  secret: 'STRING_VALUE'
}

API Documentation

More API documentation is here at https://<my-stack>/docs/api

License

This SDK is distributed under the Apache License, Version 2.0

Readme

Keywords

none

Package Sidebar

Install

npm i @borneodata/borneo-client

Weekly Downloads

38

Version

3.14.1

License

Apache-2.0

Unpacked Size

2.05 MB

Total Files

467

Last publish

Collaborators

  • borneo-npm