Skip to content

Instantly share code, notes, and snippets.

@pifantastic
Created October 5, 2011 04:39
Show Gist options
  • Save pifantastic/1263650 to your computer and use it in GitHub Desktop.
Save pifantastic/1263650 to your computer and use it in GitHub Desktop.
var api = new SnipAPI({ version: 'v1', key: '123' });
api.find('appointment', 1, function(error, appointment) {
console.log(error || appointment);
});
api.find('appointment', { start_time__gte: new Date }, function(error, appointments) {
if (error) {
console.error(error.messages.join('\n'));
}
else {
$.each(appointments, function(i, appt) {
console.log(appt.fields.start_time)
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment