mirror of
https://gitlab.com/t6353/sharee.bike.wiki.git
synced 2025-01-11 08:24:27 +01:00
Update 4.2. op request=booking_update
This commit is contained in:
parent
982a87a5f5
commit
ce392ec677
1 changed files with 10 additions and 3 deletions
|
@ -3,14 +3,21 @@
|
||||||
**request** PUSH start, pause, cancel and end bike rental is implemented via this update request. Prerequisite is the reservation via the initial "request=booking_request".
|
**request** PUSH start, pause, cancel and end bike rental is implemented via this update request. Prerequisite is the reservation via the initial "request=booking_request".
|
||||||
|
|
||||||
The following booking states are implemented:
|
The following booking states are implemented:
|
||||||
|
|
||||||
`state=canceled` booking request will be canceled. The bike is set to `state=available` in the COPRI backend.
|
`state=canceled` booking request will be canceled. The bike is set to `state=available` in the COPRI backend.
|
||||||
`state=occupied` bike rental starts.
|
|
||||||
|
`state=occupied` bike rental starts. `state=occupied` marks the start of the rental in copri. A multiple "occupied" will be acknowledged with an error, because a rental can only be started once. So that the rental start is recorded in any case in the backend, please set the `state=occupied` in the first request.
|
||||||
|
|
||||||
`state=available` end the bike rental, which makes the bike `state=available` again in the COPRI backend.
|
`state=available` end the bike rental, which makes the bike `state=available` again in the COPRI backend.
|
||||||
|
|
||||||
The following lock states are implemented:
|
The following lock states are implemented:
|
||||||
|
|
||||||
`lock_state=unlocking` start unlocking signal, smartlock was triggered to unlock.
|
`lock_state=unlocking` start unlocking signal, smartlock was triggered to unlock.
|
||||||
|
|
||||||
`lock_state=unlocked` successfully unlocking the lock.
|
`lock_state=unlocked` successfully unlocking the lock.
|
||||||
|
|
||||||
`lock_state=locking` start locking signal, smartlock was triggered to close.
|
`lock_state=locking` start locking signal, smartlock was triggered to close.
|
||||||
|
|
||||||
`lock_state=locked` closed successfully.
|
`lock_state=locked` closed successfully.
|
||||||
|
|
||||||
| key | Required | Format | Comment |
|
| key | Required | Format | Comment |
|
||||||
|
@ -18,8 +25,8 @@ The following lock states are implemented:
|
||||||
| authcookie | + | text | unique encrypted key |
|
| authcookie | + | text | unique encrypted key |
|
||||||
| bike | + | text | bike prefix+number |
|
| bike | + | text | bike prefix+number |
|
||||||
| state | + | text | one of the bike states: canceled, occupied, available |
|
| state | + | text | one of the bike states: canceled, occupied, available |
|
||||||
| lock_state | o/+ | text | one of the lock states: locked, locking, unlocked |
|
| lock_state | o/+ | text | one of the lock states: unlocking, unlocked, locking, locked |
|
||||||
| station_state | + | text | station smartlock locking state |
|
| station_state | o | text | station smartlock locking state |
|
||||||
| latitude | + | text | App GPS only necessary on state=available |
|
| latitude | + | text | App GPS only necessary on state=available |
|
||||||
| longitude | + | text | App GPS only necessary on state=available |
|
| longitude | + | text | App GPS only necessary on state=available |
|
||||||
| gps_age | o/+ | text | App GPS age only necessary on state=available. value in milliseconds. |
|
| gps_age | o/+ | text | App GPS age only necessary on state=available. value in milliseconds. |
|
||||||
|
|
Loading…
Reference in a new issue