Skip to content

Instantly share code, notes, and snippets.

@deepakshrma
Last active August 29, 2015 14:22
Show Gist options
  • Save deepakshrma/4c4420c1eac5a293b956 to your computer and use it in GitHub Desktop.
Save deepakshrma/4c4420c1eac5a293b956 to your computer and use it in GitHub Desktop.
AngularJS Deferred & Promises [Part-1]- Basic Understanding
(function () {
var successHandler = function (data) {
console.info('Twitter\'s data: %j', data)
};
var ErrorHandler = function (error) {
console.info('Twitter\'s error:', error)
};
$.ajax({
url: 'https://api.twitter.com/1.1/search/tweets.json?q=%23freebandnames&since_id=24012619984051000&max_id=250126199840518145&result_type=mixed&count=4',
data: {
format: 'json'
},
error: ErrorHandler,
success: successHandler,
type: 'GET'
});
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment