Documentation ¶
Index ¶
- Constants
- func MakeLeagueKey(gameKey string, leagueID int) string
- type YFantasy
- func (yf *YFantasy) CurrentScoreboard(leagueKey string) (*schema.Scoreboard, error)
- func (yf *YFantasy) League(leagueKey string) (*schema.League, error)
- func (yf *YFantasy) Player(leagueKey, name string) (*schema.Player, error)
- func (yf *YFantasy) PlayerAdvancedStats(leagueKey, name string) (*schema.Player, error)
- func (yf *YFantasy) PlayerOwnership(leagueKey, name string) (*schema.Player, error)
- func (yf *YFantasy) PlayerStats(leagueKey, name string, statsType int) (*schema.Player, error)
- func (yf *YFantasy) Rosters(leagueKey string) (*schema.Teams, error)
- func (yf *YFantasy) Scoreboard(leagueKey string, week int) (*schema.Scoreboard, error)
- func (yf *YFantasy) SearchPlayers(leagueKey, name string) ([]*schema.Player, error)
- func (yf *YFantasy) Standings(leagueKey string) (*schema.Standings, error)
- func (yf *YFantasy) Team(leagueKey, teamName string) (*schema.Team, error)
- func (yf *YFantasy) TeamRoster(leagueKey, teamName string) (*schema.Team, error)
- func (yf *YFantasy) TeamStats(leagueKey, teamName string, statsType int) (*schema.Team, error)
Constants ¶
const ( StatsTypeUnknown = iota StatsTypeSeason StatsTypeAverageSeason StatsTypeDate StatsTypeLastWeek StatsTypeLastWeekAverage StatsTypeLastMonth StatsTypeLastMonthAverage )
Enum of types when requesting for stats.
Variables ¶
This section is empty.
Functions ¶
func MakeLeagueKey ¶ added in v0.1.0
MakeLeagueKey creates a league key from the gameKey and leagueID.
Types ¶
type YFantasy ¶
type YFantasy struct {
// contains filtered or unexported fields
}
YFantasy is the client for the Yahoo Fantasy API.
func (*YFantasy) CurrentScoreboard ¶ added in v0.1.0
func (yf *YFantasy) CurrentScoreboard(leagueKey string) (*schema.Scoreboard, error)
CurrentScoreboard queries the Yahoo Fantasy API for a league's current scoreboard.
func (*YFantasy) Player ¶ added in v0.1.2
Player searches the given league for a player with the provided player name. If the player is not found, an error is returned. name should contain at least 3 letters.
func (*YFantasy) PlayerAdvancedStats ¶ added in v0.1.2
PlayerAdvancedStats searches the given league for a player with the provided player name and returns their advanced stats. If the player is not found, an error is returned. name should contain at least 3 letters.
func (*YFantasy) PlayerOwnership ¶ added in v0.1.6
PlayerOwnership searches the league for a player with the provided named and returns their ownership status.
func (*YFantasy) PlayerStats ¶ added in v0.1.2
PlayerStats searches the given league for a player with the provided player name. and returns their average stats for the current season. If the player is not found, an error is returned. name should contain at least 3 letters.
func (*YFantasy) Rosters ¶ added in v0.1.0
Rosters queries the Yahoo Fantasy API for all the team rosters in a league.
func (*YFantasy) Scoreboard ¶ added in v0.1.0
Scoreboard queries the Yahoo Fantasy API for the scoreboard of a given week.
func (*YFantasy) SearchPlayers ¶ added in v0.1.2
SearchPlayers searches the given league for a players with the provided player name. name should contain at least 3 letters.
func (*YFantasy) Standings ¶ added in v0.1.0
Standings queries the Yahoo Fantasy API for a leagues Standings.
func (*YFantasy) Team ¶ added in v0.0.27
Team searches the given league for a team with the provided team name. If the team is not found an error is returned.
func (*YFantasy) TeamRoster ¶ added in v0.1.2
TeamRoster searches the given league for a team with the provided team name and return's its roster. If the team is not found an error is returned.