coolstuffinc

package
v0.0.0-...-1e91090 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 18 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadBuylistEditions

func LoadBuylistEditions() (map[string]string, error)

Load the list of editions to id used to build links

func Preprocess

func Preprocess(card CSICard) (*mtgmatcher.Card, error)

func PreprocessBuylist

func PreprocessBuylist(card CSIPriceEntry) (*mtgmatcher.Card, error)

Types

type CSICard

type CSICard struct {
	Id             int     `json:"id,string"`
	URL            string  `json:"url"`
	Name           string  `json:"name"`
	ScryfallId     string  `json:"scryfallid"`
	Variation      string  `json:"variation"`
	Edition        string  `json:"edition"`
	Language       string  `json:"language"`
	IsFoil         bool    `json:"is_foil,string"`
	PriceRetail    float64 `json:"price_retail,string"`
	QuantityRetail int     `json:"qty_retail,string"`
	PriceBuy       float64 `json:"price_buy,string"`
	QuantityBuy    int     `json:"qty_buying,string"`
}

type CSIClient

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

func NewCSIClient

func NewCSIClient(key string) *CSIClient

func (*CSIClient) GetPriceList

func (csi *CSIClient) GetPriceList() ([]CSICard, error)

type CSIPriceEntry

type CSIPriceEntry struct {
	// Pid           string `json:"PID"`
	// Ppqid         string `json:"PPQID"`
	Name string `json:"Name"`
	// Rarity        string `json:"Rarity"`
	ItemSet string `json:"ItemSet"`
	// Image   string `json:"Image"`
	Notes string `json:"Notes"`
	// SName         string `json:"sName"`
	// SAbbreviation string `json:"sAbbreviation"`
	Price string `json:"Price"`
	// TName         string `json:"tName"`
	// Color         string `json:"Color"`
	Number string `json:"Number"`
	// Code   string `json:"Code"`
	// BuyListNotes  string `json:"BuyListNotes"`
	// FullImage     struct {} `json:"FullImage"`
	RarityName  string `json:"RarityName"`
	IsFoil      int    `json:"isFoil"`
	CreditPrice string `json:"CreditPrice"`
}

func GetBuylist

func GetBuylist() ([]CSIPriceEntry, error)

type Coolstuffinc

type Coolstuffinc struct {
	LogCallback mtgban.LogCallbackFunc
	Partner     string

	MaxConcurrency int
	// contains filtered or unexported fields
}

func NewScraper

func NewScraper() *Coolstuffinc

func (*Coolstuffinc) Buylist

func (csi *Coolstuffinc) Buylist() (mtgban.BuylistRecord, error)

func (*Coolstuffinc) Info

func (csi *Coolstuffinc) Info() (info mtgban.ScraperInfo)

func (*Coolstuffinc) Inventory

func (csi *Coolstuffinc) Inventory() (mtgban.InventoryRecord, error)

type CoolstuffincOfficial

type CoolstuffincOfficial struct {
	LogCallback mtgban.LogCallbackFunc
	Partner     string

	// false = load buylist from main api
	// true  = load buylist from buylist endpoint
	IgnoreOfficialBuylist bool
	// contains filtered or unexported fields
}

func NewScraperOfficial

func NewScraperOfficial(key string) *CoolstuffincOfficial

func (*CoolstuffincOfficial) Buylist

func (csi *CoolstuffincOfficial) Buylist() (mtgban.BuylistRecord, error)

func (*CoolstuffincOfficial) Info

func (csi *CoolstuffincOfficial) Info() (info mtgban.ScraperInfo)

func (*CoolstuffincOfficial) Inventory

func (csi *CoolstuffincOfficial) Inventory() (mtgban.InventoryRecord, error)

type CoolstuffincSealed

type CoolstuffincSealed struct {
	LogCallback mtgban.LogCallbackFunc
	Partner     string

	MaxConcurrency int
	// contains filtered or unexported fields
}

func NewScraperSealed

func NewScraperSealed() *CoolstuffincSealed

func (*CoolstuffincSealed) Buylist

func (csi *CoolstuffincSealed) Buylist() (mtgban.BuylistRecord, error)

func (*CoolstuffincSealed) Info

func (csi *CoolstuffincSealed) Info() (info mtgban.ScraperInfo)

func (*CoolstuffincSealed) Inventory

func (csi *CoolstuffincSealed) Inventory() (mtgban.InventoryRecord, error)

Jump to

Keyboard shortcuts

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