lib/two_captcha/client.rb
def captcha(captcha_id)
      response = request('res', :get, action: 'get', id: captcha_id)

      decoded_captcha = TwoCaptcha::Captcha.new(id: captcha_id)
      decoded_captcha.api_response = response

      if response.match(/\AOK\|/)
        decoded_captcha.text = response.split('|', 2)[1]
      end

      decoded_captcha
    end
def captcha(captcha_id)
      response = request('res', :get, action: 'get', id: captcha_id)

      decoded_captcha = TwoCaptcha::Captcha.new(id: captcha_id)
      decoded_captcha.api_response = response

      if response.match(/\AOK\|/)
        decoded_captcha.text = response.split('|', 2)[1]
      end

      decoded_captcha
    end
def captcha ( captcha_id ) response = request ( 'res' , :get , action : 'get' , id : captcha_id ) decoded_captcha = TwoCaptcha :: Captcha . new ( id : captcha_id ) decoded_captcha . api_response = response if response . match ( / \A \| / ) decoded_captcha . text = response . split ( '|' , 2 ) [ 1 ] end decoded_captcha end
Retrieve information from an uploaded captcha.

 @param [Integer] captcha_id Numeric ID of the captcha.

 @return [TwoCaptcha::Captcha] The captcha object.
Retrieve information from an uploaded captcha .