Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_frob method error when using desktop script #3

Open
treble37 opened this issue Jun 4, 2013 · 0 comments
Open

get_frob method error when using desktop script #3

treble37 opened this issue Jun 4, 2013 · 0 comments

Comments

@treble37
Copy link

treble37 commented Jun 4, 2013

Hi @aseldawy,

I'm trying to write a ruby script that gets some data from oDesk....The documentation calls for using "rd.auth_url" but I think that's only for a web application, not a desktop, correct? For desktops you have to call get_frob first before calling desktop_auth_url if I'm reading correctly...When I do so, I get an error like:

ruby-1.9.3-p374/lib/ruby/1.9.1/rexml/parent.rb:59:in []': can't convert String into Integer (TypeError) from /home/kyle/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/rexml/parent.rb:59:in[]'
from /home/kyle/.rvm/gems/ruby-1.9.3-p374@odesk/gems/ruby_desk-0.9.1/lib/ruby_desk/connector.rb:185:in `get_frob'

I have the API keys setup (dummy keys shown here for security reasons) and am calling it this way in my script:

ODESK_API_KEYS = {:key=>"yyy",:secret=>"zzz"}
rd = RubyDesk::Connector.new(ODESK_API_KEYS[:key], ODESK_API_KEYS[:secret])
p rd.get_frob

The issue is actually in the invoke_api_call(api_call) method in connector.rb. When "https://www.odesk.com/api/auth/v1/keys/frobs.json" is called, the response is code 200 but the data returned is nil.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant