Skip to content

Instantly share code, notes, and snippets.

@vesan
Created October 3, 2015 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vesan/340218ce5be810ff8c4f to your computer and use it in GitHub Desktop.
Save vesan/340218ce5be810ff8c4f to your computer and use it in GitHub Desktop.
require "faraday"
require "faraday_middleware"
require "pp"
connection = Faraday.new 'http://api.hel.fi/linkedevents/v0.1/' do |conn|
conn.response :json, :content_type => /\bjson$/
conn.adapter Faraday.default_adapter
end
pp connection.get('event/?start=2014-01-15&end=2014-01-20').body["data"].map {|event| event["name"]["fi"] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment