Skip to content

Instantly share code, notes, and snippets.

@atroutt
Created January 29, 2016 21:00
Show Gist options
  • Select an option

  • Save atroutt/fa24186714950695a9b6 to your computer and use it in GitHub Desktop.

Select an option

Save atroutt/fa24186714950695a9b6 to your computer and use it in GitHub Desktop.
require 'json'
require 'open-uri'
# TODO GET YOUR OWN URL AND AUTH TOKEN
# See Foursquare API Explorer at https://developer.foursquare.com/docs/explore#req=venues/search%3Fll%3D40.0879508,-75.3941218 for new URL
source = "https://api.foursquare.com/v2/venues/search?ll=40.0879508,-75.3941218&limit=50&radius=100000&oauth_token=GETYOUROWN"
# 39.9165295,-75.144234 IKEA SOUTH PHILLY
# 39.9205883,-75.145728 South Philly big box stores
# 40.0879508,-75.3941218 KOP mall
data = JSON.load(open(source))
data['response']['venues'].each do |v|
puts v['name']
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment