Documentation
¶
Index ¶
- func CalculateFromSpecifiedInventories(inventories SpecifiedInventory, opts ...models.NetworthOptions) (*models.NetworthResult, error)
- func GetItems(cache bool, cacheTimeSeconds int64, retries int) (map[string]models.HypixelItem, error)
- func GetPrices(cache bool, cacheTimeSeconds int64, retries int) (map[string]float64, error)
- type CalculatorService
- func (cs *CalculatorService) CalculateItem(item *models.NetworthItem)
- func (cs *CalculatorService) CalculatePet(pet *models.NetworthPet)
- func (cs *CalculatorService) NewSkyBlockItemCalculator(item *skycrypttypes.Item, prices map[string]float64, options NetworthOptions) *models.NetworthItem
- func (cs *CalculatorService) NewSkyBlockPetCalculator(pet *skycrypttypes.Pet, prices map[string]float64, options NetworthOptions) *models.NetworthPet
- type NetworthOptions
- type ProfileNetworthCalculator
- type SpecifiedInventory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateFromSpecifiedInventories ¶ added in v1.2.0
func CalculateFromSpecifiedInventories(inventories SpecifiedInventory, opts ...models.NetworthOptions) (*models.NetworthResult, error)
Types ¶
type CalculatorService ¶ added in v1.1.2
type CalculatorService struct {
// contains filtered or unexported fields
}
func NewCalculatorService ¶ added in v1.1.2
func NewCalculatorService() *CalculatorService
func (*CalculatorService) CalculateItem ¶ added in v1.1.2
func (cs *CalculatorService) CalculateItem(item *models.NetworthItem)
func (*CalculatorService) CalculatePet ¶ added in v1.1.2
func (cs *CalculatorService) CalculatePet(pet *models.NetworthPet)
func (*CalculatorService) NewSkyBlockItemCalculator ¶ added in v1.1.2
func (cs *CalculatorService) NewSkyBlockItemCalculator(item *skycrypttypes.Item, prices map[string]float64, options NetworthOptions) *models.NetworthItem
func (*CalculatorService) NewSkyBlockPetCalculator ¶ added in v1.1.2
func (cs *CalculatorService) NewSkyBlockPetCalculator(pet *skycrypttypes.Pet, prices map[string]float64, options NetworthOptions) *models.NetworthPet
type NetworthOptions ¶ added in v1.2.2
type NetworthOptions struct {
Prices map[string]float64 `json:"prices"`
NonCosmetic bool `json:"nonCosmetic"`
CachePrices bool `json:"cachePrices"`
OnlyNetworth bool `json:"onlyNetworth"`
IncludeItemData bool `json:"includeItemData"`
SortItems bool `json:"sortItems"`
StackItems bool `json:"stackItems"`
KeepInvalidItems bool `json:"keepInvalidItems"`
}
func (NetworthOptions) ToInternal ¶ added in v1.2.2
func (opts NetworthOptions) ToInternal() models.NetworthOptions
type ProfileNetworthCalculator ¶
type ProfileNetworthCalculator struct {
ProfileData *skycrypttypes.Member
MuseumData *skycrypttypes.Museum
Bank float64
Purse float64
PersonalBankBalance float64
Items *models.ParsedItems
Prices map[string]float64
}
func NewProfileNetworthCalculator ¶
func NewProfileNetworthCalculator(userProfile *skycrypttypes.Member, museumData *skycrypttypes.Museum, bankBalance float64) (*ProfileNetworthCalculator, error)
func (*ProfileNetworthCalculator) GetNetworth ¶
func (p *ProfileNetworthCalculator) GetNetworth(opts ...NetworthOptions) *models.NetworthResult
func (*ProfileNetworthCalculator) GetNonCosmeticNetworth ¶
func (p *ProfileNetworthCalculator) GetNonCosmeticNetworth(opts ...NetworthOptions) *models.NetworthResult
type SpecifiedInventory ¶ added in v1.2.0
type SpecifiedInventory map[string]skycrypttypes.EncodedItems
Click to show internal directories.
Click to hide internal directories.