View simplegeo-com.python.nearby.py
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
>>> from simplegeo.models import Record, Client | |
>>> client = Client('your-oauth-token', 'your-oauth-secret') | |
>>> client.storage.get_nearby('com.simplegeo.global.flickr', 37.765850, -122.437094, limit=1, radius=0.5) |
View simplegeo-com.python.record_history.py
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
>>> from simplegeo.models import Record, Client | |
>>> client = Client('your-oauth-token', 'your-oauth-secret') | |
>>> client.storage.get_history('com.simplegeo.test', 'andrew') |
View simplegeo-com.python.delete.py
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
>>> from simplegeo.models import Record, Client | |
>>> client = Client('your-oauth-token', 'your-oauth-secret') | |
>>> client.storage.delete_record('com.simplegeo.test', '4') |
View simplegeo-com.python.batch.py
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
>>> from simplegeo.models import Record, Client | |
>>> client = Client('your-oauth-token', 'your-oauth-secret') | |
>>> r1 = Record('com.simplegeo.test', '7', 37.786521, -122.397850, \ | |
'place', 1262304000, name = 'Chatz Coffee') | |
>>> r2 = Record('com.simplegeo.test', '8', 37.786274, -122.397513, \ | |
'place', 1262304000, name = 'CBS Interactive') | |
>>> client.storage.add_records('com.simplegeo.test', [r1,r2]) |
View simplegeo-com.python.add_record1.py
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
>>> from simplegeo.models import Record, Client | |
>>> client = Client('your-oauth-token', 'your-oauth-secret') | |
>>> r = Record('com.simplegeo.test', '4', 37.786521, -122.397850) |
View simplegeo-context-python2.py
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
>>> client.context.get_context_by_address("41 Decatur St, San Francisco, CA 94103") |
View simplegeo-com.python.add_record3.py
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
>>> r = Record('com.simplegeo.test', '4', 37.786521, -122.397850, | |
1262304000, foo='bar') |
View simplegeo-python-annotations.py
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
>>> import simplegeo | |
>>> client = simplegeo.Client('your-oauth-token', 'your-oauth-secret') | |
>>> handle = 'SG_3ckjlXmAXOR2XjpuJQ0p7E' # India | |
>>> annotations = { | |
... 'country_codes': | |
... { | |
... 'alpha-2': 'IN', | |
... 'alpha-3': 'IND', | |
... 'numeric': '356', |
View simplegeo-context-response.json
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
{ | |
"query":{ | |
"latitude":40.745717, | |
"longitude":-73.988121 | |
}, | |
"timestamp":1305242604.074, | |
"features":[ | |
{ | |
"handle":"SG_3hKU1T8s5du5QuhLmy3629_40.747567_-73.987298", | |
"name":"36061007600", |