Skip to content

get_frob method error when using desktop script #3

@treble37

Description

@treble37

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions