serra

package
v0.0.0-...-1229b9d Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const EUR = "€"
View Source
const USD = "$"

Variables

View Source
var (
	Icon        = "\U0001F9D9\U0001F3FC"
	Reset       = "\033[0m"
	Background  = "\033[38;5;59m"
	CurrentLine = "\033[38;5;60m"
	Foreground  = "\033[38;5;231m"
	Comment     = "\033[38;5;103m"
	Cyan        = "\033[38;5;159m"
	Green       = "\033[38;5;120m"
	Orange      = "\033[38;5;222m"
	Pink        = "\033[38;5;212m"
	Purple      = "\033[38;5;183m"
	Red         = "\033[38;5;210m"
	Yellow      = "\033[38;5;229m"
)
View Source
var (
	Version = "unknown"
)

Functions

func Execute

func Execute()

func Gains

func Gains(limit float64, sort int) error

func Logger

func Logger() *log.Logger

func Sets

func Sets(sort string) []primitive.M

func ShowCard

func ShowCard(cardids []string)

func ShowSet

func ShowSet(setname string) error

func Stats

func Stats()

Types

type Card

type Card struct {
	// Added by Serra
	SerraCount       int64              `bson:"serra_count"`
	SerraCountFoil   int64              `bson:"serra_count_foil"`
	SerraCountEtched int64              `bson:"serra_count_etched"`
	SerraPrices      []PriceEntry       `bson:"serra_prices"`
	SerraCreated     primitive.DateTime `bson:"serra_created"`
	SerraUpdated     primitive.DateTime `bson:"serra_updated"`

	Artist          string   `json:"artist"`
	ArtistIds       []string `json:"artist_ids"`
	Booster         bool     `json:"booster"`
	BorderColor     string   `json:"border_color"`
	CardBackID      string   `json:"card_back_id"`
	CardmarketID    float64  `json:"cardmarket_id"`
	Cmc             float64  `json:"cmc"`
	CollectorNumber string   `json:"collector_number"`
	ColorIdentity   []string `json:"color_identity"`
	Colors          []string `json:"colors"`
	Digital         bool     `json:"digital"`
	EdhrecRank      int64    `json:"edhrec_rank"`
	Finishes        []string `json:"finishes"`
	Foil            bool     `json:"foil"`
	Frame           string   `json:"frame"`
	FullArt         bool     `json:"full_art"`
	Games           []string `json:"games"`
	HighresImage    bool     `json:"highres_image"`
	ID              string   `json:"id" bson:"_id"`
	IllustrationID  string   `json:"illustration_id"`
	ImageStatus     string   `json:"image_status"`
	ImageUris       struct {
		ArtCrop    string `json:"art_crop"`
		BorderCrop string `json:"border_crop"`
		Large      string `json:"large"`
		Normal     string `json:"normal"`
		Png        string `json:"png"`
		Small      string `json:"small"`
	} `json:"image_uris"`
	Keywords   []interface{} `json:"keywords"`
	Lang       string        `json:"lang"`
	Layout     string        `json:"layout"`
	Legalities struct {
		Alchemy         string `json:"alchemy"`
		Brawl           string `json:"brawl"`
		Commander       string `json:"commander"`
		Duel            string `json:"duel"`
		Future          string `json:"future"`
		Gladiator       string `json:"gladiator"`
		Historic        string `json:"historic"`
		Historicbrawl   string `json:"historicbrawl"`
		Legacy          string `json:"legacy"`
		Modern          string `json:"modern"`
		Oldschool       string `json:"oldschool"`
		Pauper          string `json:"pauper"`
		Paupercommander string `json:"paupercommander"`
		Penny           string `json:"penny"`
		Pioneer         string `json:"pioneer"`
		Premodern       string `json:"premodern"`
		Standard        string `json:"standard"`
		Vintage         string `json:"vintage"`
	} `json:"legalities"`
	ManaCost        string        `json:"mana_cost"`
	MultiverseIds   []interface{} `json:"multiverse_ids"`
	Name            string        `json:"name"`
	Nonfoil         bool          `json:"nonfoil"`
	Object          string        `json:"object"`
	OracleID        string        `json:"oracle_id"`
	OracleText      string        `json:"oracle_text"`
	Oversized       bool          `json:"oversized"`
	Prices          PriceEntry    `json:"prices"`
	PrintedName     string        `json:"printed_name"`
	PrintedText     string        `json:"printed_text"`
	PrintedTypeLine string        `json:"printed_type_line"`
	PrintsSearchURI string        `json:"prints_search_uri"`
	Promo           bool          `json:"promo"`
	PurchaseUris    struct {
		Cardhoarder string `json:"cardhoarder"`
		Cardmarket  string `json:"cardmarket"`
		Tcgplayer   string `json:"tcgplayer"`
	} `json:"purchase_uris"`
	Rarity      string `json:"rarity"`
	RelatedUris struct {
		Edhrec                    string `json:"edhrec"`
		Mtgtop8                   string `json:"mtgtop8"`
		TcgplayerInfiniteArticles string `json:"tcgplayer_infinite_articles"`
		TcgplayerInfiniteDecks    string `json:"tcgplayer_infinite_decks"`
	} `json:"related_uris"`
	ReleasedAt     string  `json:"released_at"`
	Reprint        bool    `json:"reprint"`
	Reserved       bool    `json:"reserved"`
	RulingsURI     string  `json:"rulings_uri"`
	ScryfallSetURI string  `json:"scryfall_set_uri"`
	ScryfallURI    string  `json:"scryfall_uri"`
	Set            string  `json:"set"`
	SetID          string  `json:"set_id"`
	SetName        string  `json:"set_name"`
	SetSearchURI   string  `json:"set_search_uri"`
	SetType        string  `json:"set_type"`
	SetURI         string  `json:"set_uri"`
	StorySpotlight bool    `json:"story_spotlight"`
	Textless       bool    `json:"textless"`
	TCGPlayerID    float64 `json:"tcgplayer_id"`
	TypeLine       string  `json:"type_line"`
	URI            string  `json:"uri"`
	Variation      bool    `json:"variation"`
}

