mirror of
https://gitlab.com/t6353/sharee.bike.wiki.git
synced 2024-12-22 07:36:26 +01:00
Create 3.5. request=bikes_available
This commit is contained in:
parent
b0ea02d7f6
commit
d734ec1415
1 changed files with 77 additions and 0 deletions
77
3.5.-request=bikes_available.md
Normal file
77
3.5.-request=bikes_available.md
Normal file
|
@ -0,0 +1,77 @@
|
|||
### request=bikes_available
|
||||
|
||||
Query of the available rental bikes with the optional specification **station** and/or **system**.
|
||||
|
||||
| key | Required | Format | Comment |
|
||||
| ---------- | -------- | ------- | ----------------------------------- |
|
||||
| authcookie | + | text>=8 | unique encrypted key OR merchant_id |
|
||||
| system | o | text | bike lock system |
|
||||
| station | o | text | station prefix+number |
|
||||
|
||||
**response** list of bikes by JSON-Objects
|
||||
|
||||
| key | Required | Format | Comment |
|
||||
| -------------- | -------- | -------- | -------------------------------------- |
|
||||
| state | + | text | bike available state |
|
||||
| lock_state | + | text | bike smartlock locking state |
|
||||
| station_state | o | text | station smartlock locking state |
|
||||
| service_state | o | text | service state for maintanance |
|
||||
| bike_charge | o | text | bike akku capacity |
|
||||
| description | o | text | short bike description |
|
||||
| bike | + | text | bike prefix+number |
|
||||
| gps | + | array | GPS: latitude, longitude |
|
||||
| station | + | text | station prefix+number |
|
||||
| bike_group | + | array | bike group |
|
||||
| system | + | text>=1 | bike lock system |
|
||||
| uri_operator | + | text | URI of Operator-Server |
|
||||
| lockit_ID | + | text | bluetooth ID |
|
||||
| lockit_GUID | + | text | bluetooth GUID |
|
||||
| authed | + | text | if 1 then authenticated request on operator |
|
||||
| tariff_description | + | array | bike Tariff description |
|
||||
|
||||
Example
|
||||
**REST request=bikes_available** for authorized users
|
||||
```
|
||||
https://shareeapp-primary.copri-bike.de/APIjsonserver?request=bikes_available&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_23456789
|
||||
```
|
||||
|
||||
**response** sharee JSON defaults + **response** multiple bike objects
|
||||
```
|
||||
{
|
||||
"shareejson" : {
|
||||
***sharee JSON defaults***
|
||||
},
|
||||
"bikes" : {
|
||||
"WUE5525" : {
|
||||
"gps" : {
|
||||
"latitude" : "47.987975491085045",
|
||||
"longitude" : "7.816756743460897"
|
||||
},
|
||||
"tariff_description" : {
|
||||
"name" : "WuerzBasis Tarif",
|
||||
"eur_per_hour" : "3.00",
|
||||
"max_eur_per_day" : "15.00",
|
||||
"free_hours" : "0.50",
|
||||
"number" : "5523"
|
||||
},
|
||||
"state" : "available",
|
||||
"authed" : "1",
|
||||
"description" : "Lastenrad Sabine",
|
||||
"bike" : "WUE5525",
|
||||
"lock_state" : "locked",
|
||||
"station" : "WUE302",
|
||||
"Ilockit_GUID" : "",
|
||||
"bike_group" : [
|
||||
"WUE300029"
|
||||
],
|
||||
"Ilockit_ID" : "00000000-0000-0000-0000-fc3c002a2add",
|
||||
"uri_operator" : "https://shareeapp-wue.copri-bike.de",
|
||||
"system" : "Ilockit"
|
||||
},
|
||||
"LEC5522" : {
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
Reference in a new issue