CAPTCHAFORUM
Administrator
This gem facilitates interaction with https://rucaptcha.com/api-rucaptcha API.
Installation
Fast usage
/example.rb
Explained usage
Methods to get statistics
Documentation https://githubmemory.com/repo/lakesare/rucaptcha_api
Installation
gem 'rucaptcha_api'
Fast usage
/example.rb
Explained usage
require 'rucaptcha_api'
rucaptcha_key = '5d01e7jk4d9c64a784b25d38840d1407'
- for example. get your own 'captcha KEY' from https://rucaptcha.com/setting page after you registered.api = RucaptchaApi.new rucaptcha_key
path_to_captcha = File.expand_path 'var/captchas/1.png'
- absolute path to image of your captcha (only accepts jpg,jpeg,gif,png)captcha_id = api.send_captcha_for_solving path_to_captcha, params: {phrase: 1}
- you send captcha for solving, and you get its id as a resonse so that you can later look up its solution when it's ready. params here are optional, and you can find possible params in API docs https://rucaptcha.com/api-rucaptchaMethods to get statistics
api.balance #=> 95.03
- Find out the account balance. The balance is indicated in Russian rubles.api.captcha_cost captcha_id
- Request for the status and cost of recognizing this captcha. The price is indicated in rubles.api.stats_for date: '2013-11-27' # => string with xml
- get statistics of account usage in XML for the specified date.RucaptchaApi.rucaptcha_stats # => {waiting: ..., ...}
- waiting: the number of employees waiting for a captcha. load: the percentage of workers loaded. minbid: current bid for captcha recognition. In rubles. averageRecognitionTime: average time (in seconds) for which captchas are currently being solvedDocumentation https://githubmemory.com/repo/lakesare/rucaptcha_api