Method: ZeroCaptcha::Client#initialize

Defined in:
lib/zero_captcha/client.rb

#initialize(token, options = {}) ⇒ ZeroCaptcha::Client

Create a ZeroCaptcha API client.

Parameters:

  • token (String)

    Token of the ZeroCaptcha account.

  • options (Hash) (defaults to: {})

    Options hash.

Options Hash (options):

  • :timeout (Integer) — default: 60

    Seconds before giving up of a captcha being solved.



19
20
21
22
# File 'lib/zero_captcha/client.rb', line 19

def initialize(token, options = {})
  self.token      = token
  self.timeout    = options[:timeout] || 60
end