Skip to content

tetsuwo/tumblr2.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tumblr2.js - JavaScript SDK for Tumblr API v2

Build Status

How to use

Initialize

Method type

var tumblr = new Tumblr2();
tumblr.setApiKey('fme5U6F8DVblNs7HFYtR0ahOs8o1UjxKjqJUuAlBXJSJUu89oN');
tumblr.setBaseHostname('tetsuwo.tumblr.com');

The below same means

var tumblr = new Tumblr2({ 
    apiKey: 'fme5U6F8DVblNs7HFYtR0ahOs8o1UjxKjqJUuAlBXJSJUu89oN', 
    baseHostname: 'tetsuwo.tumblr.com' 
});

Get the blog info

tumblr.api('/blog/info', null, function(response) {
    alert('callback [/blog/info]');
    console.log(response);
});

Get the blog posts

tumblr.api('/blog/posts', { limit: 100 }, function(response) {
    alert('callback [/blog/posts]');
    console.log(response);
});

About

Tumblr2 - JavaScript SDK for Tumblr API v2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published