Categorygithub.com/syurchen93/api-football-client
module
0.0.0-20240427135740-702d5d8f7e83
Repository: https://github.com/syurchen93/api-football-client.git
Documentation: pkg.go.dev

# README

Module Api Football Client

A go lang SDK for API Football

Go Coverage Go Report Card

Usage example:

package main

import (
	"github.com/syurchen93/api-football-client/request/league"
	"github.com/syurchen93/api-football-client/client"
	"fmt"
)

func main() {
	apiClient := client.NewClient("your secret", client.RateLimiterSettings{})

	getCountriesRequest := league.Country{}
	getCountriesRequest.Code = "US"

	resp, err := apiClient.DoRequest(getCountriesRequest)
	if (err != nil) {
		fmt.Println(err)
	} else {
		fmt.Println(resp)
	}
}

The client is validating the request object for you so you don't waste precious API call on requests that will never give a result. Some undocumented edge cases are not inclided, feel free to contribute 😊

Since version 2.0 the rate limiter was added. Pass an empty settings object if you are using a free version of the API or customize it according to your plan.

The betting endpoints will not be implemented, because I don't support gambling. Fell free to fork and do those yourself

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author