Update api_spec.md
This commit is contained in:
parent
6d7583ccf9
commit
0261663e52
1 changed files with 10 additions and 9 deletions
|
@ -12,13 +12,13 @@ being a json list of urls to each of all the trips over the course of the week,
|
|||
|
||||
## `/trips/{id}`
|
||||
json object describing a route, I'm planning on this having an infinite cache time, if a route changes a new id will be made for the route after the change
|
||||
```json
|
||||
```yaml
|
||||
{
|
||||
"_links":{
|
||||
"self":{
|
||||
"href":"https://$base_domain/trips/{id}"
|
||||
},
|
||||
// stops in order of when the bus reaches them
|
||||
# stops in order of when the bus reaches them
|
||||
"stops": [{
|
||||
"href":"https://$base_domain/stops/{id}",
|
||||
"lattitude":{lattitude},
|
||||
|
@ -38,13 +38,13 @@ json object describing a route, I'm planning on this having an infinite cache ti
|
|||
|
||||
## `/stops/{id}`
|
||||
|
||||
```json
|
||||
```yaml
|
||||
{
|
||||
"_links":{
|
||||
"self":{
|
||||
"href":"https://$base_domain/stops/{id}"
|
||||
},
|
||||
// trips that make use of the stop in arbitrary order
|
||||
# trips that make use of the stop in arbitrary order
|
||||
"trips": [
|
||||
{
|
||||
"href":"https://$base_domain/trips/{id}",
|
||||
|
@ -57,7 +57,7 @@ json object describing a route, I'm planning on this having an infinite cache ti
|
|||
```
|
||||
|
||||
`/path?start_lat={lattitude}&start_lon={longitude}&end_lat={lattitude}&end_lon={longitude}&time={unix_epoch}`
|
||||
```json
|
||||
```yaml
|
||||
{
|
||||
"_links":{
|
||||
"self":{
|
||||
|
@ -71,14 +71,15 @@ json object describing a route, I'm planning on this having an infinite cache ti
|
|||
},
|
||||
"enter_bus":{
|
||||
"href":"https://$base_domain/stops/{id}",
|
||||
"lattitude": {lattitude},
|
||||
"longitude": {longitude}
|
||||
"lattitude": # {lattitude},
|
||||
"longitude": # {longitude}
|
||||
},
|
||||
"exit_bus":{
|
||||
"href":"https://$base_domain/stops/{id}",
|
||||
"lattitude": {lattitude},
|
||||
"longitude": {longitude}
|
||||
"lattitude": # {lattitude},
|
||||
"longitude": # {longitude}
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue