Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Call(ctx context.Context, method, path string, params, response any, ...) error
- func (c *Client) CallURL(ctx context.Context, method, uri string, response any, ...) error
- func (c *Client) SetAuthScheme(scheme string) *Client
- func (c *Client) SetAuthToken(apiKey string) *Client
- func (c *Client) SetHeader(key, value string) *Client
- func (c *Client) SetLogger(logger *slog.Logger) *Client
- type Event
- type EventReader
Constants ¶
View Source
const ( DefaultRetryCount = 3 DefaultClientTimeout = 10 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { HTTP *resty.Client // contains filtered or unexported fields }
Client defines an HTTP client for the Polygon REST API.
func (*Client) Call ¶
func (c *Client) Call(ctx context.Context, method, path string, params, response any, opts ...model.RequestOption) error
Call makes an API call based on the request params and options. The response is automatically unmarshalled.
func (*Client) CallURL ¶
func (c *Client) CallURL(ctx context.Context, method, uri string, response any, opts ...model.RequestOption) error
CallURL makes an API call based on a request URI and options. The response is automatically unmarshalled.
func (*Client) SetAuthScheme ¶
func (*Client) SetAuthToken ¶
Click to show internal directories.
Click to hide internal directories.