mtgstocks

package
v0.0.0-...-86a7292 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MTGStocks

type MTGStocks struct {
	LogCallback mtgban.LogCallbackFunc

	MaxConcurrency int
	// contains filtered or unexported fields
}

func NewScraper

func NewScraper() *MTGStocks

func (*MTGStocks) Info

func (stks *MTGStocks) Info() (info mtgban.ScraperInfo)

func (*MTGStocks) Inventory

func (stks *MTGStocks) Inventory() (mtgban.InventoryRecord, error)

type MTGStocksInterests

type MTGStocksInterests struct {
	Error     string           `json:"error"`
	Date      string           `json:"date"`
	Interests []StocksInterest `json:"interests"`
}

type STKSClient

type STKSClient struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *STKSClient

func (*STKSClient) AverageInterests

func (s *STKSClient) AverageInterests(foil bool) ([]StocksInterest, error)

func (*STKSClient) MarketInterests

func (s *STKSClient) MarketInterests(foil bool) ([]StocksInterest, error)

type StocksInterest

type StocksInterest struct {
	InterestType string  `json:"interest_type"`
	Foil         bool    `json:"foil"`
	Percentage   float64 `json:"percentage"`
	PastPrice    float64 `json:"past_price"`
	PresentPrice float64 `json:"present_price"`
	Date         int64   `json:"date"`
	Print        struct {
		Id        int         `json:"id"`
		Slug      interface{} `json:"slug"` // string & int
		Name      string      `json:"name"`
		Rarity    string      `json:"rarity"`
		SetId     int         `json:"set_id"`
		SetName   string      `json:"set_name"`
		IconClass string      `json:"icon_class"`
		Reserved  bool        `json:"reserved"`
		SetType   string      `json:"set_type"`
		Legal     struct {
			Frontier  string `json:"frontier"`
			Pauper    string `json:"pauper"`
			Pioneer   string `json:"pioneer"`
			Modern    string `json:"modern"`
			Standard  string `json:"standard"`
			Commander string `json:"commander"`
			Vintage   string `json:"vintage"`
			Legacy    string `json:"legacy"`
		}
		IncludeDefault bool   `json:"include_default"`
		Image          string `json:"image"`
	} `json:"print"`
}

Jump to

Keyboard shortcuts

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