source: subversion/applications/utils/amf/amf.py @ 29710

Last change on this file since 29710 was 13623, checked in by crschmidt, 11 years ago

add a python example for interacting with AMF.

File size: 530 bytes
Line 
1from pyamf.remoting.client import RemotingService, remoting
2remoting.CONTENT_TYPE = "application/x-amf; charset=utf-8"
3
4gateway = RemotingService("http://www.openstreetmap.org/api/0.5/amf/read")
5whichways_deleted = gateway.getService('whichways_deleted')
6deleted = whichways_deleted(-1.4916, 51.88447, -1.46949, 51.86895)
7print "Deleted ways: %s" % deleted[0]
8for d in deleted[0]:
9    gateway = RemotingService("http://www.openstreetmap.org/api/0.5/amf/read")
10    getway = gateway.getService("getway_old")
11    print getway(d, -1)
Note: See TracBrowser for help on using the repository browser.