Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save aguynamedben/893424 to your computer and use it in GitHub Desktop.
Save aguynamedben/893424 to your computer and use it in GitHub Desktop.
>>> from simplegeo import Client
>>> client = simplegeo.places.Client('your-oauth-token', 'your-oauth-secret')
>>> simplegeo_handle = 'SG_3ckjlXmAXOR2XjpuJQ0p7E' # India
>>> annotations = {
... 'country_codes':
... {
... 'alpha-2': 'IN',
... 'alpha-3': 'IND',
... 'numeric': '356',
... 'ISO 3166-2': 'ISO 3166-2:IN'
... }
... }
>>> print client.annotate(simplegeo_handle, annotations, private=True)
{'status': 'success'}
>>> print client.get_annotations(simplegeo_handle)
{'public': {'country_codes': {'ISO 3166-2': 'ISO 3166-2:IN', 'alpha-2': 'IN','numeric': '356', 'alpha-3': 'IND'}}, 'private': {}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment