City-of-Helsinki / linkedevents

Linked Events event database and API
MIT License
26 stars 41 forks source link

Allow creating places through the API #319

Open Rikuoja opened 5 years ago

Rikuoja commented 5 years ago

Essentially, this means finishing the almost-finished PR https://github.com/City-of-Helsinki/linkedevents/pull/236 .

Required for https://github.com/City-of-Helsinki/linkedevents-ui/issues/420

On the API side, we do not want to limit the coordinates and addresses the users POST, since not all cities using Linkedevents have a comprehensive address and geocoding service that would allow us to ascertain the addresses and coordinates.

Therefore, locations with any addresses and coordinates should be POSTable (with the system data source), and if a data source has is_user_editable set to True, its locations should be editable via the API.

In the Helsinki use case, the UI will check the validity of the coordinate-address pairs using the https://github.com/City-of-Helsinki/linkedevents/issues/318 address endpoint.

Rikuoja commented 5 years ago

A slight change of plans: as all addresses are now in the database, geocoding will not be needed in Linkedevents, so #318 is closed. Helsinki has no use case for this at the moment (since we import all the addresses already), but the functionality should still be included for other cities.