Fixed unique settings

This commit is contained in:
Artyom Belousov 2020-09-22 10:33:25 +03:00
parent 3919b21318
commit a9e2a4f09e
2 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,7 @@
package cardsinfo package cardsinfo
import ( import (
"fmt"
"context" "context"
scryfall "github.com/BlueMonday/go-scryfall" scryfall "github.com/BlueMonday/go-scryfall"
@ -14,7 +15,7 @@ func GetPrices(name string) ([]CardPrice, error) {
} }
ctx := context.Background() ctx := context.Background()
opts := scryfall.SearchCardsOptions{ opts := scryfall.SearchCardsOptions{
Unique: scryfall.UniqueModePrints,
} }
resp, err := client.SearchCards(ctx, name, opts) resp, err := client.SearchCards(ctx, name, opts)
var prices []CardPrice var prices []CardPrice

View file

@ -8,8 +8,7 @@ import (
) )
func TestParser(t *testing.T) { func TestParser(t *testing.T) {
prices, err := cardsinfo.GetPrices("shock") prices, err := cardsinfo.GetPrices("Scavenging Ooze")
assert.Nil(t, err) assert.Nil(t, err)
assert.NotEmpty(t, prices) assert.NotEmpty(t, prices)
fmt.Println(prices)
} }