From a941095a73a91016f3f47b9e4342438d9899a2da Mon Sep 17 00:00:00 2001 From: Artyom Belousov Date: Tue, 22 Sep 2020 11:40:54 +0300 Subject: [PATCH] Added collectors number to edition --- cardsinfo/prices.go | 6 +----- tests/prices_test.go | 2 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/cardsinfo/prices.go b/cardsinfo/prices.go index d3bd536..a879088 100644 --- a/cardsinfo/prices.go +++ b/cardsinfo/prices.go @@ -19,11 +19,7 @@ func GetPrices(name string) ([]CardPrice, error) { resp, err := client.SearchCards(ctx, name, opts) var prices []CardPrice for _, card := range resp.Cards { - fullArtString := "" - if card.FullArt { - fullArtString = " (Fullart)" - } - edition := card.SetName + fullArtString + edition := card.SetName + " #" + card.CollectorNumber if card.Prices.USD == "" && card.Prices.USDFoil == "" { continue } diff --git a/tests/prices_test.go b/tests/prices_test.go index f06d1ea..23d4a10 100644 --- a/tests/prices_test.go +++ b/tests/prices_test.go @@ -1,6 +1,7 @@ package tests import ( + "fmt" "github.com/flygrounder/go-mtg-vk/cardsinfo" "github.com/stretchr/testify/assert" "testing" @@ -8,6 +9,7 @@ import ( func TestParser(t *testing.T) { prices, err := cardsinfo.GetPrices("Scavenging Ooze") + fmt.Println(prices) assert.Nil(t, err) assert.NotEmpty(t, prices) }