Documentation
¶
Index ¶
- Constants
- func OrderedPositions() []string
- func Positions() map[string]bool
- type FilterFn
- type Player
- type Players
- type Repo
- func (r *Repo) Ceil() []Player
- func (r *Repo) CeilByPos(pos string, limit int) []Player
- func (r *Repo) FindAll(name string) (all Players)
- func (r *Repo) FindAvailable(name string) Players
- func (r *Repo) FindUnavailable(name string) Players
- func (r *Repo) Floor() []Player
- func (r *Repo) FloorByPos(pos string, limit int) []Player
- func (r *Repo) Keep(p Player) error
- func (r *Repo) Pick(p Player) error
- func (r *Repo) Sync(plyrs []TeamPlayer)
- func (r *Repo) Team(name string) []Player
- func (r *Repo) UnPick(p Player) error
- type SortBy
- type Team
- type TeamPlayer
Constants ¶
View Source
const ( QB = "QB" WR = "WR" RB = "RB" TE = "TE" DST = "DST" K = "K" )
Variables ¶
This section is empty.
Functions ¶
func OrderedPositions ¶
func OrderedPositions() []string
Types ¶
type Player ¶
type Player struct {
Ceil float64 `json:"ceiling"`
CeilRank float64 `json:"ceiling_rank"`
CeilVor float64 `json:"ceiling_vor"`
Floor float64 `json:"floor"`
FloorRank float64 `json:"floor_rank"`
FloorVor float64 `json:"floor_vor"`
ADP float64 `json:"adp"`
Age int `json:"age"`
Dropoff float64 `json:"drop_off"`
Exp int `json:"exp"`
ID int `json:"id"`
NameFirst string `json:"first_name"`
NameLast string `json:"last_name"`
OverallRank int `json:"rank"`
Position string `json:"pos"`
PositionRank int `json:"pos_rank"`
StdDevPoints float64 `json:"sd_pts"`
Team string `json:"team"`
Tier int `json:"tier"`
Vor float64 `json:"points_vor"`
Risk float64 `json:"risk"`
}
Player of the NFL variety
func LoadFromCSV ¶
LoadFromCSV pre-processes a csv manually downloaded from http://apps.fantasyfootballanalytics.net/lineupoptimizer/. Login and use the download button to get the csv. Unfortunately, there lacks an easy way to make a request to get the data IMPORTANT: You want the custom rankings (not the raw). This function take the csv and transforms it into a parseable json file
type Repo ¶
func (*Repo) FindAvailable ¶
func (*Repo) FindUnavailable ¶
func (*Repo) Sync ¶
func (r *Repo) Sync(plyrs []TeamPlayer)
type Team ¶
type Team struct {
Name string
Players []TeamPlayer
}
type TeamPlayer ¶
type TeamPlayer struct {
ID int
}
Click to show internal directories.
Click to hide internal directories.