0.5.2 • Published 5 years ago

node-posrocket v0.5.2

Weekly downloads
8
License
MIT
Repository
github
Last release
5 years ago

NPM version

node-posrocket

Simple NodeJS wrapper for POSRocket API v1.

Getting Started

Installation

npm install node-posrocket

Setup

Basically require node-posrocket and create a token with getToken(code, client_id, client_secret, redirect_uri) function to initialize wrapper.

Example

const PR = require("node-posrocket");
const accessToken = PR.getToken(base_url, code, client_id, client_secret, redirect_uri); // to create an Access Token
const accessToken = PR.refreshToken(base_url, client_id, client_secret, refresh_token); // to refresh an expired Access Token
const posRocket = PR.initialize(base_url, accessToken); // initialize the wrapper with a created Access Token

try {
    const me = await posRocket.me.get(); // This will return the response body if the request is successful.
} catch (error) {
    // All functions throw an error if they encounter with an error.
}

Available Functions

Contributing

If you want to contribute to a project and make it better, your help is very welcome.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

0.5.2

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago