NBA
Deze pagina is vertaald door PageTurner AI (beta). Niet officieel goedgekeurd door het project. Een fout gevonden? Probleem melden →
Wat
Met het NBA-segment kun je de speelschema- en score-informatie van je favoriete NBA-team tonen!
Voorbeeldconfiguratie
Om het NBA-segment te gebruiken, moet je een geldige team-tri-code opgeven waarvoor je gegevens wilt ophalen in de configuratie. Bijvoorbeeld, als je informatie wilt voor de Los Angeles Lakers, moet je de tri-code "LAL" gebruiken.
Dit voorbeeld gebruikt "LAL" om informatie op te halen voor de Los Angeles Lakers. Het stelt ook de voorgrond- en achtergrondkleuren in om aan te sluiten bij de thematiek van het team. Als je geïnteresseerd bent in specifieke voorgrond- en achtergrondkleuren voor andere teams, kun je enkele kleurenschema's hier bekijken.
Het is aanbevolen om de HTTP-time-out hoger in te stellen dan de standaardwaarde, voor het geval het ophalen van de scorebordinformatie wat tijd kost. In dit geval hebben we de http_timeout ingesteld op 1500.
- json
- yaml
- toml
{
"background": "#e9ac2f",
"foreground": "#8748dc",
"leading_diamond": "",
"style": "diamond",
"trailing_diamond": "",
"type": "nba",
"options": {
"team": "LAL",
"http_timeout": 1500
}
}
background: "#e9ac2f"
foreground: "#8748dc"
leading_diamond:
style: diamond
trailing_diamond:
type: nba
options:
team: LAL
http_timeout: 1500
background = "#e9ac2f"
foreground = "#8748dc"
leading_diamond = ""
style = "diamond"
trailing_diamond = ""
type = "nba"
[options]
team = "LAL"
http_timeout = 1500
Opties
| Name | Type | Default | Description |
|---|---|---|---|
team | string | tri-code for the NBA team you want to get data for | |
days_offset | int | 8 | how many days in advance you wish to see that information for |
http_timeout | int | 20 | How long do you want to wait before you want to see your prompt more than your sugar? I figure a half second is a good default |
Template (informatie)
\udb82\udc06 {{ .HomeTeam}}{{ if .HasStats }} ({{.HomeTeamWins}}-{{.HomeTeamLosses}}){{ end }}{{ if .Started }}:{{.HomeScore}}{{ end }} vs {{ .AwayTeam}}{{ if .HasStats }} ({{.AwayTeamWins}}-{{.AwayTeamLosses}}){{ end }}{{ if .Started }}:{{.AwayScore}}{{ end }} | {{ if not .Started }}{{.GameDate}} | {{ end }}{{.Time}}
Eigenschappen
| Name | Type | Description |
|---|---|---|
.HomeTeam | string | home team for the upcoming game |
.AwayTeam | string | away team for the upcoming game |
.Time | string | time (EST) that the upcoming game will start |
.GameDate | string | date the game will happen |
.StartTimeUTC | string | time (UTC) the game will start |
.GameStatus | integer | integer, 1 = scheduled, 2 = in progress, 3 = finished |
.HomeScore | int | score of the home team |
.AwayScore | int | score of the away team |
.HomeTeamWins | int | number of wins the home team currently has for the season |
.HomeTeamLosses | int | number of losses the home team currently has for the season |
.AwayTeamWins | int | number of wins the away team currently has for the season |
.AwayTeamLosses | int | number of losses the away team currently has for the season |
.Started | boolean | if the game was started or not |
.HasStats | boolean | if the game has game stats or not |