Fixed unique settings
This commit is contained in:
parent
3919b21318
commit
a9e2a4f09e
2 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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)
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue