Documentation ¶
Index ¶
- Constants
- func ProcessSKU(cardName, SKU string) (*mtgmatcher.InputCard, error)
- func SCGProductURL(URLDetail, variantSKU []string, affiliate string) string
- type SCGCard
- type SCGCardVariant
- type SCGClient
- type SCGSearchRequest
- type SCGSearchResponse
- type Settings
- type Starcitygames
- type StarcitygamesSealed
Constants ¶
View Source
const ( GameMagic = 1 GameFleshAndBlood = 2 GameLorcana = 3 )
Variables ¶
This section is empty.
Functions ¶
func ProcessSKU ¶
func ProcessSKU(cardName, SKU string) (*mtgmatcher.InputCard, error)
SKU documented as * for singles: SGL-[Brand]-[Set]-[Collector Number]-[Language][Foiling][Condition] * for world champtionship: SGL-[Brand]-WCPH-[Year][Player Initials][Set][Collector Number][Sideboard]-[Language][Foiling][Condition] * for promotional cards: SGL-[Brand]-PRM-[Promo][Set][Collector Number]-[Language][Foiling][Condition]
examples * SGL-MTG-PRM-SECRET_SLD_1095-ENN1 * SGL-MTG-PRM-PP_MKM_187-ENN * SGL-MTG-PWSB-PCA_115-ENN1
func SCGProductURL ¶
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 ¶
type SCGSearchRequest ¶
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 Settings ¶
type Settings struct { CardRarities []struct { ID int `json:"id"` Name string `json:"name"` GameID int `json:"game_id"` Abbr string `json:"abbr"` ExternalRarityID int `json:"external_rarity_id"` SortOrder int `json:"sort_order"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` } `json:"cardRarities"` }
func SearchSettings ¶
type Starcitygames ¶
type Starcitygames struct { LogCallback mtgban.LogCallbackFunc MaxConcurrency int Affiliate string // contains filtered or unexported fields }
func NewScraper ¶
func NewScraper(game int, 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)
Click to show internal directories.
Click to hide internal directories.