Created
November 21, 2013 18:05
-
-
Save neovintage/7586530 to your computer and use it in GitHub Desktop.
LRT
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
# 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