Skip to content

Instantly share code, notes, and snippets.

@auchenberg
Created July 10, 2012 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save auchenberg/3081969 to your computer and use it in GitHub Desktop.
Save auchenberg/3081969 to your computer and use it in GitHub Desktop.
Podio.js search example
// Initialize and specify client id and secret
var Podio = require('podiojs');
var podio = new Podio();
podio.client.client_id = 'sample';
podio.client.client_secret = 'gCb4aq1RAWvPgHqxTwiDtvNGa59S7i5FvGHFZeq4rnr9YUxHVqwdpz91SJlwsppH';
podio.on('error', function(request, response, body) {
console.log('There was a problem with a request to ' + request.path+'. Error was "'+body.error_description+'" ('+body.error+')');
});
podio.on('rateLimitError', function(request, response, body) {
console.log('You hit the rate limit');
});
podio.authenticate('password', {'username': 'USERNAME', 'password': 'PASSWORD'}, function(response, body){
podio.post('/search/', { 'query' : '70-cd-60-f8-41-a2 ' }, function(response, body){
console.log(body);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment