client

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(baseURL string, opts ...Option) (*Client, error)

func (*Client) AddAuthorizationHeader

func (c *Client) AddAuthorizationHeader(psswd string)

func (*Client) AddItems

func (client *Client) AddItems(ctx context.Context, addItemReq *model.AddItemsRequest) error

func (*Client) GetItemPrice

func (client *Client) GetItemPrice(ctx context.Context, key string) (*model.PriceResponse, error)

func (*Client) GetItemsPrice

func (client *Client) GetItemsPrice(ctx context.Context, itemsPriceReq *model.ItemsPriceRequest) (*model.PriceResponse, error)

func (*Client) GetOrders

func (client *Client) GetOrders(ctx context.Context) (*model.Orders, error)

func (*Client) Health

func (client *Client) Health(ctx context.Context) (*model.HealthResponse, error)

func (*Client) ListItems added in v0.6.0

func (client *Client) ListItems(ctx context.Context) ([]*model.Item, error)

func (*Client) ListNotifications added in v0.7.0

func (client *Client) ListNotifications(ctx context.Context) (*model.Notification, error)

func (*Client) PurchaseItems

func (client *Client) PurchaseItems(ctx context.Context, itemsPriceReq *model.PurchaseItemsRequest) (*model.PurchaseItemsResponse, error)

func (*Client) Status

func (client *Client) Status(ctx context.Context) (*model.StatusResponse, error)

type HTTPError added in v0.2.0

type HTTPError struct {
	Status int
	Body   []byte
	JSON   *errors.JSONError
}

func (*HTTPError) Error added in v0.2.0

func (e *HTTPError) Error() string

type Option added in v0.2.0

type Option func(*Client)

func WithHTTPClient added in v0.2.0

func WithHTTPClient(hc *http.Client) Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL