Documentation ¶
Overview ¶
Package inventory includes types as used in the trade package.
Index ¶
- type Action
- type App
- type AppInfo
- type Apps
- type Context
- type Contexts
- type Currencies
- type Currency
- type Description
- type DescriptionLine
- type DescriptionLines
- type Descriptions
- type GenericInventory
- type Inventory
- type Item
- type Items
- type MoreStart
- type PartialInventory
- type PartialInventoryFetcher
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Currencies ¶
func (*Currencies) ToMap ¶
func (c *Currencies) ToMap() map[string]*Currency
func (*Currencies) UnmarshalJSON ¶
func (c *Currencies) UnmarshalJSON(data []byte) error
type Description ¶
type Description struct { AppID uint32 `json:",string"` ClassID uint64 `json:",string"` InstanceID uint64 `json:",string"` IconURL string `json:"icon_url"` IconLargeURL string `json:"icon_url_large"` IconDragURL string `json:"icon_drag_url"` Name string MarketName string `json:"market_name"` MarketHashName string `json:"market_hash_name"` // Colors in hex, for example `B2B2B2` NameColor string `json:"name_color"` BackgroundColor string `json:"background_color"` Type string Tradable jsont.UintBool Marketable jsont.UintBool Commodity jsont.UintBool MarketTradableRestriction uint32 `json:"market_tradable_restriction,string"` Descriptions DescriptionLines Actions []*Action // Application-specific data, like "def_index" and "quality" for TF2 AppData map[string]string Tags []*Tag }
type DescriptionLine ¶
type DescriptionLines ¶
type DescriptionLines []*DescriptionLine
func (*DescriptionLines) UnmarshalJSON ¶
func (d *DescriptionLines) UnmarshalJSON(data []byte) error
type Descriptions ¶
type Descriptions map[string]*Description
Descriptions key format is %d_%d, first %d is ClassID, second is InstanceID
func (*Descriptions) Get ¶
func (d *Descriptions) Get(classID uint64, instanceID uint64) (*Description, error)
func (*Descriptions) ToMap ¶
func (d *Descriptions) ToMap() map[string]*Description
func (*Descriptions) UnmarshalJSON ¶
func (d *Descriptions) UnmarshalJSON(data []byte) error
type GenericInventory ¶
func NewGenericInventory ¶
func NewGenericInventory() GenericInventory
type Inventory ¶
type Inventory struct { Items Items `json:"rgInventory"` Currencies Currencies `json:"rgCurrency"` Descriptions Descriptions `json:"rgDescriptions"` AppInfo *AppInfo `json:"rgAppInfo"` }
func GetFullInventory ¶
func GetFullInventory(fetch PartialInventoryFetcher) (*Inventory, error)
func GetOwnInventory ¶
func NewInventory ¶
func NewInventory() *Inventory
type PartialInventory ¶
type PartialInventory struct { Inventory Success bool Error string More bool MoreStart MoreStart `json:"more_start"` }
PartialInventory is a partial inventory as sent by the Steam API.
func GetOwnPartialInventory ¶
func PerformRequest ¶
type PartialInventoryFetcher ¶
type PartialInventoryFetcher func(start uint) (*PartialInventory, error)
Click to show internal directories.
Click to hide internal directories.