I think we can simplify some of the API, and move higher-level API calls into a separate module, something like osm-p2p-api. This is where all the checks can take place to maintain data integrity (not deleting nodes that are part of a way etc.). Much of this work is already in digidem/osm-p2p-server/api.
[ ] Remove osm.create() - functionality is in osm.put().
[ ] Remove osm.getChanges() - this is not particularly useful, and the higher-level functionality is in the api from osm-p2p-server.
[ ] Merge osm.query() and osm.queryStream() to a single method that returns a stream when no callback is passed.
[ ] Change the property refs on ways to nodes to match OSM JSON format.
I think we can simplify some of the API, and move higher-level API calls into a separate module, something like
osm-p2p-api
. This is where all the checks can take place to maintain data integrity (not deleting nodes that are part of a way etc.). Much of this work is already in digidem/osm-p2p-server/api.osm.create()
- functionality is inosm.put()
.osm.getChanges()
- this is not particularly useful, and the higher-level functionality is in the api from osm-p2p-server.osm.query()
andosm.queryStream()
to a single method that returns a stream when no callback is passed.refs
on ways tonodes
to match OSM JSON format.