[Openstreetmap-dev] REST
Tom Carden
tom at tom-carden.co.uk
Mon Jul 18 14:17:59 BST 2005
SteveC wrote:
> If we threw away the xmlrpc and had things RESTful
>
> http://en.wikipedia.org/wiki/Representational_State_Transfer
>
> would that make people happy or sad?
>
Both. Happy because there would be less fluff over the wire (XML-RPC is
uglee), and Sad because I don't know of a neat REST library which just bungs
things into generic types in Java, and parsing XML the way I do it makes the
baby Jesus cry.
I've only ever used the Flickr REST API (which now has a complicated but
interesting authentication API too). http://www.flickr.com/services/api Any
others we should be aware of? (Anyone used the google API or the Amazon
API?)
Initial thoughts...
Needed for the applet, yesterday:
http GETs...
getTracks which takes a lat-lon bounding box, and returns a list of
available gps point collections (date, user, count)
getPoints which takes a lat-lon bounding box, date, user, perpage and
pagenumber, and returns a list of gps points (in GPX format?)
getNodes which takes a lat-lon bounding box, and returns a list of nodes
getLines which takes a list of node ids, and returns a list of lines (and
optional metadata?)
getLinesWithNodes which takes a lat-lon bounding box and a token, and
returns a list of lines with nodes and locations and metadata. Hopefully in
a way which could be parsed as a stream.
http POSTs (or PUTs or DELETEs?)...
addNode which takes a lat/lon and a token and gets back an id
addLine which takes two node ids and a token and gets back an id
setMeta which takes a line id and a key value pair
deleteNode which takes an id and a token and also removes any lines involved
deleteLine which takes an id and a token
Not sure how these should be named exactly, or what the returned XML data
would look like. Perhaps where possible we could return gpx data? e.g.
getNodes (waypoints), getTracks (trksegs), etc.
All off the top of my head...
Tom.
More information about the dev
mailing list