go nba sdk
GoLang SDK for NBA API
🎨 Namespace API Structure​
Intuitive to use
client := gns.NewClient(nil)
// Stats Namespace
result := client.Stats.GetPlayerCareerStats(&types.PlayerCareerStatsParams{
PlayerID: "203076",
})
⚡ Quickly try out w/ golang​
Can be used without being aware of the web API layer.
🔒 Pointer-based optional fields​
Nullable fields in response structs are represented as pointers.
client := gns.NewClient(nil)
result := client.Stats.GetPlayerCareerStats(&types.PlayerCareerStatsParams{
PlayerID: "203076",
})
fmt.Println("======================= RS ==========================")
for _, content := range result.Contents.SeasonTotalsRegularSeason {
if content.Pts != nil {
fmt.Printf("Season: %s, PPG: %.2f\n",
content.SeasonID,
*content.Pts,
)
}
}