brianhubbell / node-tumblr

A Node.JS wrapper for the Tumblr API v2

Home Page:http://simonenko.su/projects/node-tumblr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tumblr

A Node.JS wrapper for the Tumblr API v2.

The announcement in Russian of this module in my blog.

How to use with JavaScript

var Tumblr = require('tumblr').Tumblr;

var blog = new Tumblr('blog.tumblr.com', 'OAuth Consumer Key');

blog.text({limit: 2}, function(error, response) {
	if (error) {
		throw new Error(error);
	}
	
	console.log(response.posts);
});

Or with CoffeeScript

{Tumblr} = require 'tumblr'

blog = new Tumblr 'blog.tumblr.com', 'OAuth Consumer Key'

blog.text limit: 2, (error, response) ->
	throw new Error error if error
	console.log response.posts

Install with NPM

npm install tumblr

API

  • info (callback)
  • posts ([options, ]callback)
  • text ([options, ]callback)
  • quote ([options, ]callback)
  • link ([options, ]callback)
  • answer ([options, ]callback)
  • video ([options, ]callback)
  • audio ([options, ]callback)
  • photo ([options, ]callback)

Options list

Author

About

A Node.JS wrapper for the Tumblr API v2

http://simonenko.su/projects/node-tumblr