@glasskube/distr-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

Distr SDK

You can install the Distr SDK for JavaScript from npmjs.org:

npm install --save @glasskube/distr-sdk

Conceptually, the SDK is divided into two parts:

  • A high-level service called DistrService, which provides a simplified interface for interacting with the Distr API.
  • A low-level client called Client, which provides a more direct interface for interacting with the Distr API.

In order to connect to the Distr API, you have to create a Personal Access Token (PAT) in the Distr web interface. Optionally, you can specify the URL of the Distr API you want to communicate with. It defaults to https://app.distr.sh/api/v1.

import {DistrService} from '@glasskube/distr-sdk';
const service = new DistrService({
  // to use your selfhosted instance, set apiBase: 'https://selfhosted-instance.company/api/v1',
  apiKey: '<your-personal-access-token-here>',
});
// do something with the service

The src/examples directory contains examples of how to use the SDK.

See the docs for more information.

/@glasskube/distr-sdk/

    Package Sidebar

    Install

    npm i @glasskube/distr-sdk

    Homepage

    distr.sh

    Weekly Downloads

    193

    Version

    1.2.1

    License

    Apache-2.0

    Unpacked Size

    37.8 kB

    Total Files

    50

    Last publish

    Collaborators

    • pmig
    • glasskube-bot
    • kosmoz_glasskube