aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2021-08-11 22:58:08 +0200
committerMartin Polden <mpolden@mpolden.no>2021-08-11 22:58:08 +0200
commitbf608080da40fea34354635aaba0769e9c8eaed0 (patch)
tree9bf493351c11147be7bc445877892ae14e023be7
parent1bc75509028ab17009df30e26b0519d97e855403 (diff)
docs: Use new atb API in examples
-rw-r--r--docs/WIDGETS.md7
-rw-r--r--jarvis/config.py.sample6
2 files changed, 5 insertions, 8 deletions
diff --git a/docs/WIDGETS.md b/docs/WIDGETS.md
index 8610917..af81f15 100644
--- a/docs/WIDGETS.md
+++ b/docs/WIDGETS.md
@@ -24,19 +24,16 @@ interval to prevent slow jobs from blocking future jobs.
atb
---
Displays bus routes in Trondheim, Norway. Uses the API provided by
-[atbapi](https://github.com/mpolden/atbapi).
+[mpolden/atb](https://github.com/mpolden/atb).
```python
JOBS["atb"] = {
"enabled": True,
"interval": 60,
- "url": "https://mpolden.no/atb/v1/departures/<location-id>",
+ "url": "https://mpolden.no/atb/v2/departures/<stop-id>",
}
```
-A list of possible location IDs is available here:
-https://mpolden.no/atb/v1/busstops
-
avinor
------
Displays future flights for the configured destination. This widget uses
diff --git a/jarvis/config.py.sample b/jarvis/config.py.sample
index e58f38f..ee5962b 100644
--- a/jarvis/config.py.sample
+++ b/jarvis/config.py.sample
@@ -16,15 +16,15 @@ JOBS = {}
JOBS["atb"] = {
"enabled": True,
"interval": 60,
- "url": "https://mpolden.no/atb/v1/departures/16010194",
+ "url": "https://mpolden.no/atb/v2/departures/43501",
"timeout": 5,
}
# Add additional atb job for another departure
-JOBS["atb-16010382"] = {
+JOBS["atb-41613"] = {
"enabled": False,
"interval": 60,
- "url": "https://mpolden.no/atb/v1/departures/16010007",
+ "url": "https://mpolden.no/atb/v2/departures/41613",
"timeout": 5,
"job_impl": "atb",
}