voetbalpoulesclient

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: MIT Imports: 8 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 {
	// contains filtered or unexported fields
}

A client that manages communication with Voetbalpoules

func NewClient

func NewClient(url string) *Client

NewClientt returns a new Voetbalpoules Client instance

func (Client) GetPoolVoorspelling

func (c Client) GetPoolVoorspelling(t1 time.Time, t2 time.Time, poolid int, competitie string) ([]VoorspeldeWedstrijd, error)

GetPoolVoorspelling returns a wedstrijd and all deelnemer predictions for a pool for a competitie within a specified timerange

func (Client) GetStand

func (c Client) GetStand(poolID int, competitie string) []Deelnemer

GetStand returns a sorted ranking for a pool

func (Client) GetWedstrijden added in v0.0.7

func (c Client) GetWedstrijden(t1 time.Time, t2 time.Time, poolid int, competitie string) ([]Wedstrijd, error)

GetWedstrijden returns wedstrijden for a timerange

type Deelnemer

type Deelnemer struct {
	ID          int
	Naam        string
	Punten      int
	PuntenRonde int
}

type Pool

type Pool struct {
	Deelnemers []Deelnemer
}

type VoorspeldeWedstrijd

type VoorspeldeWedstrijd struct {
	Wedstrijd               Wedstrijd
	DeelnemerVoorspellingen map[Deelnemer]Voorspelling
}

A struct containing a Wedstrijd and its DeelnemerVoorspellingen

type Voorspelling

type Voorspelling struct {
	Datum                time.Time
	ThuisTeam            string
	UitTeam              string
	DoelpuntenThuis      *int
	DoelpuntenUit        *int
	Wvdw                 bool
	ThuisDoelpuntenMaker *string
	UitDoelpuntenMaker   *string
}

type Wedstrijd

type Wedstrijd struct {
	Datum                time.Time
	Competitie           string
	ThuisTeam            string
	UitTeam              string
	Uitslag              string
	Wvdw                 bool
	ThuisDoelpuntenMaker string
	UitDoelpuntenMaker   string
}

Jump to

Keyboard shortcuts

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