priceplan

1.0.8 • Public • Published

PricePlan API

This is a simple Promise based module to work with PricePlan API

Usage

Available methods:

  • get(endpoint,[data])
  • post(endpoint,[data])
  • delete(endpoint,[data])

Example

const PP = require('priceplan');
let pp = new PP('https://yourdomain.priceplan.pro/api/','userApiKey','userPassword');
pp.proxy = 'http://127.0.0.1:8888'; //Enables proxy
pp.debug = true; //Enables console.info
 
//Get Users
pp.get(`clients/`)
.then(results=>{
    ...
})
 
//Create User
let user = {
    name:"Client #16",
    type:2,
    signed_values:{id:"someInternalId"}
}
pp.post(`clients/`,user)
.then(results=>{
    ...
})
 
//Delete User
pp.delete(`clients/1`)
.then(results=>{
    ...
})

Readme

Keywords

Package Sidebar

Install

npm i priceplan

Weekly Downloads

2

Version

1.0.8

License

ISC

Unpacked Size

9.93 kB

Total Files

3

Last publish

Collaborators

  • badvolt