PandaScore client for Go.
go get github.com/tmbrggmn/pandascore-go
TODO
- Getting all pages from the PandaScore API has been implemented with by unmarshalling the results from all
requests into a single array of
map[string]interface{}
to avoid having to usereflect
to merge structs (see execution.go). Not sure if this is the best way to tackle this problem 🤷♂️
In order to run the integration tests you'll need to do 2 things:
- Add your on
.env
file to the root of the project - Enable integration tests by enabling the
integration
build flag
To set the PandaScore access token, simple create a new .env file in the root
of the project and add your PandaScore access token in the PANDASCORE_ACCESS_TOKEN
variable. For example:
PANDASCORE_ACCESS_TOKEN=my_pandascore_access_token
Integration tests are marked with the integration
build flag, so to run them
we need to enable integration tests when running the test: go test -tags=integration