Documentation
¶
Overview ¶
Includes inventory types as used in the trade package
Index ¶
- type Action
- type AppInfo
- type Context
- type Contexts
- type Currencies
- type Currency
- type Description
- type DescriptionLine
- type DescriptionLines
- type Descriptions
- type GenericInventory
- type Inventory
- type InventoryApp
- type InventoryApps
- type Item
- type Items
- type MoreStart
- type PartialInventory
- 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"`
IconUrlLarge 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(getFirst func() (*PartialInventory, error), getNext func(start uint) (*PartialInventory, error)) (*Inventory, error)
func GetOwnInventory ¶
type InventoryApp ¶
type InventoryApps ¶
type InventoryApps map[string]*InventoryApp
func GetInventoryApps ¶
func (*InventoryApps) Get ¶
func (i *InventoryApps) Get(appId uint32) (*InventoryApp, error)
func (*InventoryApps) ToMap ¶
func (i *InventoryApps) ToMap() map[string]*InventoryApp
type PartialInventory ¶
type PartialInventory struct {
Success bool
Error string
Inventory
More bool
MoreStart MoreStart `json:"more_start"`
}
A partial inventory as sent by the Steam API.
func DoInventoryRequest ¶
func GetPartialOwnInventory ¶
Click to show internal directories.
Click to hide internal directories.