module InfluenceExplorer

Constants

VERSION

Public Class Methods

base_url() click to toggle source
# File lib/influence_explorer.rb, line 8
def self.base_url
  'http://transparencydata.com/api/1.0/'
end
request(endpoint, options) click to toggle source
# File lib/influence_explorer.rb, line 12
def self.request(endpoint, options)
  opts = options.merge('apikey' => InfluenceExplorer::Config.api_key)
  url = base_url + endpoint + "?" + opts.to_query
  # puts url
  response = JSON.parse(RestClient.get(url).to_str).collect {|i| Hashie::Mash.new(i) }
  response
end