Versions in this module Expand all Collapse all v0 v0.1.1 Dec 25, 2025 v0.1.0 Dec 25, 2025 Changes in this version + type APIError struct + Details string + StatusCode int + Type string + Warnings []string + func (e *APIError) Error() string + type Card struct + Booster bool + BorderColor string + CMC float64 + CardFaces []CardFace + CardmarketID int + CollectorNumber string + Digital bool + EDHRecRank int + Frame string + FrameEffects []string + FullArt bool + Games []string + ID string + ImageURIs map[string]string + Keywords []string + Lang string + Layout string + Loyalty string + ManaCost string + Name string + OracleID string + OracleText string + Oversized bool + PennyRank int + Power string + Prices CardPrices + PrintsSearchURI string + Promo bool + Rarity string + ReleasedAt string + Reprint bool + Reserved bool + RulingsURI string + ScryfallURI string + SecurityStamp string + Set string + StorySpotlight bool + TcgplayerID int + Textless bool + Toughness string + TypeLine string + Uri string + Variation bool + Watermark string + type CardBulkData struct + CompressedSize int64 + ContentEncoding string + ContentType string + Description string + DownloadURI string + ID string + Name string + PermalinkURI string + Type string + URI string + UpdatedAt string + type CardFace struct + Colors []string + FlavorText string + ImageURIs map[string]string + Loyalty string + ManaCost string + Name string + OracleText string + Power string + Toughness string + TypeLine string + type CardPrices struct + EUR string + EURFoil string + TIX string + USD string + USDEtched string + USDFoil string + type CardSet struct + CardCount int + Code string + Digital bool + FoilOnly bool + ID string + IconSVGURI string + Name string + NonfoilOnly bool + ReleasedAt string + SetType string + type Client struct + func NewClient(opts ...Option) *Client + func (c *Client) DownloadBulkData(ctx context.Context, downloadURI string) ([]Card, error) + func (c *Client) DownloadBulkDataStream(ctx context.Context, downloadURI string, cardCallback func(Card) error, ...) error + func (c *Client) DownloadToFile(ctx context.Context, downloadURI string, filePath string, ...) error + func (c *Client) GetBulkDataByType(ctx context.Context, bulkType string) (*CardBulkData, error) + func (c *Client) GetCardByID(ctx context.Context, id string) (*Card, error) + func (c *Client) ListBulkData(ctx context.Context) ([]CardBulkData, error) + func (c *Client) ListSets(ctx context.Context) ([]CardSet, error) + func (c *Client) ProcessBulkDataStream(reader io.Reader, cardCallback func(Card) error) error + type ClientAPI interface + DownloadBulkData func(ctx context.Context, downloadURI string) ([]Card, error) + DownloadBulkDataStream func(ctx context.Context, downloadURI string, cardCallback func(Card) error, ...) error + GetBulkDataByType func(ctx context.Context, bulkType string) (*CardBulkData, error) + GetCardByID func(ctx context.Context, id string) (*Card, error) + ListBulkData func(ctx context.Context) ([]CardBulkData, error) + ListSets func(ctx context.Context) ([]CardSet, error) + type Option func(*Client) + func WithBaseURL(rawURL string) Option + func WithHTTPClient(httpClient *http.Client) Option + func WithLimiter(limiter *rate.Limiter) Option + func WithLogger(logger *log.Logger) Option + func WithUserAgent(ua string) Option + type ProgressFunc func(current, total int64)