Project

tumble

0.0
No commit activity in last 3 years
No release in over 3 years
Library for accessing the Tumblr api v2
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

Tumble

A Ruby wrapper for v2 of Tumblr's API, supporting all endpoints.

Install

gem install tumble

Configure

The gem is designed to work with Tumblr's OAuth provider for authentication. If you're using omniauth, there's a fine adapter available here. You'll also need to register your app here in order to get a consumer key and secret. Once you have those, you can configure Tumble in an initializer like so:

require 'tumble'

Tumble.configure do |tumble|
  tumble.consumer_key = ENV['tumblr']['key']
  tumble.consumer_secret = ENV['tumblr']['secret']
end

Use

A connection can then be made by creating a client, passing the OAuth token and secret you get back from the provider:

client = Tumble::Client.new(access_token, access_secret)

User-related endpoints can be accessed through the client directly, as documented here. For example:

client.user_info

All methods will return a Hashie::Mash of the results. For data about blogs and posts, use the blog() method on the client, passing the name of the blog. The methods for blogs are documented here. For example, getting posts for a specific blog can be done like this:

client.blog('www.riotprojects.com').posts

Most of the calls allow for options to be passed as a hash. Options are documented in the links above and are consistent with the naming and functionality described in the Tumblr docs.

Learn

http://rdoc.info/github/aub/tumble

Copyright

Copyright (c) 2012 Aubrey Holland See LICENSE for details.