1.0.1 • Published 4 years ago

@appveen/odp-apis v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

odp-apis

A Library to integrate ODP into any application.

Examples

const ODP = require('@appveen/odp-apis');

const API = new ODP({
    host: HOST,
    username: USERNAME,
    password: PASSWORD
});
API.login().then(())=>{
    console.log(API.loginData);
    const employeeCrud = API.crud('api/c/Adam/employee');
    employeeCrud.count()
    employeeCrud.get()
    employeeCrud.list()
    employeeCrud.post()
    employeeCrud.put()
    employeeCrud.delete()
}).catch(console.error);

Features

  • API.loginData will contain the login data.
  • Heartbeats and Token Refresh is internally handled.
  • API.loginData.token will always give you the latest valid token.
  • API.crud() will return multiple methods to do curd operation.