Skip to content

rantalainen/severa-api-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

severa-api-client

SeveraApiClient is a third party Severa API client for NodeJS. It is a wrapper around an API client that has been automatically generated using the OpenAPI schema provided by Severa.

Installation

Add to project's package.json:

npm install @rantalainen/severa-api-client

Import

const SeveraApiClient = require('@rantalainen/example-api-client').SeveraApiClient;

Setup client with options

Severa REST API credentials can be obtained from Severa. More information here

const severa = new SeveraApiClient(
  {
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
    scope: ['users:read', 'activities:read']
  }
);

// Access token needs to be manually fetched/refreshed before making any scoped requests.
await severa.refreshAccessToken();

Available methods can be found in the API documentation.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published