client

package
v0.3.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(f fetch.Fetcher, config config.Scryfall) *Client

func (*Client) GetByCardAndLang

func (f *Client) GetByCardAndLang(c *card.Card, lang string) (*ScryfallCard, error)

func (*Client) GetImage

func (f *Client) GetImage(url string, handleResponse func(resp *fetch.Response) error) error

type MatchingFace added in v0.3.2

type MatchingFace struct {
	URL string
	ID  int64
}

type ScryfallCard

type ScryfallCard struct {
	Name string `json:"name"`
	// external-struct
	ImgUris ScyfallImgURIs `json:"image_uris"`
	// external-struct
	Faces []ScryfallCard `json:"card_faces"`
}

func (*ScryfallCard) FindMatchingCardParts

func (sc *ScryfallCard) FindMatchingCardParts(c *card.Card) []*MatchingFace

type ScyfallImgURIs added in v0.3.2

type ScyfallImgURIs struct {
	Normal string `json:"normal"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL