mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 23:22:02 +01:00
caf71f72e6
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
49 lines
1.4 KiB
Markdown
49 lines
1.4 KiB
Markdown
# How can you contribute?
|
|
|
|
This binding is meant to get Norwegian public transport real-time (estimated) data from [Entur.no API](https://developer.entur.org/content/journey-planner-0).
|
|
|
|
It runs GraphQL-API query against the service.
|
|
|
|
Entur provides an [IDE for the API](https://api.entur.org/doc/shamash-journeyplanner/) (use query from GraphQL request example below as a start point) Ctrl+Space gives hints of valid values
|
|
|
|
There are several possibilities to get and process data from endpoints that entur.no provides. One of possible examples is to get all departures for all lines from specified stop place (all directions) or even specified quay (specified direction). Those are not supported yet so feel free to extend functionality of this binding.
|
|
|
|
## GraphQL request example
|
|
|
|
```json
|
|
{
|
|
stopPlace(id: "NSR:StopPlace:30848") {
|
|
id
|
|
name
|
|
transportMode
|
|
estimatedCalls(startTime:"2019-04-06T10:00:00+01:00" timeRange: 86400, numberOfDepartures: 400) {
|
|
realtime
|
|
aimedArrivalTime
|
|
aimedDepartureTime
|
|
expectedArrivalTime
|
|
expectedDepartureTime
|
|
date
|
|
forBoarding
|
|
forAlighting
|
|
destinationDisplay {
|
|
frontText
|
|
}
|
|
quay {
|
|
id
|
|
publicCode
|
|
}
|
|
serviceJourney {
|
|
journeyPattern {
|
|
line {
|
|
id
|
|
name
|
|
transportMode
|
|
publicCode
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
```
|