@ezpaarse-project/ezreeport-sdk-js
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

@ezpaarse-project/ezreeport-sdk-js

SDK used to interact with ezREEPORT API

Features

  • ✅ User requests
  • ✅ Follow generation of report
  • ✅ Automatic parsing (dates, enums, etc.)
  • ❌ Admin requests (the ones that need API key)

Install

npm i --save @ezpaarse-project/ezreeport-sdk-js

First Usage

You will need to wrap your app with the <ezr-provider> and give some parameters :

import * as sdk from '@ezpaarse-project/ezreeport-sdk-js';

// Set URL to ezREEPORT API
sdk.setup.setURL('https://url-to-ezreeport.api/');
// Set token of current user
sdk.auth.login('mySuperSecretToken');

// You can now use sdk

// Log current user
sdk.auth.getCurrentUser()
  .then(({ content }) => { console.log(content); }),

Documentation

The documentation is available at https://ezpaarse-project.github.io/ezreeport/sdk-js

You can also run npm run build:docs && npm run docs to run it on a local server.

Readme

Keywords

none

Package Sidebar

Install

npm i @ezpaarse-project/ezreeport-sdk-js

Weekly Downloads

4

Version

1.1.0

License

CeCILL

Unpacked Size

671 kB

Total Files

41

Last publish

Collaborators

  • oxypomme
  • nojhamster
  • pseudom
  • wilmouths