mirror of
https://gitlab.com/t6353/sharee.bike.wiki.git
synced 2024-12-22 15:46:26 +01:00
75 lines
No EOL
3.2 KiB
Markdown
75 lines
No EOL
3.2 KiB
Markdown
### request=stations_available
|
|
|
|
**request** GET of the available stations depending on the rental bike groups assigned to the registered user.
|
|
|
|
| key | Required | Format | Comment |
|
|
| ---------- | -------- | ------- | ----------------------------------- |
|
|
| authcookie | + | text>=8 | unique encrypted key OR merchant_id |
|
|
| station | o | text | station prefix+number |
|
|
|
|
**response** list of stations by JSON-Objects
|
|
|
|
| key | Required | Format | Comment |
|
|
| ------------- | -------- | -------- | ----------------------------------------------------- |
|
|
| state | + | text>=8 | available-state |
|
|
| description | o | text<=20 | short station description |
|
|
| gps | + | array | GPS: latitude, longitude |
|
|
| station | + | text | station prefix_number |
|
|
| station_group | + | array | deprecated, it is substituted by station_type object |
|
|
| gps_radius | + | text | geofencing by meters around station, for bike return. |
|
|
| uri_operator | + | text | URI of operator-server |
|
|
| station_type | + | object | station values (see example). It can be "cargo" and/or "city" bike objects |
|
|
| operator_data | o | object | operator values (see example) |
|
|
| bikes_occupied | o | object | Implicit returns the json object which is defined in "request=user_bikes_occupied" |
|
|
|
|
|
|
**station_type** describes which **bike_group** are allowed at the station.
|
|
Groups are identified by ID. The following groups of bicycles are defined:
|
|
| Defined group ID's | bike type |
|
|
| ------ | ------ |
|
|
| 300101 | cargo |
|
|
| 300103 | city |
|
|
Keep in mind, each ID is preceded by an operator-prefix. Datatype is array, because each station can have more byke_group
|
|
|
|
Example
|
|
**REST request=stations_available** for authorized users
|
|
```
|
|
https://shareeapp-primary.example.tld/APIjsonserver?request=stations_available&authcookie=6103_0f667aa7f234fe317a2705ee89fde0c3_1234567998
|
|
```
|
|
|
|
**response** sharee JSON defaults + **response** multiple station objects
|
|
```
|
|
{
|
|
"shareejson" : {
|
|
***sharee JSON defaults***
|
|
},
|
|
"WUE9301" : {
|
|
"state" : "available",
|
|
"uri_operator" : "https://shareeapp-wue.example.tld",
|
|
"description" : "Cargo and Citybike Station",
|
|
"operator_data" : {
|
|
"operator_hours" : "Montag, Mittwoch, Freitag 9-12 Uhr",
|
|
"operator_logo" : "",
|
|
"operator_name" : "Test GmbH",
|
|
"operator_email" : "hotline@wuerzburg.demo",
|
|
"operator_phone" : "09876-122222",
|
|
"operator_color" : "#009699"
|
|
},
|
|
"station" : "WUE9301",
|
|
"gps" : {
|
|
"latitude" : "47.99814334149303",
|
|
"longitude" : " 7.765779379576922"
|
|
},
|
|
"gps_radius" : "100",
|
|
"station_type" : {
|
|
"cargo" : {
|
|
"bike_group" : "WUE300101",
|
|
"bike_count" : "2"
|
|
}
|
|
}
|
|
},
|
|
"WUE9302" : {
|
|
...
|
|
},
|
|
"bikes_occupied" : {}
|
|
``` |