api

package
v0.0.0-...-e29a901 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Fpl *http.Client
}

Client is the wrapper for the FplApi interface

func New

func New() Client

New will generate our FPL client to interact with the FPL API

func (Client) GetAllFixtures

func (c Client) GetAllFixtures() (responses.GameweekFixtures, error)

GetAllFixtures returns the fixtures for every gameweek

func (Client) GetBootstrapData

func (c Client) GetBootstrapData() (responses.BootstrapData, error)

GetBootstrapData returns all the bootstrap data that serves any additional calls

func (Client) GetGameweekFixtures

func (c Client) GetGameweekFixtures(gameweek int) (responses.GameweekFixtures, error)

GetGameweekFixtures returns the fixtures for a specified gameweek

func (Client) GetGameweekLiveScores

func (c Client) GetGameweekLiveScores(gameweek int) (responses.GameweekLiveScores, error)

GetGameweekLiveScores returns player data for that specific gameweek

func (Client) GetGameweekPoints

func (c Client) GetGameweekPoints(teamID int, gameweek int) (responses.GameweekPoints, error)

GetGameweekPoints returns the points your team has for a specified gameweek

func (Client) GetManagerDetails

func (c Client) GetManagerDetails(teamID int) (responses.ManagerDetails, error)

GetManagerDetails returns the details around the manager, more specifically this current season

func (Client) GetManagerHistory

func (c Client) GetManagerHistory(teamID int) (responses.ManagerHistory, error)

GetManagerHistory returns the managers history for his team

func (Client) GetPlayerDetails

func (c Client) GetPlayerDetails(playerID int) (responses.PlayerDetails, error)

GetPlayerDetails returns the details for a specific player, including current and past seasons

type FplAPI

type FplAPI interface {
	GetBootstrapData() (responses.BootstrapData, error)
	GetAllFixtures() (responses.GameweekFixtures, error)
	GetGameweekFixtures(gameweek int) (responses.GameweekFixtures, error)
	GetGameweekPoints(teamID int, gameweek int) (responses.GameweekPoints, error)
	GetGameweekLiveScores(gameweek int) (responses.GameweekLiveScores, error)
	GetManagerHistory(teamID int) (responses.ManagerHistory, error)
	GetManagerDetails(teamID int) (responses.ManagerDetails, error)
	GetPlayerDetails(playerID int) (responses.PlayerDetails, error)
}

FplAPI is the interface for the FPL API

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL