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}`
|
## `/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 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":{
|
"_links":{
|
||||||
"self":{
|
"self":{
|
||||||
"href":"https://$base_domain/trips/{id}"
|
"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": [{
|
"stops": [{
|
||||||
"href":"https://$base_domain/stops/{id}",
|
"href":"https://$base_domain/stops/{id}",
|
||||||
"lattitude":{lattitude},
|
"lattitude":{lattitude},
|
||||||
|
@ -38,13 +38,13 @@ json object describing a route, I'm planning on this having an infinite cache ti
|
||||||
|
|
||||||
## `/stops/{id}`
|
## `/stops/{id}`
|
||||||
|
|
||||||
```json
|
```yaml
|
||||||
{
|
{
|
||||||
"_links":{
|
"_links":{
|
||||||
"self":{
|
"self":{
|
||||||
"href":"https://$base_domain/stops/{id}"
|
"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": [
|
"trips": [
|
||||||
{
|
{
|
||||||
"href":"https://$base_domain/trips/{id}",
|
"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}`
|
`/path?start_lat={lattitude}&start_lon={longitude}&end_lat={lattitude}&end_lon={longitude}&time={unix_epoch}`
|
||||||
```json
|
```yaml
|
||||||
{
|
{
|
||||||
"_links":{
|
"_links":{
|
||||||
"self":{
|
"self":{
|
||||||
|
@ -71,14 +71,15 @@ json object describing a route, I'm planning on this having an infinite cache ti
|
||||||
},
|
},
|
||||||
"enter_bus":{
|
"enter_bus":{
|
||||||
"href":"https://$base_domain/stops/{id}",
|
"href":"https://$base_domain/stops/{id}",
|
||||||
"lattitude": {lattitude},
|
"lattitude": # {lattitude},
|
||||||
"longitude": {longitude}
|
"longitude": # {longitude}
|
||||||
},
|
},
|
||||||
"exit_bus":{
|
"exit_bus":{
|
||||||
"href":"https://$base_domain/stops/{id}",
|
"href":"https://$base_domain/stops/{id}",
|
||||||
"lattitude": {lattitude},
|
"lattitude": # {lattitude},
|
||||||
"longitude": {longitude}
|
"longitude": # {longitude}
|
||||||
},
|
},
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue