Skip to content

Commit

Permalink
Merge pull request #21 from Knowit-Objectnet/transportation
Browse files Browse the repository at this point in the history
Transportation
  • Loading branch information
andpaas authored Aug 7, 2024
2 parents bfe17d8 + e10d65f commit 298da13
Show file tree
Hide file tree
Showing 20 changed files with 14,605 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

Expand Down Expand Up @@ -241,3 +238,6 @@ Cargo.lock

# End of https://www.toptal.com/developers/gitignore/api/macos,visualstudiocode,python,rust

# Jetbrains IDEs
.idea

95 changes: 94 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ selfie = []
[dependencies]
chrono = { version = "0.4.26", features = ["serde", "unstable-locales"] }
image = "0.24.7"
graphql_client = { version = "0.13.0" }
reqwest = { version = "0.11.23", features = [
"json",
"rustls-tls",
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,11 @@ GUI-koden eksponerar også typar, som `Forecast`-structen i [weatherwidget.slint
* Koderydding
* Feilhåndtering
* Fikse minnelekkasje?

## Vedlikehold

### Oppdater skjema-definisjoner fra EnTurs API.

```shell
graphql-client introspect-schema "https://api.entur.io/journey-planner/v3/graphql" --output "src/resources/journey-planner_schema.json"
```
Binary file added img/transport/bus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/transport/bus_alert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/transport/rail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/transport/rail_alert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/transport/train.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/transport/tram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/transport/walk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/transport/water.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ mod food;
mod forecast;
mod selfie;
mod xkcd;
mod transportation;

pub mod ui {
slint::include_modules!();
Expand All @@ -28,6 +29,7 @@ fn main() -> Result<(), PlatformError> {
xkcd::setup(&main_window);
food::setup(&main_window);
calendar::setup(&main_window);
transportation::setup(&main_window);

//we need to store the timers in variables to prevent them from being dropped
let _t = datetime::setup(&main_window);
Expand Down
39 changes: 39 additions & 0 deletions src/transportation/journey-planner_query.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
query Query($id: String!, $numberOfDepartures: Int) {
stopPlace(id: $id) {
id
name
quays(filterByInUse: true) {
id
name
publicCode
estimatedCalls(numberOfDepartures: $numberOfDepartures) {
realtime
aimedArrivalTime
aimedDepartureTime
expectedArrivalTime
expectedDepartureTime
actualArrivalTime
actualDepartureTime
date
forBoarding
forAlighting
destinationDisplay {
frontText
via
}
serviceJourney {
directionType
publicCode
journeyPattern {
line {
id
name
transportMode
publicCode
}
}
}
}
}
}
}
Loading

0 comments on commit 298da13

Please sign in to comment.