Class: DeathByCaptcha::HTTPClient

Inherits:
Client
  • Object
show all
Defined in:
lib/deathbycaptcha/http_client.rb

Overview

DeathByCaptcha HTTP API client

Instance Attribute Summary

Attributes inherited from Client

#config

Instance Method Summary collapse

Methods inherited from Client

#decode, #get_balance, #get_text, #initialize

Constructor Details

This class inherits a constructor from DeathByCaptcha::Client

Instance Method Details

#get_captcha(cid) ⇒ Object



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

def get_captcha(cid)
  call("captcha/#{cid}")
end

#get_userObject



12
13
14
# File 'lib/deathbycaptcha/http_client.rb', line 12

def get_user
  call('user', userpwd)
end

#remove(cid) ⇒ Object



24
25
26
# File 'lib/deathbycaptcha/http_client.rb', line 24

def remove(cid)
  not call("captcha/#{cid}/remove", userpwd)['captcha']
end

#report(cid) ⇒ Object



20
21
22
# File 'lib/deathbycaptcha/http_client.rb', line 20

def report(cid)
  call("captcha/#{cid}/report", userpwd)['is_correct']
end