diff --git a/cardsinfo/prices.go b/cardsinfo/prices.go index 398fed9..1f7984c 100644 --- a/cardsinfo/prices.go +++ b/cardsinfo/prices.go @@ -20,13 +20,15 @@ func GetPrices(name string) ([]CardPrice, error) { var prices []CardPrice for _, card := range resp.Cards { foilString := "" + price := card.Prices.USD if card.Foil { foilString = "(Foil)" + price = card.Prices.USDFoil } - edition := card.Set + foilString + edition := card.SetName + foilString cardPrice := CardPrice { Edition: edition, - Price: card.Prices.USD, + Price: price, Name: card.Name, Link: card.PurchaseURIs.TCGPlayer, } diff --git a/tests/prices_test.go b/tests/prices_test.go index d13a51c..f06d1ea 100644 --- a/tests/prices_test.go +++ b/tests/prices_test.go @@ -1,7 +1,6 @@ package tests import ( - "fmt" "github.com/flygrounder/go-mtg-vk/cardsinfo" "github.com/stretchr/testify/assert" "testing"