ads

package
v0.0.0-...-7360598 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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 New

func New(url, username, password string) *Accessor

New creates a new struct to manage calls to auction data service

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL