Created
October 3, 2015 13:10
-
-
Save vesan/340218ce5be810ff8c4f to your computer and use it in GitHub Desktop.
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
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