Sha256: 9c1a840047c9d02168ef2813cf39628e72880cb8a32737f271c60d436d29bb2b

Contents?: true

Size: 779 Bytes

Versions: 4

Compression:

Stored size: 779 Bytes

Contents

module AntiCaptcha
  class TaskResult < AntiCaptcha::Model
    attr_accessor :task_id, :error_id, :error_code, :error_description, :status,
    :cost, :ip, :create_time, :end_time, :solve_count, :api_result

    def initialize(api_result, task_id)
      @task_id = task_id

      @api_result        = api_result
      @error_id          = api_result['errorId']
      @error_code        = api_result['errorCode']
      @error_description = api_result['errorDescription']
      @status            = api_result['status']
      @cost              = api_result['cost']
      @ip                = api_result['ip']
      @create_time       = api_result['createTime']
      @end_time          = api_result['endTime']
      @solve_count       = api_result['solveCount']
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
anti_captcha-2.3.0 lib/anti_captcha/models/task_result.rb
anti_captcha-2.2.2 lib/anti_captcha/models/task_result.rb
anti_captcha-2.2.1 lib/anti_captcha/models/task_result.rb
anti_captcha-2.1.0 lib/anti_captcha/models/task_result.rb