Skip to content

Instantly share code, notes, and snippets.

@joshleitzel
Created January 23, 2013 16:34
Show Gist options
  • Save joshleitzel/4609315 to your computer and use it in GitHub Desktop.
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
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