Versions in this module Expand all Collapse all v0 v0.1.1 Jul 23, 2026 v0.1.0 Jul 23, 2026 Changes in this version + const DefaultBaseURL + const DefaultTimezone + var ErrEmptyCookieFile = errors.New("cookie file is empty") + var ErrMissingCustomerCookie = errors.New(...) + var ErrRateLimited = errors.New("home depot API rate-limited the request") + func DefaultCookiePath() (string, error) + func ExtractCustomerCookie(cookies []Cookie) (string, error) + func LoadFromFile(path string) (Credentials, []Cookie, error) + type APIError struct + Body string + StatusCode int + func (e *APIError) Error() string + type AuthError struct + Body string + StatusCode int + func (e *AuthError) Error() string + type Client struct + func NewClient(cfg Config) (*Client, error) + func NewClientWithCredentials(creds Credentials, cookies []Cookie, cfg Config) *Client + func (c *Client) GetOrder(ctx context.Context, summary OrderSummary) (OrderDetail, error) + func (c *Client) HealthCheck(ctx context.Context) error + func (c *Client) ListOrders(ctx context.Context, start, end time.Time) ([]OrderSummary, error) + func (c *Client) UserID() string + type Config struct + BaseURL string + CookieFile string + HTTPClient *http.Client + Logger *slog.Logger + PageSize int + Timezone string + type Cookie struct + Domain string + Name string + Path string + Value string + func LoadCookies(path string) ([]Cookie, error) + type Credentials struct + AuthToken string + CustomerAccountID string + UserID string + func DecodeCustomerCookie(value string) (Credentials, error) + type FulfillmentGroup struct + LineItems []LineItem + type LineItem struct + BrandName string + CancelledQuantity float64 + CurrentQuantity float64 + Description string + ImageURL string + IsGiftCard bool + LineID string + ModelNumber string + OriginalOrderedQty float64 + SKUNumber string + ShippingCharge float64 + StatusDescription string + THDSKU string + TotalPrice float64 + UPCCode string + UnitPrice float64 + func (i LineItem) PurchasedQuantity() float64 + type OrderDetail struct + CustomerAccountID string + DeliveryCharge float64 + FulfillmentGroups []FulfillmentGroup + GrandTotalAmount float64 + OrderNumber string + OrderOrigin string + SalesDate string + ShippingCharge float64 + StatusDescription string + StoreName string + StoreNumber string + SubTotalAmount float64 + TaxTotalAmount float64 + UserID string + func (o OrderDetail) AllLineItems() []LineItem + type OrderSummary struct + OrderNumbers []string + OrderOrigin string + OrderStatus string + RegisterNumber string + SalesDate string + StoreName string + StoreNumber string + TotalAmount float64 + TransactionID string