2020-03-09 19:47:29 +01:00
|
|
|
# `serverInfo([opt])`
|
|
|
|
|
|
|
|
**Fetches meta information from the HAFAS endpoint.**
|
|
|
|
|
|
|
|
With `opt`, you can override the default options, which look like this:
|
|
|
|
|
|
|
|
```js
|
|
|
|
{
|
2022-02-22 20:23:54 +01:00
|
|
|
versionInfo: true, // query HAFAS versions?
|
2020-03-09 19:47:29 +01:00
|
|
|
language: 'en', // depends on the profile
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
As an example, we're going to use the [SVV profile](../p/svv):
|
|
|
|
|
|
|
|
```js
|
|
|
|
const createClient = require('hafas-client')
|
|
|
|
const svvProfile = require('hafas-client/p/svv')
|
|
|
|
|
|
|
|
const client = createClient(svvProfile, 'my-awesome-program')
|
|
|
|
|
2021-12-29 16:59:31 +01:00
|
|
|
await client.serverInfo()
|
2020-03-09 19:47:29 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
```js
|
|
|
|
{
|
2022-02-22 20:23:54 +01:00
|
|
|
// version of the HAFAS Connection Interface (HCI), the API that hafas-client uses
|
|
|
|
hciVersion: '1.23',
|
|
|
|
|
2020-03-09 19:47:29 +01:00
|
|
|
timetableStart: '20200517',
|
|
|
|
timetableEnd: '20201212',
|
|
|
|
serverTime: '2020-07-19T21:32:12+02:00',
|
|
|
|
realtimeDataUpdatedAt: 1595187102,
|
|
|
|
}
|
|
|
|
```
|