starcitygames

package
v0.0.0-...-462b367 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SCGProductURL

func SCGProductURL(URLDetail, variantSKU []string, affiliate string) string

Types

type SCGCard

type SCGCard struct {
	Name            string           `json:"name"`
	ID              int              `json:"id"`
	Subtitle        string           `json:"subtitle"`
	ProductType     string           `json:"product_type"`
	Finish          string           `json:"finish"`
	Language        string           `json:"language"`
	Rarity          string           `json:"rarity"`
	IsBuying        int              `json:"is_buying"`
	Hotlist         int              `json:"hotlist"`
	BorderColor     string           `json:"border_color"`
	CollectorNumber string           `json:"collector_number"`
	SetID           int              `json:"set_id"`
	SetName         string           `json:"set_name"`
	SetReleaseDate  int              `json:"set_release_date"`
	SetSymbol       string           `json:"set_symbol"`
	Variants        []SCGCardVariant `json:"variants"`
}

type SCGCardVariant

type SCGCardVariant struct {
	ID           int     `json:"id"`
	Name         string  `json:"name"`
	Subtitle     string  `json:"subtitle"`
	Sku          string  `json:"sku"`
	IsBuying     int     `json:"is_buying"`
	Hotlist      float64 `json:"hotlist"`
	VariantName  string  `json:"variant_name"`
	VariantValue string  `json:"variant_value"`
	BuyPrice     float64 `json:"buy_price"`
	TradePrice   float64 `json:"trade_price"`
}

type SCGClient

type SCGClient struct {
	SealedMode bool
	// contains filtered or unexported fields
}

func NewSCGClient

func NewSCGClient(guid, bearer string) *SCGClient

func (*SCGClient) GetPage

func (scg *SCGClient) GetPage(page int) ([]scgRetailResult, error)

func (*SCGClient) NumberOfPages

func (scg *SCGClient) NumberOfPages() (int, error)

func (*SCGClient) SearchAll

func (scg *SCGClient) SearchAll(offset, limit int) (*SCGSearchResponse, error)

type SCGSearchRequest

type SCGSearchRequest struct {
	Q                string   `json:"q"`
	Filter           string   `json:"filter"`
	MatchingStrategy string   `json:"matchingStrategy"`
	Limit            int      `json:"limit"`
	Offset           int      `json:"offset"`
	Sort             []string `json:"sort"`
}

type SCGSearchResponse

type SCGSearchResponse struct {
	Message            string    `json:"message,omitempty"`
	Code               string    `json:"code,omitempty"`
	Type               string    `json:"type,omitempty"`
	Link               string    `json:"link,omitempty"`
	Hits               []SCGCard `json:"hits"`
	Query              string    `json:"query"`
	ProcessingTimeMs   int       `json:"processingTimeMs"`
	Limit              int       `json:"limit"`
	Offset             int       `json:"offset"`
	EstimatedTotalHits int       `json:"estimatedTotalHits"`
}

type Starcitygames

type Starcitygames struct {
	LogCallback mtgban.LogCallbackFunc

	MaxConcurrency int

	Affiliate string
	// contains filtered or unexported fields
}

func NewScraper

func NewScraper(guid, bearer string) *Starcitygames

func (*Starcitygames) Buylist

func (scg *Starcitygames) Buylist() (mtgban.BuylistRecord, error)

func (*Starcitygames) Info

func (scg *Starcitygames) Info() (info mtgban.ScraperInfo)

func (*Starcitygames) Inventory

func (scg *Starcitygames) Inventory() (mtgban.InventoryRecord, error)

type StarcitygamesSealed

type StarcitygamesSealed struct {
	LogCallback mtgban.LogCallbackFunc

	MaxConcurrency int

	Affiliate string
	// contains filtered or unexported fields
}

func NewScraperSealed

func NewScraperSealed(guid, bearer string) *StarcitygamesSealed

func (*StarcitygamesSealed) Buylist

func (scg *StarcitygamesSealed) Buylist() (mtgban.BuylistRecord, error)

func (*StarcitygamesSealed) Info

func (scg *StarcitygamesSealed) Info() (info mtgban.ScraperInfo)

func (*StarcitygamesSealed) Inventory

func (scg *StarcitygamesSealed) Inventory() (mtgban.InventoryRecord, error)

Jump to

Keyboard shortcuts

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