Skip to content

Instantly share code, notes, and snippets.

@dara
Created December 7, 2015 11:30
Show Gist options
  • Save dara/709e8fc5fd68b1a268d4 to your computer and use it in GitHub Desktop.
Save dara/709e8fc5fd68b1a268d4 to your computer and use it in GitHub Desktop.
Get total posts number from Tumblr
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