Skip to content

Instantly share code, notes, and snippets.

@kwhinnery
Created January 29, 2016 19:39
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 kwhinnery/faf54a0c8118620d7f46 to your computer and use it in GitHub Desktop.
Save kwhinnery/faf54a0c8118620d7f46 to your computer and use it in GitHub Desktop.
var client = require('twilio')('sid', 'token');
var pager = client.messages.each({ pageSize: 100 });
pager.on('data', function(message) {
console.log(message.sid);
});
pager.on('end', function() {
console.log('no more messages!');
});
pager.on('error', function(err) {
console.log('ruh roh!');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment