Documentation
¶
Index ¶
- type ApiResp
- type Client
- func (c *Client) CallJsonApi(url string, qs Params, payload Payload, resp ApiResp) (err error)
- func (c *Client) CallJsonpApi(url string, qs Params, resp ApiResp) (err error)
- func (c *Client) CallSecretJsonApi(url string, qs Params, payload Payload, resp ApiResp, timestamp int64) (err error)
- func (c *Client) ExportCookies(url string) map[string]string
- func (c *Client) Get(url string, qs Params, headers map[string]string) (body io.ReadCloser, err error)
- func (c *Client) GetContent(url string, qs Params) (data []byte, err error)
- func (c *Client) GetUserAgent() string
- func (c *Client) ImportCookies(cookies map[string]string, domains ...string)
- func (c *Client) Post(url string, qs Params, payload Payload) (body io.ReadCloser, err error)
- func (c *Client) SetUserAgent(name string)
- func (c *Client) SetupValve(cdMin, cdMax uint)
- func (c *Client) Touch(url string, qs Params) error
- type Params
- func (p Params) Encode() string
- func (p Params) ToForm() Payload
- func (p Params) With(name, value string) Params
- func (p Params) WithArray(name string, values []string) Params
- func (p Params) WithInt(name string, value int) Params
- func (p Params) WithInt64(name string, value int64) Params
- func (p Params) WithMap(name string, value map[string]string) Params
- func (p Params) WithNow(name string) Params
- func (p Params) WithNowMilli(name string) Params
- type Payload
- type Valve
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 NewClient ¶
func NewClient(hc plugin.HttpClient) *Client
func (*Client) CallJsonApi ¶
CallJsonApi calls remote HTTP API, and parses its result as JSON.
func (*Client) CallJsonpApi ¶
func (*Client) CallSecretJsonApi ¶
func (c *Client) CallSecretJsonApi( url string, qs Params, payload Payload, resp ApiResp, timestamp int64, ) (err error)
CallSecretJsonApi calls JSON API with EC cryptography.
func (*Client) GetContent ¶
func (*Client) GetUserAgent ¶
func (*Client) ImportCookies ¶
func (*Client) SetUserAgent ¶
func (*Client) SetupValve ¶
Click to show internal directories.
Click to hide internal directories.