Changed API to ScryFall
This commit is contained in:
parent
002c175af1
commit
4ca07883a9
2 changed files with 38 additions and 42 deletions
|
|
@ -1,8 +1,24 @@
|
|||
package cardsinfo
|
||||
|
||||
import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
type CardPrice struct {
|
||||
Name string
|
||||
Price float64
|
||||
Link string
|
||||
Edition string
|
||||
}
|
||||
|
||||
type Card struct {
|
||||
Name string `json:"name"`
|
||||
Layout string `json:"layout"`
|
||||
}
|
||||
|
||||
func (c *Card) getName() string {
|
||||
if c.Layout == "transform" {
|
||||
return strings.Replace(c.Name, "//", "|", 1)
|
||||
}
|
||||
return c.Name
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue