1.0.2 • Published 8 years ago

tallysticks v1.0.2

Weekly downloads
9
License
-
Repository
-
Last release
8 years ago

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)
})