Advertisement
Linda-chan

RubyTumblrTest.rb

Jan 25th, 2016
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.44 KB | None | 0 0
  1. #!/usr/bin/ruby
  2. # encoding: utf-8
  3.  
  4. require "tumblr_client"
  5.  
  6. Tumblr.configure do |config|
  7.   config.consumer_key = "..."
  8.   config.consumer_secret = "..."
  9.   config.oauth_token = "..."
  10.   config.oauth_token_secret = "..."
  11. end
  12.  
  13. client = Tumblr::Client.new()
  14.  
  15. puts client.info
  16.  
  17. client.photo('temp.lindachan.net',
  18.              :data => "pic.jpg",
  19.              :caption => "You're under arrest!",
  20.              :tags => "test,yua,picture")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement