1.0.0 • Published 2 years ago

digital-humani-js-sdk v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

DigitalHumani JS SDK

Continuous Integrations License Package tree-shaking Package minified & gzipped size Package dependency count

Installation

This library is published in the NPM registry and can be installed using any compatible package manager.

npm install digital-humani-js-sdk --save

Or if you're using Yarn

yarn add digital-humani-js-sdk

Getting started

Setting the environment variables

To work, the library require 2 env variables:

DIGITALHUMANI_ENV=<prod | sandbox>
DIGITALHUMANI_API_KEY=<your-api-key>

Those variables are used to initialize the SDK.

Use the SDK

The main class is a singleton that is instanciated the first time that is called. The fields of the main class are repositories. Every repository has methods that are used to interact with the API of Digital Humani.

import dh from 'digital-humani-js-sdk';

// dh.i is a shortcut of dh.instance
dh.i.projectRepo.getProjects().then((projects) => console.log(projects));

Documentation

Documentation generated from source files by Typedoc.

License

Released under MIT License.