Added full art indicator

This commit is contained in:
Artyom Belousov 2020-09-22 11:33:39 +03:00
parent 06d43a67d5
commit 194aee8e69
2 changed files with 6 additions and 2 deletions

View file

@ -19,8 +19,11 @@ func GetPrices(name string) ([]CardPrice, error) {
resp, err := client.SearchCards(ctx, name, opts)
var prices []CardPrice
for _, card := range resp.Cards {
foilString := ""
edition := card.SetName + foilString
fullArtString := ""
if card.FullArt {
fullArtString = " (Fullart)"
}
edition := card.SetName + fullArtString
if card.Prices.USD == "" && card.Prices.USDFoil == "" {
continue
}

View file

@ -5,6 +5,7 @@ import (
)
type CardPrice struct {
FullArt bool
Name string
Price string
PriceFoil string