nodejs-api-client
nodejs-api-client is a generic API client that can work with almost every web API. It also contains a more specific client to use with Openify.it API.
How to install
npm install --save nodejs-api-client
How to use
in CoffeeScript
Client = require('nodejs-api-client')
options =
host: '...' #default 'api.openify.it'
port: ... #default 80
apiKey: '...'
secretKey: '...'
client = new Client options
#Simple..
client.path method, path, (err, res, body) ->
#do whatever with the data
#More complexe but still quite simple..
options =
qs:
q: 'nice query'
#for more options
#https://github.com/mikeal/request#requestoptions-callback
#http://documentation.openify.it
client.path method, path, options, (err, res, body) ->
#do whatever with the data
TODOS
Add some shortcuts to the Openify.it Client like client.users(userId, callback) for all the routes of the API.