Skip to content

Instantly share code, notes, and snippets.

@amaseda
Last active July 27, 2016 14:17
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 amaseda/ff33a580e253a0d5476266b7f50c36b8 to your computer and use it in GitHub Desktop.
Save amaseda/ff33a580e253a0d5476266b7f50c36b8 to your computer and use it in GitHub Desktop.
follow-the-json
require "httparty"
def retrieve(id=nil)
url = "http://letsrevolutionizetesting.com/challenge.json"
if id
url += "?id=" + id
end
response = HTTParty.get(url)
new_id = response["follow"].split("?id=")[-1]
retrieve(new_id)
puts response
end
retrieve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment