-
-
Save maninthemirror/6d22a6398ab89c67728f to your computer and use it in GitHub Desktop.
User JQuery with the Tumblr API & JSONP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax( | |
'http://api.tumblr.com/v2/blog/codingjester.tumblr.com/posts?api_key=<your_key>', | |
{ | |
dataType: 'jsonp', | |
success: function (d) { | |
console.log(d); // On success log the data to the console | |
}, | |
} | |
); | |
// More explicit information | |
$.ajax('https://api.tumblr.com/v2/blog/codingjester.tumblr.com/posts', | |
{ | |
dataType:'jsonp', | |
data: { | |
limit : 1, | |
api_key : 'your_key' | |
}, | |
success: function(d) { | |
console.log(d); | |
} | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment