Skip to content

Instantly share code, notes, and snippets.

@ecomba
Created May 31, 2015 08:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ecomba/ef75d1ff96aeafd7f37d to your computer and use it in GitHub Desktop.
Save ecomba/ef75d1ff96aeafd7f37d to your computer and use it in GitHub Desktop.
Trying to retrieve the wunderlist lists with HTTParty
# After authenticating with OAuth and getting the auth object
response = HTTParty.get('https://a.wunderlist.com/api/v1/lists',
headers: {
'X-Client-ID' => "#{auth.uid}",
'X-Access-Token' => auth.credentials.token
})
# response will look like so at the moment:
# <HTTParty::Response:0x7faf31dad288 parsed_response={"server_unavailable"=>true},
# @response=#<Net::HTTPServiceUnavailable 503 Service Temporarily Unavailable readbody=true>,
# @headers={"cache-control"=>["max-age=0, private, must-revalidate"], "content-type"=>["application/json"],
# "date"=>["Sun, 31 May 2015 08:14:52 GMT"], "server"=>["nginx"],
# "x-request-id"=>["XXXXXXX"], "content-length"=>["29"], "connection"=>["Close"]}>
# Is this an HTTParty issue? What am I doing wrong here?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment