Documentation
¶
Index ¶
- type Client
- func (c *Client) Funcaptcha(ctx context.Context, siteURL, siteKey, userAgent string, proxy *url.URL, ...) (result FuncaptchaResult, err error)
- func (c *Client) FuncaptchaProxyless(ctx context.Context, siteURL, siteKey string, opts ...OptionalValue) (result FuncaptchaResult, err error)
- func (c *Client) GeeTest(ctx context.Context, siteURL, siteKey, challenge, userAgent string, ...) (result GeeTestResult, err error)
- func (c *Client) GeeTestProxyless(ctx context.Context, siteURL, siteKey, challenge string, opts ...OptionalValue) (result GeeTestResult, err error)
- func (c *Client) GetBalance(ctx context.Context) (balance float64, err error)
- func (c *Client) HCaptcha(ctx context.Context, siteURL, siteKey, userAgent string, proxy *url.URL, ...) (result HCaptchaResult, err error)
- func (c *Client) HCaptchaProxyless(ctx context.Context, siteURL, siteKey string, opts ...OptionalValue) (result HCaptchaResult, err error)
- func (c *Client) ImageToText(ctx context.Context, body string, opts ...OptionalValue) (result ImageCaptchaResult, err error)
- func (c *Client) RecaptchaV2(ctx context.Context, siteURL, siteKey, userAgent string, proxy *url.URL, ...) (result RecaptchaResult, err error)
- func (c *Client) RecaptchaV2Enterprise(ctx context.Context, siteURL, siteKey, userAgent string, proxy *url.URL, ...) (result RecaptchaResult, err error)
- func (c *Client) RecaptchaV2EnterpriseProxyless(ctx context.Context, siteURL, siteKey string, opts ...OptionalValue) (result RecaptchaResult, err error)
- func (c *Client) RecaptchaV2Proxyless(ctx context.Context, siteURL, siteKey string, opts ...OptionalValue) (result RecaptchaResult, err error)
- func (c *Client) RecaptchaV3Enterprise(ctx context.Context, siteURL, siteKey string, minScore float64, ...) (result RecaptchaResult, err error)
- func (c *Client) RecaptchaV3Proxyless(ctx context.Context, siteURL, siteKey string, minScore float64, ...) (result RecaptchaResult, err error)
- func (c *Client) ReportIncorrectImageCaptcha(ctx context.Context, taskId int64) (err error)
- func (c *Client) ReportIncorrectRecaptcha(ctx context.Context, taskId int64) (err error)
- func (c *Client) SquareNet(ctx context.Context, body, object string, rows, columns int64) (result SquareNetResult, err error)
- type ClientOption
- type FuncaptchaResult
- type GeeTestResult
- type HCaptchaResult
- type ImageCaptchaResult
- type OptionalValue
- type RecaptchaResult
- type SquareNetResult
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
}
Client allows programmatic access to the anti-captcha api
func NewClient ¶
func NewClient(key string, opts ...ClientOption) (client *Client)
NewClient returns a new Client with the applied options
func (*Client) Funcaptcha ¶
func (c *Client) Funcaptcha(ctx context.Context, siteURL, siteKey, userAgent string, proxy *url.URL, opts ...OptionalValue) (result FuncaptchaResult, err error)
Funcaptcha submits and retrieves a funcaptcha task
func (*Client) FuncaptchaProxyless ¶
func (c *Client) FuncaptchaProxyless(ctx context.Context, siteURL, siteKey string, opts ...OptionalValue) (result FuncaptchaResult, err error)
FuncaptchaProxyless submits and retrieves a funcaptcha task
func (*Client) GeeTest ¶
func (c *Client) GeeTest(ctx context.Context, siteURL, siteKey, challenge, userAgent string, proxy *url.URL, opts ...OptionalValue) (result GeeTestResult, err error)
GeeTest submits and retrieves a geetest task
func (*Client) GeeTestProxyless ¶
func (c *Client) GeeTestProxyless(ctx context.Context, siteURL, siteKey, challenge string, opts ...OptionalValue) (result GeeTestResult, err error)
GeeTestProxyless submits and retrieves a geetest task
func (*Client) GetBalance ¶
GetBalance retrieves the current account balance
func (*Client) HCaptcha ¶
func (c *Client) HCaptcha(ctx context.Context, siteURL, siteKey, userAgent string, proxy *url.URL, opts ...OptionalValue) (result HCaptchaResult, err error)
HCaptcha submits and retrieves a hcaptcha task
func (*Client) HCaptchaProxyless ¶
func (c *Client) HCaptchaProxyless(ctx context.Context, siteURL, siteKey string, opts ...OptionalValue) (result HCaptchaResult, err error)
HCaptchaProxyless submits and retrieves a hcaptcha task
func (*Client) ImageToText ¶
func (c *Client) ImageToText(ctx context.Context, body string, opts ...OptionalValue) (result ImageCaptchaResult, err error)
ImageToText submits and retrieves an image task
func (*Client) RecaptchaV2 ¶
func (c *Client) RecaptchaV2(ctx context.Context, siteURL, siteKey, userAgent string, proxy *url.URL, opts ...OptionalValue) (result RecaptchaResult, err error)
RecaptchaV2 submits and retrieves a recaptcha v2 task
func (*Client) RecaptchaV2Enterprise ¶
func (c *Client) RecaptchaV2Enterprise(ctx context.Context, siteURL, siteKey, userAgent string, proxy *url.URL, opts ...OptionalValue) (result RecaptchaResult, err error)
RecaptchaV2Enterprise submits and retrieves a recaptcha v2 enterprise task
func (*Client) RecaptchaV2EnterpriseProxyless ¶
func (c *Client) RecaptchaV2EnterpriseProxyless(ctx context.Context, siteURL, siteKey string, opts ...OptionalValue) (result RecaptchaResult, err error)
RecaptchaV2EnterpriseProxyless submits and retrieves a recaptcha v2 enterprise task
func (*Client) RecaptchaV2Proxyless ¶
func (c *Client) RecaptchaV2Proxyless(ctx context.Context, siteURL, siteKey string, opts ...OptionalValue) (result RecaptchaResult, err error)
RecaptchaV2Proxyless submits and retrieves a recaptcha v2 task
func (*Client) RecaptchaV3Enterprise ¶
func (c *Client) RecaptchaV3Enterprise(ctx context.Context, siteURL, siteKey string, minScore float64, opts ...OptionalValue) (result RecaptchaResult, err error)
RecaptchaV3Enterprise submits and retrieves a recaptcha v3 enterprise task
func (*Client) RecaptchaV3Proxyless ¶
func (c *Client) RecaptchaV3Proxyless(ctx context.Context, siteURL, siteKey string, minScore float64, opts ...OptionalValue) (result RecaptchaResult, err error)
RecaptchaV3Proxyless submits and retrieves a recaptcha v3 task
func (*Client) ReportIncorrectImageCaptcha ¶
ReportIncorrectImageCaptcha reports an incorrect captcha for a refund
func (*Client) ReportIncorrectRecaptcha ¶
ReportIncorrectRecaptcha reports an incorrect captcha for a refund
type ClientOption ¶
type ClientOption func(c *Client)
ClientOption is an option used to modify the anti-captcha client
func WithCheckInterval ¶
func WithCheckInterval(duration time.Duration) ClientOption
WithCheckInterval is an option that makes the Client use the provided check interval
func WithDelay ¶
func WithDelay(duration time.Duration) ClientOption
WithDelay is an option that makes the Client use the provided delay
func WithHost ¶
func WithHost(host string) ClientOption
WithHost is an option that makes the Client use the provided host
type FuncaptchaResult ¶
type FuncaptchaResult struct {
Token string `json:"token"`
}
FuncaptchaResult is the api response from a funcaptcha task
type GeeTestResult ¶
type GeeTestResult struct {
Challenge string `json:"challenge"`
Validate string `json:"validate"`
SecCode string `json:"seccode"`
}
GeeTestResult is the api response from a geetest task
type HCaptchaResult ¶
type HCaptchaResult struct {
GRecaptchaResponse string `json:"gRecaptchaResponse"`
}
HCaptchaResult is the api response from a hcaptcha task
type ImageCaptchaResult ¶
ImageCaptchaResult is the api response from an image task
type OptionalValue ¶
type OptionalValue func(map[string]interface{})
OptionalValue is an option used to add values to an api request
func WithOptional ¶
func WithOptional(key string, value interface{}) OptionalValue
WithOptional is an option that adds values to an api request
type RecaptchaResult ¶
type RecaptchaResult struct {
GRecaptchaResponse string `json:"gRecaptchaResponse"`
Cookies interface{} `json:"cookies"`
}
RecaptchaResult is the api response from a recaptcha task
type SquareNetResult ¶
type SquareNetResult struct {
CellNumbers []int64 `json:"cellNumbers"`
}
SquareNetResult is the api response from a squarenet task