https://github.com/mvrilo/tumblrrr
A wrapper for Tumblr's API
https://github.com/mvrilo/tumblrrr
Last synced: 6 months ago
JSON representation
A wrapper for Tumblr's API
- Host: GitHub
- URL: https://github.com/mvrilo/tumblrrr
- Owner: mvrilo
- License: mit
- Archived: true
- Created: 2010-09-10T18:46:30.000Z (almost 16 years ago)
- Default Branch: master
- Last Pushed: 2011-11-22T05:05:28.000Z (over 14 years ago)
- Last Synced: 2025-10-02T06:53:14.196Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 686 KB
- Stars: 20
- Watchers: 1
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tumblrrr
Usage
---------
The basics is passing the blog hostname as first argument and for methods requiring `api_key`, a second argument using your application's OAuth Consumer Key. For OAuth authorization you will also have to set the `token_secret`, `token_access_key` and `token_access_secret`.
You can get more info [reading the docs].
``` javascript
var tumblr = require('tumblr'),
staff = tumblr('staff');
/*
staff = tumblr('staff', 'key', 'secret', 'access_key', 'access_secret');
or
staff = tumblr({
hostname : 'staff',
key : 'key',
secret : 'secret',
access_key : 'access_key',
access_secret : 'access_secret'
});
*/
```
Demo
---------
``` javascript
var tumblr = require('tumblr'),
staff = tumblr('staff');
staff.avatar(function(json) {
console.log(json);
});
```
Tips
---------
After setting the `token_key` and the `token_secret` you can call the instance variable `OAuthAuthorizationURL` which will return the url for connecting the Tumblr account with the application.
After accepting the connection, it will redirect for your application's callback URL with an `oauth_verifier` as parameter and with that you can set the access variables to your instance using `setOAuthVerifier`.
``` javascript
var tumblr = require('tumblr'),
staff = tumblr('staff', 'key', 'secret');
staff.setOAuthVerifier('verifier');
// then you will have
console.log(staff.access_key, staff.access_secret);
```
License
-----------
See [LICENSE]
[reading the docs]: http://www.tumblr.com/docs/en/api/v2
[LICENSE]: http://www.github.com/mvrilo/tumblrrr/blob/master/LICENSE