Skip to content

Instantly share code, notes, and snippets.

@neovintage
Created November 21, 2013 18:05
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 neovintage/7586530 to your computer and use it in GitHub Desktop.
Save neovintage/7586530 to your computer and use it in GitHub Desktop.
LRT
# Background:
# I followed the initial url and your message suggested that I try json instead.
# Using that, I hit the initial page and tagged '.json' on to the url. You had
# mentioned in your job description that you were using rails so I figured I could
# do that in the URL instead of using the accept headers.
#
require 'rest-client'
require 'json'
result = RestClient.get('http://letsrevolutionizetesting.com/challenge', :accept => :json)
JSON.parse(result)
while !result['follow'].nil? do
result = RestClient.get(result['follow'], :accept => :json)
result = JSON.parse(result)
puts result
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment