ninetyfive

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	NFDefaultResultsPerPage = 400
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NFCard

type NFCard struct {
	Name string `json:"name"`
	Slug string `json:"slug"`
	// Present in buylist but not retail
	Set    NFSet  `json:"set"`
	Number int    `json:"number"`
	Layout string `json:"layout"`
}

type NFClient

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

func NewNFClient

func NewNFClient(altHost bool) *NFClient

func (*NFClient) BuylistTotals

func (nf *NFClient) BuylistTotals() (int, error)

func (*NFClient) GetBuylist

func (nf *NFClient) GetBuylist(start int) ([]NFProduct, error)

func (*NFClient) GetRetail

func (nf *NFClient) GetRetail(start int) ([]NFProduct, error)

func (*NFClient) RetailTotals

func (nf *NFClient) RetailTotals() (int, error)

type NFProduct

type NFProduct struct {
	Language struct {
		Code string `json:"code"`
		Name string `json:"name"`
	} `json:"language"`
	Foil int `json:"foil"`
	// Used in retail
	Condition string `json:"condition"`
	// Used in buylist
	Conditions []string `json:"conditions"`
	Price      int      `json:"price"`
	Currency   struct {
		Code string `json:"code"`
		Name string `json:"name"`
	} `json:"currency"`
	Quantity int    `json:"qnt"`
	Card     NFCard `json:"card"`
	// Present in retail but not buylist
	Set NFSet `json:"set"`
}

type NFSearchResponse

type NFSearchResponse struct {
	Code    string `json:"code"`
	Message string `json:"message"`
	Results struct {
		Data []NFProduct `json:"data"`
		Meta struct {
			Pagination struct {
				Total       int `json:"total"`
				Count       int `json:"count"`
				PerPage     int `json:"per_page"`
				CurrentPage int `json:"current_page"`
				TotalPages  int `json:"total_pages"`
			} `json:"pagination"`
		} `json:"meta"`
	} `json:"results"`
	Errors   []string `json:"errors"`
	Redirect string   `json:"redirect"`
}

type NFSet

type NFSet struct {
	Code string `json:"code"`
	Name string `json:"name"`
	Slug string `json:"slug"`
}

type Ninetyfive

type Ninetyfive struct {
	LogCallback    mtgban.LogCallbackFunc
	MaxConcurrency int
	// contains filtered or unexported fields
}

func NewScraper

func NewScraper(altHost bool) (*Ninetyfive, error)

func (*Ninetyfive) Buylist

func (nf *Ninetyfive) Buylist() (mtgban.BuylistRecord, error)

func (*Ninetyfive) Info

func (nf *Ninetyfive) Info() (info mtgban.ScraperInfo)

func (*Ninetyfive) Inventory

func (nf *Ninetyfive) Inventory() (mtgban.InventoryRecord, error)

Jump to

Keyboard shortcuts

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