NodeJs
How to install and get started with Sky Ledge's NodeJs SDK

Installation

The Sky Ledge SDK provides convenient access to the Sky Ledge API from applications written in both server-side and client-side JavaScript/Typescript.

NPM

npm install @skyledge/sdk --save

YARN

yarn add @skyledge/sdk

Getting Started

The package needs to be configured with your account's API key, which is available from the Management section of your Sky Ledge account. Checkout Getting your Sky Ledge API Key for more detail
import { Configuration } from '@skyledge/sdk';
const configuration = new Configuration({
apiKey: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX',
basePath: 'https://api.skyledge.com'
});
Once you have your configuration object, you can instantiate the different Sky Ledge APIs. Here's an example of instantiating the Asset API:
import { Configuration, AssetsApi } from '@skyledge/sdk';
const configuration = new Configuration({
apiKey: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX',
basePath: 'https://api.skyledge.com'
});
const assetsApi = new AssetsApi(configuration);
const assets = await assetsApi.listAssets();
You can always reach out to us on [email protected] if you get stuck or have any feedback. We’re always open to taking your suggestions on board. You can also get in touch by joining our Slack Community.
Copy link
Outline
Installation
NPM
YARN
Getting Started