Method: Api2Captcha::Client#send
- Defined in:
- lib/api_2captcha/client.rb
#send(*args) ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/api_2captcha/client.rb', line 48 def send(*args) raise ArgumentError, "Invalid arguments of the send method" unless args.size == 1 arg = args.first if arg.is_a?(String) solve("POST", {}, arg, return_id: true) elsif arg.is_a?(Hash) method = arg.delete(:method) || "POST" solve(method, arg, return_id: true) else raise ArgumentError, "Invalid arguments of the send method" end end |