ruby-tumblr
Get Version
0.0.2What
ruby-tumblr is a library for tumblr API.
Installing
sudo gem install ruby-tumblr
API Document
http://ruby-tumblr.rubyforge.org/rdoc/
Demonstration of usage
read
Tumblr::API.read("tumblr.dynamic-semantics.com") do |pager|
data = pager.page(0)
p data.tumblelog
data.posts.each do |post|
p post
end
end
write
Tumblr::API.write($email, $password) do
regular("test body", "test title")
quote("test quote", "test source")
link("http://tumblr.dynamic-semantics.com", "test link")
end
backup
Tumblr::API.read("tumblr.dynamic-semantics.com") do |pager|
data = Tumblr::Data.new
0.upto(pager.last_page) do |n|
puts "get #{n}/#{pager.last_page}"
data << pager.page(n)
end
data.save(File.join(ENV["HOME"], "backup.xml"))
end
Forum
http://groups.google.com/group/ruby-tumblr
TODO – create Google Group – ruby-tumblr
How to submit patches
Read the 8 steps for fixing other people’s code and for section 8b: Submit patch to Google Groups, use the Google Group above.
The trunk repository is svn://rubyforge.org/var/svn/ruby-tumblr/trunk for anonymous access.
License
This code is free to use under the terms of the Ruby license.
Contact
Comments are welcome. Send an email to Keita Yamaguchi.
Dr Nic, 21st August 2007
Theme extended from Paul Battley