- #!/usr/bin/env ruby
-
- require 'scraperwiki'
- require 'rest-client'
- require 'json'
- require 'pp'
-
- result = RestClient.get(ENV['MORPH_API_URL'], params: {
- key: ENV['MORPH_API_KEY'],
- query: "select * from applications"
- })
-
- apps = JSON.parse(result)
- ScraperWiki.save_sqlite( \
- ['authority_name', 'council_reference'], apps, 'applications')
|