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) resp, err := client.SearchCards(ctx, name, opts)
var prices []CardPrice var prices []CardPrice
for _, card := range resp.Cards { for _, card := range resp.Cards {
foilString := "" fullArtString := ""
edition := card.SetName + foilString if card.FullArt {
fullArtString = " (Fullart)"
}
edition := card.SetName + fullArtString
if card.Prices.USD == "" && card.Prices.USDFoil == "" { if card.Prices.USD == "" && card.Prices.USDFoil == "" {
continue continue
} }

View file

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