Documentation ¶
Overview ¶
Package instacart implements the client for the instacart web API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { SessionToken string // contains filtered or unexported fields }
Client is the HTTP client for the Instacart orders API.
type Item ¶
type Item struct { ID string `json:"id"` LegacyID interface{} `json:"legacy_id"` // this is usually an int, but sometimes it's a string ProductID string `json:"product_id"` Name string `json:"name"` Attributes []string `json:"attributes"` PriceAffix interface{} `json:"price_affix"` PriceAffixAria interface{} `json:"price_affix_aria"` SecondaryPriceAffix string `json:"secondary_price_affix"` SecondaryPriceAffixAria string `json:"secondary_price_affix_aria"` Size string `json:"size"` SizeAria string `json:"size_aria"` ImageList []ItemImage `json:"image_list"` Image ItemImage `json:"image"` VariableAttributesMap interface{} `json:"variable_attributes_map"` ClickAction ItemClickAction `json:"click_action"` WineRatingBadge interface{} `json:"wine_rating_badge"` Weekly interface{} `json:"weekly"` WeeklyOrderID interface{} `json:"weekly_order_id"` QtyAttributes ItemQtyAttributes `json:"qty_attributes"` QtyAttributesPerUnit interface{} `json:"qty_attributes_per_unit"` DeliveryPromotionAttributes interface{} `json:"delivery_promotion_attributes"` }
type ItemClickAction ¶
type ItemClickAction struct { Type string `json:"type"` Data struct { Container struct { Title string `json:"title"` Path string `json:"path"` InitialStep interface{} `json:"initial_step"` Modules []interface{} `json:"modules"` DataDependencies []interface{} `json:"data_dependencies"` } `json:"container"` TrackingParams struct { } `json:"tracking_params"` TrackingEventNames struct { } `json:"tracking_event_names"` } `json:"data"` }
type ItemImage ¶
type ItemImage struct { URL string `json:"url"` Alt string `json:"alt"` Responsive struct { Template string `json:"template"` Defaults struct { Width int `json:"width"` Fill string `json:"fill"` Format string `json:"format"` } `json:"defaults"` } `json:"responsive"` Sizes []interface{} `json:"sizes"` }
type ItemQtyAttributes ¶
type ItemQtyAttributes struct { Initial int `json:"initial"` Increment float32 `json:"increment"` Min float32 `json:"min"` Max float32 `json:"max"` Unit interface{} `json:"unit"` UnitAria interface{} `json:"unit_aria"` MaxReachedLabel string `json:"max_reached_label"` MinReachedLabel interface{} `json:"min_reached_label"` MinWeightExp bool `json:"min_weight_exp"` Editable bool `json:"editable"` QtyEnforcedLabel interface{} `json:"qty_enforced_label"` Select struct { Options []float32 `json:"options"` DefaultOption int `json:"default_option"` CustomOption struct { Label string `json:"label"` } `json:"custom_option"` } `json:"select"` }
type Order ¶
type Order struct { ID string `json:"id"` LegacyID interface{} `json:"legacy_id"` // this is usually an int, but sometimes it's a string Status string `json:"status"` Rating float32 `json:"rating"` Total string `json:"total"` CreatedAt string `json:"created_at"` Actions map[string]Action `json:"actions"` OrderDeliveries []OrderDelivery `json:"order_deliveries"` }
type OrderDelivery ¶
type OrderDelivery struct { ID string `json:"id"` OrderID string `json:"order_id"` Description string `json:"description"` Base62ID string `json:"base62_id"` Status string `json:"status"` DeliveredAt string `json:"delivered_at"` Retailer Retailer `json:"retailer"` OrderItems []OrderItem `json:"order_items"` }
type OrdersMeta ¶
type OrdersResponse ¶
type OrdersResponse struct { Orders []Order `json:"orders"` Meta OrdersMeta `json:"meta"` }
OrdersResponse is the response from the orders API
type RateLimitError ¶
type RateLimitError struct {
// contains filtered or unexported fields
}
func (RateLimitError) Error ¶
func (e RateLimitError) Error() string
Click to show internal directories.
Click to hide internal directories.