Created
May 26, 2009 19:02
-
-
Save maurcs/118221 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'oauth' | |
require 'oauth/consumer' | |
require 'ruby-debug' | |
require 'json' | |
API_KEY = "#####" | |
API_KEY_PRIVATE = "####" | |
USERNAME = "####" | |
consumer = OAuth::Consumer.new(API_KEY, | |
API_KEY_PRIVATE, | |
{ | |
:site => "http://api.photobucket.com", #remove spaces | |
:request_token_path => '/login/request', | |
:authorize_path => '/apilogin/login', | |
:access_token_path => '/login/access', | |
:scheme=>:query_string | |
}) | |
resp = consumer.request(:get, "/search/me/image?format=json", nil) | |
puts JSON.parse(resp.body).to_yaml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment