providers

package
v0.0.0-...-d8ca17d Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageCreateProvider

type MessageCreateProvider interface {
	Scoreboard(week int) string
	Standings() string
	Roster(teamName string) string
	PlayerStats(statsType, playerName string) string
	Compare(statsType, playerA, playerB string) string
	AnalyzeFreeAgents(statsType string, stats []string) string
	VsLeague(teamName string, week int) string
	Schedule(teamName string) string
	Owner(playerName []string) string
	Leaders(date string) string
	HeadToHead(week int, teamA, teamB string) string
	Ranks(week int, stat string) string
	Help() *discordgo.MessageEmbed
}

MessageCreateProvider is the interface for providers that are accessed on the MessageCreate Discord event.

type Yahoo

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

Yahoo is a provider for Yahoo Fantasy Sports.

func NewYahooProvider

func NewYahooProvider(auth *yauth.YAuth, gameKey string, leagueID int) *Yahoo

NewYahooProvider returns a new Yahoo provider

func (*Yahoo) AnalyzeFreeAgents

func (y *Yahoo) AnalyzeFreeAgents(statsType string, stats []string) string

AnalyzeFreeAgents prints the top 5 players for the given stats with th given type.

func (*Yahoo) Compare

func (y *Yahoo) Compare(statsType, playerA, playerB string) string

Compare computes the difference in stats between the two provided players.

func (*Yahoo) HeadToHead

func (y *Yahoo) HeadToHead(week int, teamA, teamB string) string

HeadToHead displays the matchup results between the two given teams on the given week.

func (*Yahoo) Help

func (y *Yahoo) Help() *discordgo.MessageEmbed

Help returns the help docs.

func (*Yahoo) Leaders

func (y *Yahoo) Leaders(date string) string

Leaders returns the stat category leaders for a given day.

func (*Yahoo) Owner

func (y *Yahoo) Owner(playerNames []string) string

Owner returns the owner for all the provided players.

func (*Yahoo) PlayerStats

func (y *Yahoo) PlayerStats(statsType, playerName string) string

PlayerStats returns a formatted string containing the stats for a player.

func (*Yahoo) Ranks

func (y *Yahoo) Ranks(week int, stat string) string

Ranks sorts all the teams by the given stat for the given week and returns the sorted list as a string. If no week is given, the current week is used.

func (*Yahoo) Roster

func (y *Yahoo) Roster(teamName string) string

Roster returns a formatted string containg the roster of a team.

func (*Yahoo) Schedule

func (y *Yahoo) Schedule(teamName string) string

Schedule returns the season schedule for the given team.

func (*Yahoo) Scoreboard

func (y *Yahoo) Scoreboard(week int) string

Scoreboard returns a formatted string of all the Yahoo matchups for the given week. If week is -1, then the current week is used.

func (*Yahoo) Standings

func (y *Yahoo) Standings() string

Standings returns a formatted string containing the Yahoo league's standings.

func (*Yahoo) VsLeague

func (y *Yahoo) VsLeague(teamName string, week int) string

VsLeague computes the given teams matchup outcome against every other team in the league.

Jump to

Keyboard shortcuts

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