Versions in this module Expand all Collapse all v0 v0.2.0 Jun 25, 2026 v0.1.1 Jun 25, 2026 v0.1.0 Jun 25, 2026 Changes in this version + const DefaultBaseURL + const DefaultStoresURL + const DefaultUserAgent + const SchemaVersion + type APIError struct + Err error + Kind ErrKind + Msg string + RetryAfter time.Duration + Status int + func (e *APIError) Error() string + func (e *APIError) RetryAfterSeconds() int + func (e *APIError) Unwrap() error + type Client interface + LimitedAvailability func(ctx context.Context, productCode string) (LotteryResult, error) + MyStore func(ctx context.Context, storeNumber int, productCode string) (StoreStock, error) + SearchProducts func(ctx context.Context, query string, limit int) ([]Product, error) + StoreNear func(ctx context.Context, lat, lng float64, limit int) ([]Store, error) + StoreNearby func(ctx context.Context, storeNumber int, productCode string) (InventoryResult, error) + Stores func(ctx context.Context) ([]Store, error) + Warehouse func(ctx context.Context, productCode string) (WarehouseResult, error) + func NewClient(opts ...Option) Client + type Envelope struct + Data any + NextCursor string + SchemaVersion int + Scope string + type ErrKind string + const KindNotFound + const KindRateLimited + const KindRetryable + const KindSchemaDrift + type InventoryResult struct + NearbyStores []StoreStock + ProductCode string + Store StoreStock + type LotteryEvent struct + Title string + URL string + type LotteryResult struct + Active bool + Allocated bool + EventLinks []LotteryEvent + ProductCode string + type Option func(*httpClient) + func WithBaseURL(u string) Option + func WithHTTPClient(h *http.Client) Option + func WithMinInterval(d time.Duration) Option + func WithStatePath(p string) Option + func WithStoresURL(u string) Option + func WithUserAgent(ua string) Option + func WithWait(wait bool, maxWait time.Duration) Option + type Product struct + Allocated bool + Category string + DiscountPrice *float64 + Name string + New bool + OnlineOrderable bool + ProductCode string + Proof *float64 + RetailPrice *float64 + Size string + Type string + UPC []string + URL string + type Store struct + Address string + Address1 string + Address2 string + City string + Distance *float64 + Hours string + Lat float64 + Lng float64 + Name string + Phone string + ShoppingCenter string + State string + StoreNumber int + URL string + Zip string + type StoreStock struct + Quantity int + type WarehouseResult struct + ProductCode string + WarehouseInventory int