Created
June 10, 2012 19:05
-
-
Save janosgyerik/2906942 to your computer and use it in GitHub Desktop.
Dump foursquare categories to a file in JSON format
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
#!/usr/bin/env python | |
# | |
# Notes: | |
# | |
# - python API home: | |
# https://github.com/mLewisLogic/foursquare | |
# | |
# - foursquare API home: | |
# https://developer.foursquare.com/ | |
# | |
import foursquare | |
from django.utils import simplejson as json | |
# obtained from foursquare API home by registering a client | |
client_id = 'your_client_id' | |
client_secret = 'your_client_secret' | |
client = foursquare.Foursquare(client_id=client_id, client_secret=client_secret) | |
out = open('foursquare-categories.json', 'w') | |
out.write(json.dumps(client.venues.categories(), sort_keys=True, indent=4)) | |
out.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Neat script!