π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
π Requires an apiKey for Sports Scores, instead of a fallback key
Iainaf0458fb1364
diff --git a/docs/widgets.md b/docs/widgets.mdindex 888a092b..64a1ff5d 100644--- a/docs/widgets.md+++ b/docs/widgets.md@@ -918,7 +918,7 @@ Show recent scores and upcoming matches from your favorite sports team. Data is**`teamId`** | `string` | **Optional** | The ID of a team to fetch scores from. You can search for your team on the [Teams Page](https://www.thesportsdb.com/teams_main.php)**`leagueId`** | `string` | **Optional** | Alternatively, provide a league ID to fetch all games from. You can find the ID on the [Leagues Page](https://www.thesportsdb.com/Sport/Leagues)**`pastOrFuture`** | `string` | **Optional** | Set to `past` to show scores for recent games, or `future` to show upcoming games. Defaults to `past`. You can change this within the UI-**`apiKey`** | `string` | **Optional** | Optionally specify your API key, which you can sign up for at [TheSportsDB.com](https://www.thesportsdb.com/)+**`apiKey`** | `string` | Required | Your API key from [TheSportsDB.com](https://www.thesportsdb.com/pricing). Their [free key](https://www.thesportsdb.com/documentation#free_vs_premium) works too, but only returns one match at a time**`limit`** | `number` | **Optional** | To limit output to a certain number of matches, defaults to `15`**`hideImage`** | `boolean` | **Optional** | Set to `true` to not render the team / match banner image, defaults to `false`@@ -928,12 +928,13 @@ Show recent scores and upcoming matches from your favorite sports team. Data is- type: sports-scoresoptions:teamId: 133636+ apiKey: xxxxxxxx```#### Info- **CORS**: π’ Enabled-- **Auth**: π Optional+- **Auth**: π΄ Required- **Price**: π Free plan (up to 30 requests / minute, limited endpoints)- **Host**: Managed Instance Only- **Privacy**: β« No Policy Availablediff --git a/src/components/Widgets/SportsScores.vue b/src/components/Widgets/SportsScores.vueindex e9d09cd4..a0849ab7 100644--- a/src/components/Widgets/SportsScores.vue+++ b/src/components/Widgets/SportsScores.vue@@ -93,7 +93,7 @@ export default {return this.options.leagueId;},apiKey() {- return this.parseAsEnvVar(this.options.apiKey) || '123';+ return this.parseAsEnvVar(this.options.apiKey);},limit() {return this.options.limit || 20;@@ -142,6 +142,11 @@ export default {}},fetchData() {+ if (!this.apiKey) {+ this.error('An apiKey is required, see the docs for more info');+ this.finishLoading();+ return;+ }request.get(this.endpoint).then((response) => {this.processData(response.data.results || response.data.events);