glanceapp / glanceapp/community-widgets
Widget - football-league-table: No output in api.
- Dominant language
- Go
- Stars
- 872
- Forks
- 175
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 9
Description
### Widget link
https://github.com/glanceapp/community-widgets/blob/main/widgets/football-league-table/README.md
### Description
This api gives nothing. I have correct Token, but gives and error.
url: https://api.football-data.org/v4/competitions/BL1/standings
From log in Portainer:
2025/11/19 12:33:37 Config file changed, reloading...
2025/11/19 12:33:37 Config has errors: parsing variable: environment variable TEAM_ID not found
2025/11/19 12:34:13 Config has errors: parsing variable: environment variable TEAM_ID not found
Any help?
widgets:
- type: custom-api
title: League Table
cache: 30m
url: https://api.football-data.org/v4/competitions/BL1/standings
headers:
X-Auth-Token: xxxxxxxxxx
template: |
{{ $compName := .JSON.String "competition.name" }}
{{ $standings := .JSON.Array "standings" }}
{{ if $standings }}
{{ $standing := index $standings 0 }}
{{ $table := $standing.Array "table" }}
{{ range $table }}
{{ $position := .Int "position" }}
{{ $team := .Get "team" }}
{{ $teamName := $team.String "shortName" }}
{{ $played := .Int "playedGames" }}
{{ $gd := .Int "goalDifference" }}
{{ $points := .Int "points" }}
{{ $teamId := $team.Int "id" }}
{{ $rowStyle := "padding: 4px 0;" }}
{{ $textStyle := "" }}
{{ if eq $teamId ${TEAM_ID} }}
{{ $rowStyle = "padding: 4px 0; background: rgba(255,255,255,0.05); border-left: 3px solid var(--color-highlight);" }}
{{ $textStyle = "font-weight: bold; color: var(--color-highlight);" }}
{{ end }}
{{ end }}
{{ else }}
{{ end }}
Contributor guide
Research direction
Start with widgets/football-league-table/README.md and compare its configuration with the reported custom-api block, especially the ${TEAM_ID} reference. Check how the widget expects TEAM_ID to be supplied and verify the football-data.org standings request with the shown URL and token. Done means the configuration loads without the missing-environment-variable error and the widget renders standings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- yaml
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100