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
require 'net/http' | |
require 'json' | |
# a simple wrapper to do an HTTP GET | |
def fetch_uri(uri) | |
Net::HTTP.get_response(URI(uri)) | |
end | |
# GETs the URI and returns a Ruby hash. | |
def fetch_json(uri) |
OlderNewer