-
-
Save aguynamedben/893424 to your computer and use it in GitHub Desktop.
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
>>> 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