Skip to content

Instantly share code, notes, and snippets.

@pius
Created June 25, 2009 17:54
Show Gist options
  • Save pius/136020 to your computer and use it in GitHub Desktop.
Save pius/136020 to your computer and use it in GitHub Desktop.
>> fn = Satisfaction.new
=> #<Satisfaction:0x2417498 @identity_map=#<Satisfaction::IdentityMap:0x24173bc @records={}, @pages={}>, @loader=#<Satisfaction::Loader:0x24173f8 @options={:cache=>:hash}, @cache=#<Satisfaction::Loader::HashCache:0x2417358 @cached_responses={}>>, @options={:access_token_url=>"http://getsatisfaction.com/api/access_token", :root=>"http://api.getsatisfaction.com", :autoload=>false, :request_token_url=>"http://getsatisfaction.com/api/request_token", :authorize_url=>"http://getsatisfaction.com/api/authorize"}>
>> fn.set_consumer("REDACTED","REDACTED")
=> #<OAuth::Consumer:0x2412600 @secret="REDACTED", @key="REDACTED", @options={:request_token_path=>"/oauth/request_token", :scheme=>:header, :authorize_path=>"/oauth/authorize", :access_token_path=>"/oauth/access_token", :http_method=>:post, :oauth_version=>"1.0", :signature_method=>"HMAC-SHA1"}>
>> fn.companies.post(:name => "REDACTED", :url => "REDACTED", :description => "A REDACTED Spinoff")
=> [:unauthorized, "Access Denied"]
>> fn.request_token
NameError: undefined local variable or method `http' for #<Satisfaction::Loader:0x24173f8>
from /Library/Ruby/Gems/1.8/gems/ruby-satisfaction-0.2.0/lib/satisfaction/loader.rb:111:in `add_authentication'
from /Library/Ruby/Gems/1.8/gems/ruby-satisfaction-0.2.0/lib/satisfaction/loader.rb:37:in `get'
from /Library/Ruby/Gems/1.8/gems/ruby-satisfaction-0.2.0/lib/satisfaction.rb:93:in `request_token'
from (irb):8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment