API client for BSM - Go
  • Go 99.3%
  • Shell 0.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-06 16:49:26 +01:00
.editorconfig initial commit 2026-04-24 11:37:43 +02:00
.gitignore initial commit 2026-04-24 11:37:43 +02:00
api.go docs: fix godoc for deprecated func 2026-11-06 16:46:21 +01:00
api_client_test.go feat: implement default API URL and more robust parsing 2026-11-06 16:17:44 +01:00
api_test.go initial commit 2026-04-24 11:37:43 +02:00
club.go refactor, docs: clean up code and add Godocs 2026-11-06 16:01:32 +01:00
constants.go feat: implement default API URL and more robust parsing 2026-11-06 16:17:44 +01:00
errors.go chore: deprecate error 2026-11-06 16:49:26 +01:00
field.go refactor, docs: clean up code and add Godocs 2026-11-06 16:01:32 +01:00
game_class.go refactor, docs: clean up code and add Godocs 2026-11-06 16:01:32 +01:00
game_winner.go refactor, docs: clean up code and add Godocs 2026-11-06 16:01:32 +01:00
go.mod fix: use minor version in go.mod 2026-06-20 10:24:22 +02:00
leaderboard_Data.go refactor, docs: clean up code and add Godocs 2026-11-06 16:01:32 +01:00
league.go initial commit 2026-04-24 11:37:43 +02:00
league_entry.go refactor, docs: clean up code and add Godocs 2026-11-06 16:01:32 +01:00
league_group.go initial commit 2026-04-24 11:37:43 +02:00
LICENSE docs: add LICENSE 2026-11-06 15:14:36 +01:00
match.go refactor, docs: clean up code and add Godocs 2026-11-06 16:01:32 +01:00
match_test.go refactor, docs: clean up code and add Godocs 2026-11-06 16:01:32 +01:00
person.go refactor, docs: clean up code and add Godocs 2026-11-06 16:01:32 +01:00
playoff_series.go refactor, docs: clean up code and add Godocs 2026-11-06 16:01:32 +01:00
playoff_series_test.go refactor, docs: clean up code and add Godocs 2026-11-06 16:01:32 +01:00
publish_new_version.sh dev: add publish script 2026-10-11 08:55:28 +02:00
README.md docs: add Go badge 2026-11-06 16:41:11 +01:00
table.go refactor, docs: clean up code and add Godocs 2026-11-06 16:01:32 +01:00
table_test.go initial commit 2026-04-24 11:37:43 +02:00
team.go refactor, docs: clean up code and add Godocs 2026-11-06 16:01:32 +01:00

Go client for the BSM API

Go Reference

This is a small utility library that adds BSM response and query data structures and an API client to query the BSM API.

The functionality is limited to features I need for my other projects - many more endpoints exist and data shapes are by no means exhaustive.

BSM does not provide an OpenAPI document, but if your use case depends on full spec parity it might be beneficial to write one yourself and generate a client with OpenAPI Generator or similar tools (or just have a clanker go YOLO on the JSON responses).

Basic usage:

func callBSM() {
    apiKey := "<insert your key here>"

    client, _ := bsm.NewAPIClientWithURL("") // using default URL, will not error
    matches, err := client.LoadMatchesWithFilterParams(map[string]string{
        bsm.GamedayFilter: bsm.GameDayCurrent,
        bsm.SeasonFilter: "2026",
        bsm.SearchFilter: "cardinals",
    }, apiKey)

    if err != nil {
        panic("loading BSM data failed")
    }
    // do something with the Match slice
}

Contributing

  • PRs are welcome if you need more data types or endpoints. No slop plz.
  • This is a simple library by a simple developer. Keep it simple.
  • I know the code quality is not great and these days I don't write API clients by hand when OpenAPI exists.