From 194aee8e69935f446fb1bb95ed5d618d2d0ea9fd Mon Sep 17 00:00:00 2001 From: Artyom Belousov Date: Tue, 22 Sep 2020 11:33:39 +0300 Subject: [PATCH] Added full art indicator --- cardsinfo/prices.go | 7 +++++-- cardsinfo/structs.go | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cardsinfo/prices.go b/cardsinfo/prices.go index c555bfa..d3bd536 100644 --- a/cardsinfo/prices.go +++ b/cardsinfo/prices.go @@ -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 } diff --git a/cardsinfo/structs.go b/cardsinfo/structs.go index 628a203..1f41d91 100644 --- a/cardsinfo/structs.go +++ b/cardsinfo/structs.go @@ -5,6 +5,7 @@ import ( ) type CardPrice struct { + FullArt bool Name string Price string PriceFoil string