Documentation ¶
Index ¶
- type Author
- type Category
- type Client
- func (c *Client) CheckoutByProducts(email, phone, name string, cart map[int64]int) (*Order, error)
- func (c *Client) Do(method, path string, body, data any, modificators ...RequestModificator) error
- func (c *Client) FindSettlement(name string) (ListResponse[Settlement], error)
- func (c *Client) GetAuthor(id int) (*Author, error)
- func (c *Client) GetItem(id int) (*Item, error)
- func (c *Client) GetOrder(id int64) (*Order, error)
- func (c *Client) ListAuthors(page, count int) ([]Author, error)
- func (c *Client) ListCategory(page int, count int) (*ListResponse[Category], error)
- func (c *Client) ListDeliveryAddress(settlement int64, page, count int) (ListResponse[DeliveryPoint], error)
- func (c *Client) ListItems(page int, count int, category int) (*ListResponse[Item], error)
- type DeliveryPoint
- type Error
- type Item
- type Link
- type Links
- type ListResponse
- type Logger
- type Meta
- type Options
- type Order
- type RequestModificator
- type Settlement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Category ¶
type Category struct { ID int64 `json:"id,omitempty"` Sid int64 `json:"sid,omitempty"` Name string `json:"name,omitempty"` Anchor string `json:"anchor,omitempty"` Priority int64 `json:"priority,omitempty"` PriorityHome int64 `json:"priority_home,omitempty"` PriorityMenu int64 `json:"priority_menu,omitempty"` IsHiddenInMenu int64 `json:"is_hidden_in_menu,omitempty"` Path string `json:"path,omitempty"` Level int64 `json:"level,omitempty"` Type int64 `json:"type,omitempty"` IsAdult int64 `json:"is_adult,omitempty"` HasLocoSlider bool `json:"has_loco_slider,omitempty"` HasDesign bool `json:"has_design,omitempty"` HasAsMainDesign bool `json:"has_as_main_design,omitempty"` IsItemDescriptionHidden bool `json:"is_item_description_hidden,omitempty"` IsForMobileApp bool `json:"is_for_mobile_app,omitempty"` CategoryGroupID *int64 `json:"category_group_id,omitempty"` HasDesktopDesign bool `json:"has_desktop_design,omitempty"` HasMobileDesign bool `json:"has_mobile_design,omitempty"` H1 string `json:"h1,omitempty"` IsComparable bool `json:"is_comparable,omitempty"` Photo *string `json:"photo,omitempty"` Icon string `json:"icon,omitempty"` IsLeaf int64 `json:"is_leaf,omitempty"` FullSlug string `json:"full_slug,omitempty"` AsideCategoriesIDS []int64 `json:"aside_categories_ids,omitempty"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CheckoutByProducts ¶ added in v0.1.2
CheckuotByProducts - создание заказа без использования корзины
func (*Client) Do ¶
func (c *Client) Do(method, path string, body, data any, modificators ...RequestModificator) error
func (*Client) FindSettlement ¶ added in v0.1.2
func (c *Client) FindSettlement(name string) (ListResponse[Settlement], error)
FindSettlement - Поиск поселения для получения списка доставки
func (*Client) ListAuthors ¶
Authors - Возвращает список авторов
page [int] - номер страницы count [int] - кол-во элементов (enum: )
func (*Client) ListCategory ¶
func (*Client) ListDeliveryAddress ¶
func (c *Client) ListDeliveryAddress(settlement int64, page, count int) (ListResponse[DeliveryPoint], error)
type DeliveryPoint ¶ added in v0.1.2
type Item ¶
type Item struct { ID int64 `json:"id,omitempty"` Sid int64 `json:"sid,omitempty"` Name string `json:"name,omitempty"` CategoryID int64 `json:"category_id,omitempty"` Price int64 `json:"price,omitempty"` PriceMax int64 `json:"price_max,omitempty"` RetailPrice int64 `json:"retail_price,omitempty"` DiscountPercent int64 `json:"discountPercent,omitempty"` Photos []struct { URLPart string `json:"url_part,omitempty"` Version int `json:"version,omitempty"` } `json:"photos,omitempty"` Description string `json:"description,omitempty"` }
type ListResponse ¶
type Options ¶
func WithApiKey ¶
WithAPIKey - Добавляет ключ API к HTTP запросу
func WithClient ¶
WithClient - Настраивает ваш http клиент для обработки запросов
type Order ¶ added in v0.1.3
type Order struct { ID int64 `json:"id"` UserID int64 `json:"user_id"` ManagerID int64 `json:"manager_id"` PaymentID interface{} `json:"payment_id"` PaymentTypeID int64 `json:"payment_type_id"` Subtotal int64 `json:"subtotal"` Discount int64 `json:"discount"` Total int64 `json:"total"` PaymentURL string `json:"payment_form,omitempty"` Comment string `json:"comment,omitempty"` ContactPerson string `json:"contact_person,omitempty"` IsUseDigitalSignature bool `json:"is_use_digital_signature,omitempty"` ManagerAction int64 `json:"manager_action,omitempty"` PersonType int64 `json:"person_type,omitempty"` IsTemperatureLimitsAgreed bool `json:"is_temperature_limits_agreed,omitempty"` IsOffice bool `json:"is_office,omitempty"` HasItemWithByThePieceAddition bool `json:"has_item_with_by_the_piece_addition,omitempty"` Email string `json:"email,omitempty"` CartCreatedAt string `json:"cart_created_at,omitempty"` ItemsCount int64 `json:"items_count,omitempty"` UnitCount int64 `json:"unit_count,omitempty"` GoogleCid string `json:"google_cid,omitempty"` AssemblyCost int64 `json:"assembly_cost,omitempty"` StatusID int64 `json:"status_id,omitempty"` NotificationTypeID int64 `json:"notification_type_id,omitempty"` IsRemote bool `json:"is_remote,omitempty"` IsSmallWholesale bool `json:"is_small_wholesale,omitempty"` ManagerComment string `json:"manager_comment,omitempty"` IsReorderDenied bool `json:"is_reorder_denied,omitempty"` HasJewelry bool `json:"has_jewelry,omitempty"` CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` IsEnqueued bool `json:"is_enqueued,omitempty"` DoneInfo string `json:"done_info,omitempty"` }
type RequestModificator ¶
func SetCount ¶
func SetCount(count int) RequestModificator
SetCount устанавливает кол-во товаров на странице ENUM: 10, 20, 50, 100 defaultValue: 50
func SetHeader ¶
func SetHeader(key, val string) RequestModificator
func SetPage ¶
func SetPage(page int) RequestModificator
SetPage Устанавливает номер выводимой страницы
func SetQuery ¶
func SetQuery(key, val string) RequestModificator
Click to show internal directories.
Click to hide internal directories.