Documentation
¶
Index ¶
- type Activity
- type ChangeTrend
- type Client
- func (c *Client) Hiscores(ctx context.Context, username string, mode GameMode, format ResponseFormat) (*PlayerStats, error)
- func (c *Client) Item(ctx context.Context, itemID int) (*Item, error)
- func (c *Client) ItemGraph(ctx context.Context, itemID int) (*GraphData, error)
- func (c *Client) Items(ctx context.Context, alpha string, page int) (*Items, error)
- type GameMode
- type GraphData
- type Item
- type Items
- type PercentChange
- type PlayerStats
- type Price
- type PriceTrend
- type ResponseFormat
- type Skill
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeTrend ¶
type ChangeTrend struct { Change PercentChange `json:"change"` Trend string `json:"trend"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Hiscores ¶
func (c *Client) Hiscores(ctx context.Context, username string, mode GameMode, format ResponseFormat) (*PlayerStats, error)
type GameMode ¶
type GameMode string
const ( ModeRegular GameMode = "" ModeIronman GameMode = "_ironman" ModeHardcoreIronman GameMode = "_hardcore_ironman" ModeUltimateIronman GameMode = "_ultimate" ModeDeadman GameMode = "_deadman" ModeSeasonal GameMode = "_seasonal" ModeTournament GameMode = "_tournament" ModeFreshStart GameMode = "_fresh_start" )
type Item ¶
type Item struct { ID int `json:"id"` Icon string `json:"icon"` IconLarge string `json:"icon_large"` Type string `json:"type"` TypeIcon string `json:"typeIcon"` Name string `json:"name"` Description string `json:"description"` Members string `json:"members"` Current PriceTrend `json:"current"` Today PriceTrend `json:"today"` Day30 ChangeTrend `json:"day30"` Day90 ChangeTrend `json:"day90"` Day180 ChangeTrend `json:"day180"` }
type Items ¶
type Items struct { Total int `json:"total"` Items []struct { ID int `json:"id"` Icon string `json:"icon"` IconLarge string `json:"icon_large"` Type string `json:"type"` TypeIcon string `json:"typeIcon"` Name string `json:"name"` Description string `json:"description"` Members string `json:"members"` Current PriceTrend `json:"current"` Today PriceTrend `json:"today"` } `json:"items"` }
type PercentChange ¶
type PercentChange float64
func (PercentChange) String ¶
func (pc PercentChange) String() string
func (*PercentChange) UnmarshalJSON ¶
func (pc *PercentChange) UnmarshalJSON(data []byte) error
type PlayerStats ¶
type PriceTrend ¶
type ResponseFormat ¶
type ResponseFormat string
const ( FormatCSV ResponseFormat = "csv" FormatJSON ResponseFormat = "json" )
Click to show internal directories.
Click to hide internal directories.