Direct naar hoofdinhoud

NBA

Onofficiële Beta-vertaling

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.

{
"background": "#e9ac2f",
"foreground": "#8748dc",
"leading_diamond": "",
"style": "diamond",
"trailing_diamond": "",
"type": "nba",
"options": {
"team": "LAL",
"http_timeout": 1500
}
}

Opties

NameTypeDefaultDescription
teamstringtri-code for the NBA team you want to get data for
days_offsetint8how many days in advance you wish to see that information for
http_timeoutint20How 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)

standaardsjabloon
 \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

NameTypeDescription
.HomeTeamstringhome team for the upcoming game
.AwayTeamstringaway team for the upcoming game
.Timestringtime (EST) that the upcoming game will start
.GameDatestringdate the game will happen
.StartTimeUTCstringtime (UTC) the game will start
.GameStatusintegerinteger, 1 = scheduled, 2 = in progress, 3 = finished
.HomeScoreintscore of the home team
.AwayScoreintscore of the away team
.HomeTeamWinsintnumber of wins the home team currently has for the season
.HomeTeamLossesintnumber of losses the home team currently has for the season
.AwayTeamWinsintnumber of wins the away team currently has for the season
.AwayTeamLossesintnumber of losses the away team currently has for the season
.Startedbooleanif the game was started or not
.HasStatsbooleanif the game has game stats or not