From a9e2a4f09e658c85834ed4651ebe15e40344f8f8 Mon Sep 17 00:00:00 2001 From: Artyom Belousov Date: Tue, 22 Sep 2020 10:33:25 +0300 Subject: [PATCH] Fixed unique settings --- cardsinfo/prices.go | 3 ++- tests/prices_test.go | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cardsinfo/prices.go b/cardsinfo/prices.go index a03d1ea..8b42e4d 100644 --- a/cardsinfo/prices.go +++ b/cardsinfo/prices.go @@ -1,6 +1,7 @@ package cardsinfo import ( + "fmt" "context" scryfall "github.com/BlueMonday/go-scryfall" @@ -14,7 +15,7 @@ func GetPrices(name string) ([]CardPrice, error) { } ctx := context.Background() opts := scryfall.SearchCardsOptions{ - + Unique: scryfall.UniqueModePrints, } resp, err := client.SearchCards(ctx, name, opts) var prices []CardPrice diff --git a/tests/prices_test.go b/tests/prices_test.go index 67d15b1..d13a51c 100644 --- a/tests/prices_test.go +++ b/tests/prices_test.go @@ -8,8 +8,7 @@ import ( ) func TestParser(t *testing.T) { - prices, err := cardsinfo.GetPrices("shock") + prices, err := cardsinfo.GetPrices("Scavenging Ooze") assert.Nil(t, err) assert.NotEmpty(t, prices) - fmt.Println(prices) }