Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClassID ¶
type ClassID uint64
ClassID and InstanceID represent the unique identifier for an item type
type Description ¶
type Description struct { AppID mangosteam.AppID `json:",string"` ClassID ClassID `json:",string"` InstanceID InstanceID `json:",string"` IconURL string `json:"icon_url"` IconDragURL string `json:"icon_drag_url"` Name string MarketHashName string `json:"market_hash_name"` MarketName string `json:"market_name"` // Colors in hex, for example `B2B2B2` NameColor string `json:"name_color"` BackgroundColor string `json:"background_color"` Type string Tradable int Marketable int Commodity int Tags Tags }
Description contains the market hash name
type Descriptions ¶
type Descriptions map[string]*Description
Descriptions for the inventory
func (*Descriptions) UnmarshalJSON ¶
func (d *Descriptions) UnmarshalJSON(data []byte) error
UnmarshalJSON for the inventory currencies
type InstanceID ¶
type InstanceID uint64
InstanceID and ClassID represent the unique identifier for an item type
func (InstanceID) String ¶
func (instanceID InstanceID) String() string
String will turn a ClassID into a string
type InvChecker ¶
type InvChecker interface { AreItemsWithinUserInventory(items []*Item) bool AreItemsDataSimilarUserInventory(items []*Item) bool }
InvChecker is the user interface
type Inventory ¶
type Inventory struct { Items Items `json:"rgInventory"` Descriptions Descriptions `json:"rgDescriptions"` }
Inventory represents the inventory of a user
func GetUserWebInventory ¶
func GetUserWebInventory(appID mangosteam.AppID, steamID mangosteam.SteamID) (*Inventory, error)
GetUserWebInventory returns the inventory of the user, if available
func (*Inventory) AreItemsDataSimilarUserInventory ¶
AreItemsDataSimilarUserInventory returns true or false according to the data of the items
func (*Inventory) AreItemsWithinUserInventory ¶
AreItemsWithinUserInventory returns true or false accordign to the presence of items
type Item ¶
type Item struct { ID ItemID `json:",string"` ClassID ClassID `json:",string"` InstanceID InstanceID `json:",string"` Amount uint64 `json:",string"` Pos uint64 }
Item represents an item in the inventory
type Items ¶
Items is a map of items in the inventory
func (*Items) UnmarshalJSON ¶
UnmarshalJSON for the inventory items