Class TwoCaptcha
java.lang.Object
com.twocaptcha.TwoCaptcha
-
Constructor Summary
ConstructorsConstructorDescriptionTwoCaptcha constructorTwoCaptcha(String apiKey) TwoCaptcha constructorTwoCaptcha(String apiKey, int extendedResponse) -
Method Summary
Modifier and TypeMethodDescriptiondoublebalance()Gets account's balanceReturns result of captcha if it was solved or `null`, if result is not readyvoidReports if captcha was solved correctly (sends `reportbad` or `reportgood` to `/res.php`)Sends captcha to '/in.php', and returns its `id`voidvoidsetCallback(String callback) voidsetDefaultTimeout(int timeout) voidsetExtendedResponse(int extendedResponse) voidvoidsetHttpClient(ApiClient apiClient) voidsetPollingInterval(int interval) voidsetRecaptchaTimeout(int timeout) voidsetSoftId(int softId) voidSends captcha to `/in.php` and waits for it's result.voidSends captcha to `/in.php` and waits for it's result.voidwaitForResult(Captcha captcha, Map<String, Integer> waitOptions) This helper waits for captcha result, and when result is ready, returns it
-
Constructor Details
-
TwoCaptcha
public TwoCaptcha()TwoCaptcha constructor -
TwoCaptcha
-
TwoCaptcha
-
-
Method Details
-
setApiKey
- Parameters:
apiKey-
-
setHost
- Parameters:
domain-
-
setSoftId
public void setSoftId(int softId) - Parameters:
softId-
-
setCallback
- Parameters:
callback-
-
setDefaultTimeout
public void setDefaultTimeout(int timeout) - Parameters:
timeout-
-
setRecaptchaTimeout
public void setRecaptchaTimeout(int timeout) - Parameters:
timeout-
-
setPollingInterval
public void setPollingInterval(int interval) - Parameters:
interval-
-
setHttpClient
- Parameters:
apiClient-
-
solve
-
solve
-
waitForResult
-
send
-
getResult
-
balance
-
report
-
setExtendedResponse
public void setExtendedResponse(int extendedResponse)
-