Created
May 31, 2015 08:51
-
-
Save ecomba/ef75d1ff96aeafd7f37d to your computer and use it in GitHub Desktop.
Trying to retrieve the wunderlist lists with HTTParty
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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