Created
January 23, 2013 16:34
-
-
Save joshleitzel/4609315 to your computer and use it in GitHub Desktop.
Fetch Foursquare categories from the Foursquare API and dump them to a JSON file
This file contains hidden or 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 'foursquare2' # https://github.com/mattmueller/foursquare2 | |
file = 'foursquare_categories.json' | |
client_id = 'client_id' | |
client_secret = 'client_secret' | |
client = Foursquare2::Client.new(:client_id => client_id, :client_secret => client_secret) | |
File.open(file, 'w') { |file| file.write(JSON.pretty_generate(client.venue_categories)) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment