Skip to content

Instantly share code, notes, and snippets.

@mikekavouras
Last active February 15, 2017 17:23
Show Gist options
  • Save mikekavouras/473ac176003816ae7406c1d6f186ce7e to your computer and use it in GitHub Desktop.
Save mikekavouras/473ac176003816ae7406c1d6f186ce7e to your computer and use it in GitHub Desktop.
var API = {
fetchSummary: function(date, completion) {
date = date || new Date();
var self = this;
$.ajax({
url: '/tweets',
type: 'GET',
data: {
date: date.toString(),
offset: -(date.getTimezoneOffset())
},
success: function(response) {
completion(response);
},
error: function(error) {
console.log(error);
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment