magiccorner

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: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MCBuylistEditionResponse

type MCBuylistEditionResponse struct {
	Expansions []MCExpansion `json:"Expansions"`
}

type MCBuylistRequest

type MCBuylistRequest struct {
	Q              string  `json:"q"`
	Game           string  `json:"game"`
	Edition        int     `json:"edition"`
	Rarity         string  `json:"rarity"`
	Color          string  `json:"color"`
	Firstedition   string  `json:"firstedition"`
	Foil           string  `json:"foil"`
	Language       *string `json:"language"`
	Page           int     `json:"page"`
	Sort           int     `json:"sort"`
	IsBuyList      bool    `json:"isBuyList"`
	OnlyHotBuyList bool    `json:"onlyHotBuyList"`
	OnlyAvailable  bool    `json:"onlyAvailable"`
}

type MCBuylistResponse

type MCBuylistResponse struct {
	Result MCBuylistResult `json:"Result"`

	ID              int  `json:"Id"`
	Status          int  `json:"Status"`
	IsCanceled      bool `json:"IsCanceled"`
	IsCompleted     bool `json:"IsCompleted"`
	CreationOptions int  `json:"CreationOptions"`
	IsFaulted       bool `json:"IsFaulted"`
}

type MCBuylistResult

type MCBuylistResult struct {
	Products []MCProduct `json:"Products"`
	Total    int         `json:"Total"`
}

type MCCard

type MCCard struct {
	Id       int    `json:"IdProduct"`
	Name     string `json:"NomeEn"`
	Edition  string `json:"Category"`
	Code     string `json:"Icon"`
	Rarity   string `json:"Rarita"`
	Extra    string `json:"Image"`
	OrigName string `json:"NomeIt"`
	URL      string `json:"Url"`
	Variants []struct {
		Id        int     `json:"IdProduct"`
		Language  string  `json:"Lingua"`
		Foil      string  `json:"Foil"`
		Condition string  `json:"CondizioniShort"`
		Quantity  int     `json:"DispoWeb"`
		Price     float64 `json:"Price"`
	} `json:"Varianti"`
}

type MCClient

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

func NewMCClient

func NewMCClient() *MCClient

func (*MCClient) GetBuylistEditions

func (mc *MCClient) GetBuylistEditions() ([]MCExpansion, error)

func (*MCClient) GetBuylistForEdition

func (mc *MCClient) GetBuylistForEdition(edition, page int) (*MCBuylistResult, error)

func (*MCClient) GetEditionList

func (mc *MCClient) GetEditionList(addPromoEd bool) ([]MCEdition, error)

Retrieve the available edition ids and names

func (*MCClient) GetHotBuylistPage

func (mc *MCClient) GetHotBuylistPage(page int) ([]MCProduct, error)

func (*MCClient) GetInventoryForEdition

func (mc *MCClient) GetInventoryForEdition(edition MCEdition) ([]MCCard, error)

type MCEdition

type MCEdition struct {
	Id   int    `json:"Id"`
	Name string `json:"Espansione"`
	Code string `json:"ImageUrl"`
}

type MCExpansion

type MCExpansion struct {
	Id      int    `json:"Id"`
	Name    string `json:"Espansione"`
	Enabled bool   `json:"Enabled"`
}

type MCProduct

type MCProduct struct {
	ID           string  `json:"Id"`
	Game         string  `json:"Game"`
	ModelEn      string  `json:"ModelEn"`
	Rarity       string  `json:"Rarity"`
	Category     string  `json:"Category"`
	Quantity     int     `json:"Quantity"`
	MinAcquisto  float64 `json:"MinAcquisto"`
	MaxAcquisto  float64 `json:"MaxAcquisto"`
	Language     int     `json:"Language"`
	SerialNumber int     `json:"SerialNumber"`
}

type Magiccorner

type Magiccorner struct {
	VerboseLog  bool
	LogCallback mtgban.LogCallbackFunc

	MaxConcurrency int
	// contains filtered or unexported fields
}

func NewScraper

func NewScraper() (*Magiccorner, error)

func (*Magiccorner) Buylist

func (mc *Magiccorner) Buylist() (mtgban.BuylistRecord, error)

func (*Magiccorner) Info

func (mc *Magiccorner) Info() (info mtgban.ScraperInfo)

func (*Magiccorner) Inventory

func (mc *Magiccorner) Inventory() (mtgban.InventoryRecord, error)

Jump to

Keyboard shortcuts

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