tallysticks
v1.0.2
Published
Tallysticks
Downloads
4
Readme
Tallysticks NodeJS client
npm install --save tallysticks
Usage
Initialization
var Tallysticks = require('tallysticks')
var tallysticks = new Tallysticks({
debug: true,
protocol: "http",
host: "localhost",
port: "3001",
timeout: 5000,
headers: {
"user-agent": "Tallysticks DAPP"
}
})
Authentication
tallysticks.authenticate({
type: 'token',
token: 'secret'
})
Example requests
tallysticks.organizations.getAll({
kind: 'Company'
}, (err, res) => {
if (err) console.log(err.code)
else console.log(res)
})
tallysticks.organizations.get({
id: '1'
}, (err, res) => {
if (err) console.log(err.code)
else console.log(res)
})