players

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PositionGK  = "GK"
	PositionRB  = "RB"
	PositionRWB = "RWB"
	PositionLB  = "LB"
	PositionLWB = "LWB"
	PositionCB  = "CB"
	PositionCDM = "CDM"
	PositionCM  = "CM"
	PositionCAM = "CAM"
	PositionRM  = "RM"
	PositionRW  = "RW"
	PositionRF  = "RF"
	PositionLM  = "LM"
	PositionLW  = "LW"
	PositionLF  = "LF"
	PositionCF  = "CF"
	PositionST  = "ST"
)
View Source
const (
	PositionTypeMain = "main"
	PositionTypeAll  = "all"
	PositionTypeAlt  = "alt"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Get(opt *Options) ([]Player, error)
	TOTW() ([]Player, error)
	Popular() ([]Player, error)
	Latest() ([]Player, error)
}

func DefaultClient

func DefaultClient() Client

func NewClient

func NewClient(c *http.Client) Client
type Foot string
const (
	Right Foot = "Right"
	Left  Foot = "Left"
)

type Options

type Options struct {
	Platform string

	Page  int
	Sort  string
	Order string

	Version string

	Position     []string
	PositionType string
	Accelerate   string
	NationID     int
	LeagueID     int
	ClubID       int
	Height       string
	Weight       string
	WeakFoot     Range
	Skills       Range
	Foot         Foot
	Rating       Range
	Price        Range

	Pace             Range
	Acceleration     Range
	SprintSpeed      Range
	Shooting         Range
	Positioning      Range
	Finishing        Range
	ShotPower        Range
	LongShots        Range
	Volleys          Range
	Penalties        Range
	Dribbling        Range
	Agility          Range
	Balance          Range
	Reactions        Range
	BallControl      Range
	Composure        Range
	Defending        Range
	Interceptions    Range
	HeadingAccuracy  Range
	Marking          Range
	StandingTackle   Range
	SlidingTackle    Range
	Passing          Range
	Vision           Range
	Crossing         Range
	FreeKickAccuracy Range
	ShortPassing     Range
	LongPassing      Range
	Curve            Range
	Physicality      Range
	Jumping          Range
	Stamina          Range
	Strength         Range
	Aggression       Range
}

type Player

type Player struct {
	ID         int `json:"ID"`
	PlayerID   int `json:"playerid"`
	ResourceID int `json:"resource_id"`
	Image      int `json:"playerimage"`

	Name       string `json:"playername"`
	CommonName string `json:"common_name"`

	MainPosition string `json:"position"`
	Positions    string `json:"pos_all"`
	Accelerate   string `json:"accelerate"`

	Rating   int `json:"rating"`
	RareType int `json:"raretype"`

	Pace        int `json:"pac"`
	Shooting    int `json:"sho"`
	Passing     int `json:"pas"`
	Dribbling   int `json:"dri"`
	Defending   int `json:"def"`
	Physicality int `json:"phy"`

	ClubID   int    `json:"club"`
	Club     string `json:"club_name"`
	Nation   string `json:"nation_name"`
	NationID int    `json:"nation"`
	LeagueID int    `json:"league"`
	League   string `json:"league_name"`

	PsPrice      int `json:"ps_LCPrice"`
	PsPRP        int `json:"ps_PRP"`
	PsMinPrice   int `json:"ps_MinPrice"`
	PsMaxPrice   int `json:"ps_MaxPrice"`
	PcPrice      int `json:"pc_LCPrice"`
	PcPRP        int `json:"pc_PRP"`
	PcMinPrice   int `json:"pc_MinPrice"`
	PcMaxPrice   int `json:"pc_MaxPrice"`
	XboxPrice    int `json:"xbox_LCPrice"`
	XboxPRP      int `json:"xbox_PRP"`
	XboxMinPrice int `json:"xbox_MinPrice"`
	XboxMaxPrice int `json:"xbox_MaxPrice"`
}

func (Player) MaxPrice

func (p Player) MaxPrice(platform string) int

func (Player) MinPrice

func (p Player) MinPrice(platform string) int

func (Player) PRP

func (p Player) PRP(platform string) int

func (Player) Price

func (p Player) Price(platform string) int

type Range added in v0.2.0

type Range struct {
	Min int
	Max int
}

Jump to

Keyboard shortcuts

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