tba

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrNotModified

type ErrNotModified struct {
	// contains filtered or unexported fields
}

ErrNotModified is returned when a resource has not been modified since it was last retrieved from TBA.

type Service

type Service struct {
	URL    string
	APIKey string
	// contains filtered or unexported fields
}

Service provides methods for retrieving data from The Blue Alliance API

func (*Service) GetEvents

func (s *Service) GetEvents(ctx context.Context, year int, schemaID *int64) ([]store.Event, error)

GetEvents retrieves all events from the given year (e.g. 2018).

func (*Service) GetMatches

func (s *Service) GetMatches(ctx context.Context, eventKey string) ([]store.Match, error)

GetMatches retrieves all matches from a specific event.

func (*Service) GetTeamKeys

func (s *Service) GetTeamKeys(ctx context.Context, eventKey string) ([]string, error)

GetTeamKeys retrieves all team keys from a specific event

func (*Service) GetTeamRankings

func (s *Service) GetTeamRankings(ctx context.Context, eventKey string) ([]store.Team, error)

GetTeamRankings retrieves all team rankings from a specific event.

func (*Service) Ping

func (s *Service) Ping(ctx context.Context) error

Ping pings the TBA /status endpoint

Jump to

Keyboard shortcuts

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