Skip to content

emmapersky/trove_oauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

trove_oauth (TroveOAuth)

A ruby wrapper for Trove (www.yourtrove.com), inspired by TwitterOAuth (github.com/moomerman/twitter_oauth)

Gem coming soon…

Example Usage:

client = TroveOAuth::Client.new(:consumer_key => …, :consumer_secret => …) request_token = @client.request_token(:oauth_callback => my_awesome_callback_url) redirect_to request_token request_token.authorize_url

meanwhile…

at your callback end point

access_token = client.authorize(request_token.token, request_token.secret, :oauth_verifier => verifier_recieved_at_callback)

then you can do groovy things like:

client.info => {“first_name”=>“Emma”, “last_name”=>“Persky”, “trove_internal_id”=>“123456”, “trove_email”=>“emma.persky@gmail.com”, “trove_username”=>“emmapersky”, “identities”=>{“photos”=>[[“Flickr”, “Emma Persky”, “12345”, 377], [“Facebook”, “Emma Persky”, “12345”, 321]]}}

client.services => []

client.service(‘facebook’) => []

client.service_bounceback_url(‘facebook’, ‘myawesomeserver.com/some_endpoint’) => “www.yourtrove.com/some_magic_url_for_bounceback

client.photos => {big ol’ data structure for photos…} client.photos(some params) => {smaller data structure of photos}

in theory:

client.add_photo client.add_photos

Copyright © 2011 Emma Persky. See LICENSE.txt for further details.