Documentation
¶
Index ¶
- Constants
- type APIError
- type Client
- func (c *Client) FindOptionBySize(options []shop.ItemOption, size int) (shop.ItemOption, bool)
- func (c *Client) GetItemExtendedOption(article string) (shop.ItemExtendedOption, error)
- func (c *Client) GetItemOption(article string, size int) (shop.ItemOption, error)
- func (c *Client) GetItemURLByArticle(article string) (string, error)
- func (c *Client) GetOptionsByArticle(article string) ([]shop.ItemOption, error)
- type Config
- type HTTPClient
- type NextClient
Constants ¶
View Source
const ( // EndpointGetExtendedOptions is an endpoint for extended options retrieval EndpointGetExtendedOptions = "/itemstock/getextendedoptions" // EndpointSearch is an endpoint to search items EndpointSearch = "/search" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
HTTPClient HTTPClient
BaseURL string
Language string
}
Client is a wrapper for some Next APIs
func NewClient ¶
func NewClient(httpClient HTTPClient, c Config) *Client
NewClient creates a Next client
func (*Client) FindOptionBySize ¶
func (c *Client) FindOptionBySize(options []shop.ItemOption, size int) (shop.ItemOption, bool)
func (*Client) GetItemExtendedOption ¶
func (c *Client) GetItemExtendedOption(article string) (shop.ItemExtendedOption, error)
GetItemExtendedOption fetches available options information for particular article
func (*Client) GetItemOption ¶
GetItemOption fetches a single option object for article and size combination
func (*Client) GetItemURLByArticle ¶
func (*Client) GetOptionsByArticle ¶
func (c *Client) GetOptionsByArticle(article string) ([]shop.ItemOption, error)
GetOptionsByArticle fetched item options by article
type HTTPClient ¶
HTTPClient interface to be implemented by different clients
type NextClient ¶
type NextClient interface {
GetOptionsByArticle(article string) ([]shop.ItemOption, error)
GetItemOption(article string, size int) (shop.ItemOption, error)
GetItemExtendedOption(article string) (shop.ItemExtendedOption, error)
FindOptionBySize(options []shop.ItemOption, size int) (shop.ItemOption, bool)
GetItemURLByArticle(article string) (string, error)
}
Click to show internal directories.
Click to hide internal directories.