Created
September 27, 2015 17:53
-
-
Save markglenfletcher/d415252e9bfdb39855d6 to your computer and use it in GitHub Desktop.
ONS API hit
This file contains 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
api_key = 'omit' | |
root_url = "http://data.ons.gov.uk/ons/api/data/" | |
api_url_gen = -> (path,key,params) { "#{root_url}#{path}?apikey=#{key}&#{params}" } | |
datasets_url = api_url_gen.call('contexts.json',api_key,'') | |
HTTParty.get datasets_url |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment