Hola!

Quería saber si alguno tuvo experiencia usando ActiveResource en un WS
autenticado por OAuth.

No entiendo cómo implementar el cliente.

http://gist.github.com/549593

En active_resource la búsqueda es algo así:
# app/models/person.rb
class Person < ActiveResource::Base
  self.site = "http://api.oauth_protected_site.com";
end

# en el controller
@people = Person.find(:all)

y con oauth es algo así:

@consumer=OAuth::Consumer.new( "key","secret", {:site=>"
http://api.oauth_protected_site.com"})
@[email protected]_request_token
@access_tok...@request_token.get_access_token

# en el controller
@people = @access_token.get('/people.xml')


hay alguna manera de usar active_resource con oauth?
---
*Dwayne Macgowan*
Instructor del Método DeRose
www.metododerose.org
www.metododerose.org/blog
_______________________________________________
Ruby mailing list
[email protected]
http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar

Responder a