module
Version:
v0.3.1
Opens a new window with list of versions in this module.
Published: May 11, 2026
License: MIT
Opens a new window with license information.
README
¶
go-nba-sdk
NBA API SDK for golang
📝 document
⚡ Quick Start
$ go get github.com/poteto0/go-nba-sdk
package main
import (
"fmt"
"github.com/poteto0/go-nba-sdk/gns"
)
func main() {
client := gns.NewClient(nil)
result := client.Live.GetScoreBoard(nil)
games := result.Contents.Scoreboard.Games
for _, game := range games {
fmt.Println("==========")
if game.IsFinished() {
fmt.Println(" Final ")
} else {
fmt.Printf("%dQ (%s)\n", game.Period, game.GameClock)
}
fmt.Printf("%s | %s\n", game.HomeTeam.TeamTricode, game.AwayTeam.TeamTricode)
fmt.Printf("%d | %d\n", game.HomeTeam.Score, game.AwayTeam.Score)
}
fmt.Println("==========")
}
Directories
¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fixtures
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.