Created
March 3, 2014 17:14
-
-
Save xcambar/9329773 to your computer and use it in GitHub Desktop.
Example of Hull API with node-restify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var restify = require('restify'); | |
var client = restify.createJsonClient({ | |
url: 'https://YOUR_ORG_NAMESPACE.hullapp.io', | |
headers: { | |
'Hull-App-Id': 'YOUR_APP_ID', | |
'Hull-Access-Token': 'YOUR_APP_SECRET' | |
} | |
}); | |
client.get('/api/v1/users', function (err, req, res, obj) { | |
console.log("Your app has %s users", obj.length); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment