lambal / statistico-sportmonks-go-client

A Golang wrapper for the SportMonks Soccer API

Home Page:https://sportmonks.com/products/soccer

Repository from Github https://github.comlambal/statistico-sportmonks-go-clientRepository from Github https://github.comlambal/statistico-sportmonks-go-client

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.Error())
        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.

About

A Golang wrapper for the SportMonks Soccer API

https://sportmonks.com/products/soccer

License:MIT License


Languages

Language:Go 100.0%