Documentation
¶
Index ¶
Constants ¶
View Source
const ( DEFAULT_API_HOST = "http://api.capsolver.com" STATUS_READY = "ready" CREATE_TASK_URI = "/createTask" GET_TASK_URI = "/getTaskResult" BALANCE_URI = "/getBalance" TASK_TIMEOUT = 60 )
Variables ¶
View Source
var ( ApiKey = os.Getenv("CAPSOLVER_API_KEY") ApiHost = os.Getenv("CAPSOLVER_API_HOST") )
Functions ¶
This section is empty.
Types ¶
type CapSolver ¶
type CapSolver struct {
ApiKey string
}
func (*CapSolver) Balance ¶
func (c *CapSolver) Balance() (*CapSolverResponse, error)
type CapSolverResponse ¶
type CapSolverResponse struct {
ErrorId int32 `json:"errorId"`
ErrorCode string `json:"errorCode"`
ErrorDescription string `json:"errorDescription,omitempty"`
Status string `json:"status,omitempty"`
Solution *solution `json:"solution,omitempty"`
TaskId string `json:"taskId,omitempty"`
Balance float32 `json:"balance,omitempty"`
Packages []string `json:"packages,omitempty"`
}
type CapSolverTask ¶
type CapSolverTask struct {
Type string `json:"type"`
WebsiteURL string `json:"websiteURL,omitempty"`
WebsiteKey string `json:"websiteKey,omitempty"`
Proxy string `json:"proxy,omitempty"`
UserAgent string `json:"userAgent,omitempty"`
// GeeTest
Gt string `json:"gt,omitempty"`
Challenge string `json:"challenge,omitempty"`
CaptchaId string `json:"captchaId,omitempty"`
GeetestApiServerSubdomain string `json:"geetestApiServerSubdomain,omitempty"`
// reCaptcha
PageAction string `json:"pageAction,omitempty"`
EnterPrisePayload *enterPrisePayload `json:"enterprisePayload,omitempty"`
IsInvisible bool `json:"isInvisible,omitempty"`
IsSession bool `json:"isSession,omitempty"`
ApiDomain string `json:"apiDomain,omitempty"`
// DataDome
CaptchaUrl string `json:"captchaUrl,omitempty"`
// AWS WAF
AwsKey string `json:"awsKey,omitempty"`
AwsIv string `json:"awsIv,omitempty"`
AwsContext string `json:"awsContext,omitempty"`
AwsChallengeJS string `json:"awsChallengeJS,omitempty"`
AwsApiJs string `json:"awsApiJs,omitempty"`
AwsProblemUrl string `json:"awsProblemUrl,omitempty"`
AwsApiKey string `json:"awsApiKey,omitempty"`
AwsExistingToken string `json:"awsExistingToken,omitempty"`
// cloudflare
Metadata map[string]string `json:"metadata"`
Html string `json:"html"`
Image string `json:"image,omitempty"`
Images []string `json:"images,omitempty"`
Question string `json:"question,omitempty"`
// ImageToTextTask
Body string `json:"body,omitempty"`
Module string `json:"module,omitempty"`
// VisionEngine
ImageBackground string `json:"imageBackground,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.