diff --git a/docs/widgets.md b/docs/widgets.md index 4a1d6551..611e559a 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -35,6 +35,7 @@ Dashy has support for displaying dynamic content in the form of widgets. There a - [GitHub Trending](#github-trending) - [GitHub Profile Stats](#github-profile-stats) - [Healthchecks Status](#healthchecks status) + - [Mvg Departure](#mvg-departure) - **[Self-Hosted Services Widgets](#self-hosted-services-widgets)** - [System Info](#system-info) - [Cron Monitoring](#cron-monitoring-health-checks) @@ -1173,6 +1174,41 @@ Display status of one or more HealthChecks project(s). Works with healthcheck.io --- +### MVG Departure + +Display departure time of a MVG (Münchner Verkehrs Gesellschaft) station. + +From https://www.mvg.de/impressum.html: + +> [...] Die Verarbeitung unserer Inhalte oder Daten durch Dritte erfordert unsere ausdrückliche Zustimmung. Für private, nicht-kommerzielle Zwecke, wird eine gemäßigte Nutzung ohne unsere ausdrückliche Zustimmung geduldet. Jegliche Form von Data-Mining stellt keine gemäßigte Nutzung dar.[...] + +In other words: Private, noncomercial, moderate use of the API is tolerated. They don’t consider data mining as moderate use. + +#### Options + +**Field** | **Type** | **Required** | **Description** +--- | --- | --- | --- +**`location`** | `string` | Required | The name of the location (exact) or the location id, startin with `de:09162:` +**`limit`** | `integer` | _Optional_ | Limit number of entries, defaults to 10. + +```yaml +- type: mvg + options: + location: Marienplatz + limit: 5 +``` + +#### Info + +- **CORS**: 🟢 Enabled +- **Auth**: 🟢 Required +- **Price**: 🟢 Free / Paid / Self-hosted +- **Host**: Managed Instance or Self-Hosted (see [healthchecks/healthchecks](https://github.com/healthchecks/healthchecks)) +- **Privacy**: _See [Healthchecks.io Privacy Policy](https://healthchecks.io/privacy/)_ + +--- + + ## Self-Hosted Services Widgets ### System Info diff --git a/src/components/Widgets/Mvg.vue b/src/components/Widgets/Mvg.vue new file mode 100644 index 00000000..564d25de --- /dev/null +++ b/src/components/Widgets/Mvg.vue @@ -0,0 +1,361 @@ + + + + + + + + diff --git a/src/components/Widgets/WidgetBase.vue b/src/components/Widgets/WidgetBase.vue index ecd7b536..60d25bb9 100644 --- a/src/components/Widgets/WidgetBase.vue +++ b/src/components/Widgets/WidgetBase.vue @@ -82,6 +82,7 @@ const COMPAT = { image: 'ImageWidget', joke: 'Jokes', 'mullvad-status': 'MullvadStatus', + mvg: 'Mvg', 'nd-cpu-history': 'NdCpuHistory', 'nd-load-history': 'NdLoadHistory', 'nd-ram-history': 'NdRamHistory', diff --git a/src/utils/defaults.js b/src/utils/defaults.js index 8d609684..8f51df94 100644 --- a/src/utils/defaults.js +++ b/src/utils/defaults.js @@ -236,6 +236,7 @@ module.exports = { jokes: 'https://v2.jokeapi.dev/joke/', news: 'https://api.currentsapi.services/v1/latest-news', mullvad: 'https://am.i.mullvad.net/json', + mvg: 'https://www.mvg.de/api/fib/v2/', publicIp: 'https://ipapi.co/json', publicIp2: 'https://api.ipgeolocation.io/ipgeo', publicIp3: 'http://ip-api.com/json',