Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
package.json
readme.md
treasuryio.js

readme.md

treasuryiojs

This is a treasury.io client for JavaScript. It can return a csv or a json response depending on whether you pass either string as the second argument..

Install

npm install treasuryio

Run with a csv response

var treasuryio = require('treasuryio')
treasuryio('SELECT * FROM t1 LIMIT 10', 'csv', function(response){
    console.log(response);
});

Run with a json response

var treasuryio = require('treasuryio')
treasuryio('SELECT * FROM t1 LIMIT 10', 'json', function(response){
    console.log(response);
});

Test

To test that it works in the browser, open this page. You should see the first ten rows of of t1, Operating Cash Balance.

To test that it works in node, run

cd test
npm install treasuryio
node test.js

It should print the first ten rows from t1, "Operating Cash Balance.

Something went wrong with that request. Please try again.