Update Readme
This commit is contained in:
parent
52c32dcc83
commit
03338d2e48
1 changed files with 10 additions and 3 deletions
13
README.md
13
README.md
|
@ -117,16 +117,23 @@ Götzendorf/Leitha&time=12:00&mode=arr)
|
|||
For "val" and "conn" requests, it is possible to use shorter requests by passing
|
||||
arguments in the path. Paths consisting of one part (i.e. /value) will be
|
||||
handled as "val" requests while those consisting of two parts (/value1/value2)
|
||||
will be handled as "conn" requests. Optional values can be passed as GET or POST
|
||||
parameters as usual.
|
||||
will be handled as "conn" requests, where the first value would be the station
|
||||
of departure and the second value would be the station of arrival. Optional
|
||||
values can be passed as GET or POST parameters as usual.
|
||||
|
||||
* [Example short "val" request](https://bahnapi.xyz/Kanfanar)
|
||||
* [Example short "conn" request](https://bahnapi.xyz/Bregenz/Neusiedl am See)
|
||||
|
||||
This syntax is intended primarily for manual requests as additional sanity
|
||||
checks for input data would be required to use it programatically.
|
||||
Specifically, station names would not be allowed to include "/" and may not be
|
||||
empty or contain only whitespace, as this will make it impossible to detect the
|
||||
correct request type.
|
||||
|
||||
### Output format
|
||||
|
||||
By default, the API returns its results as XML. If you prefer JSON, you may add
|
||||
the "json" parameter to your query.
|
||||
|
||||
* [Example "nearby" request returning JSON]
|
||||
(https://bahnapi.xyz/?type=nearby&lat=48.293&lon=16.482&json)
|
||||
(https://bahnapi.xyz/?type=nearby&lat=48.293&lon=16.482&json)
|
||||
|
|
Loading…
Reference in a new issue