func Cards

func Cards(rarity, set, sortby, name, oracle, cardType string, reserved, foil bool, skip, limit int64) []Card

type PriceEntry

type PriceEntry struct {
	Date      primitive.DateTime `bson:"date"`
	Eur       float64            `json:"eur,string" bson:"eur,float64"`
	EurFoil   float64            `json:"eur_foil,string" bson:"eur_foil,float64"`
	Tix       float64            `json:"tix,string" bson:"tix,float64"`
	Usd       float64            `json:"usd,string" bson:"usd,float64"`
	UsdEtched float64            `json:"usd_etched,string" bson:"usd_etched,float64"`
	UsdFoil   float64            `json:"usd_foil,string" bson:"usd_foil,float64"`
}

type Query

type Query struct {
	Name  string `form:"name"`
	Set   string `form:"set"`
	Sort  string `form:"sort"`
	Limit int64  `form:"limit"`
	Page  int64  `form:"page"`
}

type Rarities

type Rarities struct {
	Rares, Uncommons, Commons, Mythics float64
}

type Set

type Set struct {
	SerraPrices  []PriceEntry       `bson:"serra_prices"`
	SerraCreated primitive.DateTime `bson:"serra_created"`
	SerraUpdated primitive.DateTime `bson:"serra_updated"`
	CardCount    int64              `json:"card_count" bson:"cardcount"`
	Code         string             `json:"code"`
	Digital      bool               `json:"digital"`
	FoilOnly     bool               `json:"foil_only"`
	IconSvgURI   string             `json:"icon_svg_uri"`
	ID           string             `json:"id" bson:"_id"`
	Name         string             `json:"name"`
	NonfoilOnly  bool               `json:"nonfoil_only"`
	Object       string             `json:"object"`
	ReleasedAt   string             `json:"released_at"`
	ScryfallURI  string             `json:"scryfall_uri"`
	SearchURI    string             `json:"search_uri"`
	SetType      string             `json:"set_type"`
	TcgplayerID  int64              `json:"tcgplayer_id"`
	URI          string             `json:"uri"`
}

type SetList

type SetList struct {
	Data []Set `json:"data"`
}

type Total

type Total struct {
	ID    string       `json:"id" bson:"_id"`
	Value []PriceEntry `bson:"value"`
}

Jump to

Keyboard shortcuts

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