Skip to content
A Golang wrapper for the SportMonks Soccer API
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
docs
LICENSE
README.md
bookmakers.go
bookmakers_test.go
coaches.go
coaches_test.go
commentaries.go
commentaries_test.go
continents.go
continents_test.go
countries.go
countries_test.go
errors.go
fixtures.go
fixtures_test.go
go.mod
go.sum
helpers.go
http.go
http_test.go
leagues.go
leagues_test.go
livescores.go
livescores_test.go
markets.go
markets_test.go
meta.go
odds.go
odds_test.go
players.go
players_test.go
rounds.go
rounds_test.go
seasons.go
seasons_test.go
stages.go
stages_test.go
standings.go
standings_test.go
team_squads.go
team_squads_test.go
teams.go
teams_test.go
topscorers.go
topscorers_test.go
tv_stations.go
tv_stations_test.go
type.go
venues.go
venues_test.go
video_highlights.go
video_highlights_test.go

README.md

Statistico SportMonks Go Client

Documentation CircleCI

This library is a Golang wrapper around version 2.0 of the SportMonks soccer API. Full documentation and API reference can be found here:

Documentation

API Reference

Installation

$ go get -u github.com/statistico/statistico-sportmonks-go-client

Usage

To instantiate the required HTTPClient struct and retrieve a single League resource:

package main

import (
    "context"
    "fmt"
    "github.com/statistico/statistico-sportmonks-go-client"
)

func main() {
    client := sportmonks.NewDefaultHTTPClient("YOUR_TOKEN_GOES_HERE")
    
    league, _, err := client.LeagueByID(context.Background(), 10, []string{}) 

    if err != nil {
        fmt.Printf("%s\n", err)
        return
    }

    // Do something with league variable
}

The SportMonks soccer API provides powerful 'includes' and 'filtering' features that allow you to enrich data requests. Full documentation on API flexibility, relationships and includes functionality can be found here. Instructions on how to use the filtering parameters and sort functionality can be found here.

For more detailed examples on how to use this library please see the docs directory

Contributing

You are more than welcome to contribute to this project. Fork and make a Pull Request, or create an Issue if you notice any problems or would like to suggest improvements.

You can’t perform that action at this time.