Versions in this module Expand all Collapse all v1 v1.0.0 Jul 18, 2026 Changes in this version + type CatalogError struct + Code ErrorCode + Message string + RetryAfterSec float64 + Status int + func (e *CatalogError) Error() string + type Chain struct + ID string + Name string + Slug string + type Client struct + func NewClient(baseURL, apiKey string, opts ...Option) *Client + func (c *Client) GetOffer(ctx context.Context, id string) (*Offer, error) + func (c *Client) GetProduct(ctx context.Context, id string) (*Product, error) + func (c *Client) GetStore(ctx context.Context, id string) (*Store, error) + func (c *Client) IterOffers(ctx context.Context, p OfferListParams) iter.Seq2[Offer, error] + func (c *Client) IterProductOffers(ctx context.Context, productID string, p PageParams) iter.Seq2[Offer, error] + func (c *Client) IterProducts(ctx context.Context, p ProductListParams) iter.Seq2[Product, error] + func (c *Client) IterStores(ctx context.Context, p StoreListParams) iter.Seq2[Store, error] + func (c *Client) ListChains(ctx context.Context) ([]Chain, error) + func (c *Client) ListOffers(ctx context.Context, p OfferListParams) (*Page[Offer], error) + func (c *Client) ListProductOffers(ctx context.Context, productID string, p PageParams) (*Page[Offer], error) + func (c *Client) ListProducts(ctx context.Context, p ProductListParams) (*Page[Product], error) + func (c *Client) ListStores(ctx context.Context, p StoreListParams) (*Page[Store], error) + func (c *Client) NearestStores(ctx context.Context, p NearestParams) (*Page[Store], error) + func (c *Client) PriceHistory(ctx context.Context, p PriceHistoryParams) ([]PriceHistoryPoint, error) + type ErrorCode string + const ErrInvalidParams + const ErrInvalidResponse + const ErrNetworkError + const ErrNotFound + const ErrRateLimited + const ErrServerError + const ErrUnauthorized + type NearestParams struct + ChainSlug string + Lat float64 + Limit int + Lng float64 + RadiusKm float64 + type Offer struct + ChainID *string + Currency *string + ID string + OriginalPrice *string + Price *string + ProductID *string + ValidFrom *string + ValidTo *string + type OfferListParams struct + ChainSlug string + Cursor string + Limit int + ProductID string + ProductIDs []string + type Option func(*Client) + func WithBaseDelay(d time.Duration) Option + func WithHTTPClient(h *http.Client) Option + func WithMaxAttempts(n int) Option + func WithTimeout(d time.Duration) Option + type Page struct + Data []T + Pagination *Pagination + type PageParams struct + Cursor string + Limit int + type Pagination struct + Cursor *string + Limit int + type PriceHistoryParams struct + Days int + ProductIDs []string + type PriceHistoryPoint struct + ChainSlug string + Date string + MinPriceCents int + ProductID string + type Product struct + BrandID *string + CanonicalName *string + ID string + ImageURL *string + PrimaryCategoryID *string + type ProductListParams struct + BrandIDs []string + CategoryIDs []string + ChainSlug string + Cursor string + ExcludeIDs []string + IDs []string + Limit int + type Store struct + Address string + ChainName string + ChainSlug string + City string + ID string + Lat float64 + Lng float64 + Name string + OpeningHours map[string]any + PostalCode *string + Timezone string + type StoreListParams struct + ChainSlug string + Limit int