Documentation ¶
Index ¶
- Variables
- func ItemRespToPriceResult(item *model.Item, ir *ItemResponse) *model.PriceResult
- type Accessor
- func (a *Accessor) GetMultiItem(ctx *model.AucBotContext, region string, realm string, ids, slLegoRanks []int) (map[int]ItemResponse, *time.Time, error)
- func (a *Accessor) GetSingleItem(ctx *model.AucBotContext, region, realm string, id, slLegoRank int) (*ItemResponse, error)
- func (a *Accessor) TriggerScan(ctx *model.AucBotContext, region string) error
- type ItemResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRealmNotScanned = errors.New("realm is active but not scanned") ErrRealmNotActive = errors.New("realm is not active") ErrItemNoAuctions = errors.New("realm is active but item has no auctions") ErrNoSLLegoRank = errors.New("must supply slLegendaryRank for Shadowlands legendary") )
Functions ¶
func ItemRespToPriceResult ¶
func ItemRespToPriceResult(item *model.Item, ir *ItemResponse) *model.PriceResult
ItemRespToPriceResult returns a model.PriceResult struct of the given item and itemResponse. it does not set BonusRank.RequestedBonusRank. set that after this call
Types ¶
type Accessor ¶
type Accessor struct {
// contains filtered or unexported fields
}
Accessor is the auction data service accessor
func (*Accessor) GetMultiItem ¶
func (a *Accessor) GetMultiItem(ctx *model.AucBotContext, region string, realm string, ids, slLegoRanks []int) (map[int]ItemResponse, *time.Time, error)
GetMultiItem returns a map of itemID -> itemResponse
func (*Accessor) GetSingleItem ¶
func (a *Accessor) GetSingleItem(ctx *model.AucBotContext, region, realm string, id, slLegoRank int) (*ItemResponse, error)
func (*Accessor) TriggerScan ¶
func (a *Accessor) TriggerScan(ctx *model.AucBotContext, region string) error
TriggerScan triggers a rescan of the given region
type ItemResponse ¶
type ItemResponse struct { ID int `json:"id"` AuctionScanID int `json:"auctionScanId"` ItemID int `json:"itemId"` Context int `json:"context"` BonusList []int `json:"bonusList,omitempty"` AveragePrice uint64 `json:"averagePrice"` LowestPrice uint64 `json:"lowestPrice"` Pct12 uint64 `json:"pct12"` StdDev uint64 `json:"stdDev"` MarketSupply int `json:"marketSupply"` ActiveAuctions int `json:"activeAuctions"` SLLegendaryRank int `json:"slLegendaryRank,omitempty"` TS time.Time `json:"timestamp"` }
ItemResponse is data on a single item from the auction data service
Click to show internal directories.
Click to hide internal directories.