https://github.com/traderinteractive/tol-api-nodejs
A node.js client for the TOL API
https://github.com/traderinteractive/tol-api-nodejs
Last synced: about 1 year ago
JSON representation
A node.js client for the TOL API
- Host: GitHub
- URL: https://github.com/traderinteractive/tol-api-nodejs
- Owner: traderinteractive
- License: mit
- Created: 2013-12-04T18:55:42.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2024-05-09T17:21:17.000Z (about 2 years ago)
- Last Synced: 2025-03-24T10:56:32.165Z (over 1 year ago)
- Language: JavaScript
- Size: 55.7 KB
- Stars: 1
- Watchers: 19
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TOL Api
A node.js API client for the TOL APIs.
###Requirements
The api client requires [q](https://github.com/kriskowal/q), [request](https://github.com/request/request), and [underscore.js](http://underscorejs.org/).
###Installation
There are 2 ways you can import this project.
1.) ```npm install tol-api```
2.) Add the following entry to your packages.json and then run ```npm update``` (Recommended)
```json
{
"dependencies": {
"tol-api": "0.8.x"
}
}
```
###Usage
```nodejs
//Imports the tol-api library
var clientFactory = require('tol-api');
//Creates the api client and fetches your first access token
var client = clientFactory.createClient('https://baseApiUrl/v1', 'clientId', 'clientSecret');
client.getResult('cycles', 123456789).then(function(response) {
console.log(response);
});
```