Created
December 7, 2015 11:30
-
-
Save dara/709e8fc5fd68b1a268d4 to your computer and use it in GitHub Desktop.
Get total posts number from Tumblr
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
var totalPosts; | |
blogInfoCallback = function(data) { | |
totalPosts = data.response.blog.posts; | |
}; | |
jQuery.ajax({ | |
type: "GET", | |
url : "http://api.tumblr.com/v2/blog/_BLOG_URL_/info", | |
dataType: "jsonp", | |
data: { | |
api_key : "API_KEY", | |
jsonp : "blogInfoCallback" | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment