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.models import Record | |
>>> r = Record('com.simplegeo.test', '4', 37.786521, -122.397850) |
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', |
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 | |
>>> from simplegeo.models import Feature | |
>>> client = Client('your-oauth-token', 'your-oauth-secret') | |
>>> properties = {"province":"CA","city":"San Francisco","name":"SimpleGeo SF", \\ | |
"country":"US", "phone":"+1 415 626 1375","address":"41 Decatur St", \\ | |
"postcode":"94103"} | |
>>> f = Feature((37.772392, -122.405752), properties=properties) | |
>>> client.places.add_feature(f) | |
'SG_5uZpvipNjVaSbbDv5bvZaa_37.772392_-122.405752@1291847366' |
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
>>> results = client.places.search(40.016983, -105.27753) | |
>>> results = client.places.search(40.016983, -105.27753, query='coffee') | |
>>> results = client.places.search(40.016983, -105.27753, category='restaurant') | |
>>> results = client.places.search(40.016983, -105.27753, query='coffee', category='restaurant') |
NewerOlder