Module: AntiCaptcha

Defined in:
lib/anti_captcha.rb,
lib/anti_captcha/http.rb,
lib/anti_captcha/client.rb,
lib/anti_captcha/errors.rb,
lib/anti_captcha/version.rb,
lib/anti_captcha/models/solution.rb,
lib/anti_captcha/models/task_result.rb,
lib/anti_captcha/models/geetest_solution.rb,
lib/anti_captcha/models/h_captcha_solution.rb,
lib/anti_captcha/models/turnstile_solution.rb,
lib/anti_captcha/models/fun_captcha_solution.rb,
lib/anti_captcha/models/recaptcha_v2_solution.rb,
lib/anti_captcha/models/recaptcha_v3_solution.rb,
lib/anti_captcha/models/image_to_text_solution.rb

Overview

The module AntiCaptcha contains all the code for the anti_captcha gem. It acts as a safely namespace that isolates logic of AntiCaptcha from any project that uses it.

Defined Under Namespace

Classes: ArgumentError, Client, Error, FunCaptchaSolution, GeetestSolution, HCaptchaSolution, HTTP, ImageToTextSolution, Model, RecaptchaV2Solution, RecaptchaV3Solution, Solution, TaskResult, Timeout, TurnstileSolution

Constant Summary collapse

VERSION =
"2.5.0"
USER_AGENT =
"AntiCaptcha/Ruby v#{VERSION}"

Class Method Summary collapse

Class Method Details

.new(key, options = {}) ⇒ Object

Creates an Anti Captcha API client. This is a shortcut to AntiCaptcha::Client.new.



16
17
18
# File 'lib/anti_captcha.rb', line 16

def self.new(key, options = {})
  AntiCaptcha::Client.new(key, options)
end

.raise_error(error_id, error_code, error_description) ⇒ Object

Raises:



15
16
17
18
# File 'lib/anti_captcha/errors.rb', line 15

def self.raise_error(error_id, error_code, error_description)
  message = "ID: #{error_id} | CODE: #{error_code} | #{error_description}"
  raise AntiCaptcha::Error.new(message)
end