Saltar al contenido principal

NBA

Traducción Beta No Oficial

Esta página fue traducida por PageTurner AI (beta). No está respaldada oficialmente por el proyecto. ¿Encontraste un error? Reportar problema →

Qué hace

¡El segmento NBA te permite mostrar la información de programación y resultados de tu equipo favorito de la NBA!

Configuración de ejemplo

Para utilizar el segmento NBA, debes proporcionar un tri-code válido del equipo para el que deseas obtener datos en la configuración. Por ejemplo, si quieres obtener información sobre Los Angeles Lakers, necesitarás usar el tri-code "LAL".

Este ejemplo utiliza "LAL" para obtener información de Los Angeles Lakers. También configura los colores de primer plano y fondo para que coincidan con la temática del equipo. Si estás interesado en obtener información sobre combinaciones de colores específicas que podrías usar para otros equipos, puedes explorar algunos esquemas de color aquí.

Se recomienda configurar un valor de HTTP timeout más alto que el predeterminado normal por si toma tiempo recopilar la información del marcador. En este caso tenemos el http_timeout configurado en 1500.

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

Opciones

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

Plantilla (info)

plantilla predeterminada
 \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}}

Propiedades

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