Technical: Updated availability #506
edwinvandenbelt
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Please provide your opinion about refactoring the availability. Should it be a call to the availability endpoint that returns a (paged) geoJSON? The geoJSON features could represent a station, an area or even a specific asset.
And depending on the type (station, area, asset), the availability should be represented for the station and area per asset type and in case of the asset of course for that asset.
The availability itself should be an array of time slots when the asset (or asset type) is available.
Small example for a station:
"type": "Feature",
"properties": {
"id": "029cc8f3-67f6-4456-9a5c-6259edd20b39",
"name": "free floating area city center"
"type": "area",
"availability": [ { "start": 39482034, "assetType": "default-bike", "available": 34, "free-parking-slots": 3 },
{ "start": 39482034, "assetType": "speed-bike", "available": 3, "free-parking-slots": 0 },
},
"geometry": { "type": "Polygon", "coordinates": [ [ ....
And for a specific bike (a certain period is already reserved):
"type": "Feature",
"properties": {
"id": "029cc8f3-67f6-4456-9a5c-6259edd20b40",
"name": "Big transport nr1"
"type": "asset",
"availability": [ { "start": 39482034, "end": 394820343,"assetType": "cargo-bike" }
, { "start": 39482060,"assetType": "cargo-bike" }
]
},
"geometry": { "type": "Point", "coordinates": [ ....
Beta Was this translation helpful? Give feedback.
All reactions