go-nba-sdk

module
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2026 License: MIT

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

Path Synopsis
api
fixtures

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL