pub struct Control { /* private fields */ }
Expand description
Implementations§
Source§impl Control
impl Control
Sourcepub fn new() -> Self
pub fn new() -> Self
Method init new Control struct with Web Requests Client
§Examples
use rust_anticaptcha::control::Control;
let control_client = Control::new();
Sourcepub async fn get_balance(&self, api_key: String) -> Value
pub async fn get_balance(&self, api_key: String) -> Value
Sourcepub async fn get_queue_stats(
&self,
enp_payload: &HashMap<String, String>,
) -> Value
pub async fn get_queue_stats( &self, enp_payload: &HashMap<String, String>, ) -> Value
Method request getQueueStats
enp
§Examples
use std::collections::HashMap;
use rust_anticaptcha::control::Control;
async fn run() {
let control_client = Control::new();
let mut map = HashMap::new();
map.insert("queueId".to_string(), 6.to_string());
let result = control_client.get_queue_stats(&map).await;
}
§Notes
Read more here:
Sourcepub async fn report_incorrect_image(
&self,
enp_payload: &HashMap<String, String>,
) -> Value
pub async fn report_incorrect_image( &self, enp_payload: &HashMap<String, String>, ) -> Value
Method request reportIncorrectImageCaptcha
enp
§Examples
use std::collections::HashMap;
use rust_anticaptcha::control::Control;
async fn run() {
let control_client = Control::new();
let mut map = HashMap::new();
map.insert("clientKey".to_string(), "API_KEY".to_string());
map.insert("taskId".to_string(), 12345.to_string());
let result = control_client.report_incorrect_image(&map).await;
}
§Notes
Read more here:
https://anti-captcha.com/apidoc/methods/reportIncorrectImageCaptcha
Sourcepub async fn report_incorrect_recaptcha(
&self,
enp_payload: &HashMap<String, String>,
) -> Value
pub async fn report_incorrect_recaptcha( &self, enp_payload: &HashMap<String, String>, ) -> Value
Method request reportIncorrectRecaptcha
enp
§Examples
use std::collections::HashMap;
use rust_anticaptcha::control::Control;
async fn run() {
let control_client = Control::new();
let mut map = HashMap::new();
map.insert("clientKey".to_string(), "API_KEY".to_string());
map.insert("taskId".to_string(), 12345.to_string());
let result = control_client.report_incorrect_recaptcha(&map).await;
}
§Notes
Read more here:
https://anti-captcha.com/apidoc/methods/reportIncorrectRecaptcha
Sourcepub async fn report_correct_recaptcha(
&self,
enp_payload: &HashMap<String, String>,
) -> Value
pub async fn report_correct_recaptcha( &self, enp_payload: &HashMap<String, String>, ) -> Value
Method request reportCorrectRecaptcha
enp
§Examples
use std::collections::HashMap;
use rust_anticaptcha::control::Control;
async fn run() {
let control_client = Control::new();
let mut map = HashMap::new();
map.insert("clientKey".to_string(), "API_KEY".to_string());
map.insert("taskId".to_string(), 12345.to_string());
control_client.report_correct_recaptcha(&map).await;
}
§Notes
Read more here:
https://anti-captcha.com/apidoc/methods/reportCorrectRecaptcha
Sourcepub async fn report_incorrect_hcaptcha(
&self,
enp_payload: &HashMap<String, String>,
) -> Value
pub async fn report_incorrect_hcaptcha( &self, enp_payload: &HashMap<String, String>, ) -> Value
Method request reportIncorrectHcaptcha
enp
§Examples
use std::collections::HashMap;
use rust_anticaptcha::control::Control;
async fn run() {
let control_client = Control::new();
let mut map = HashMap::new();
map.insert("clientKey".to_string(), "API_KEY".to_string());
map.insert("taskId".to_string(), 12345.to_string());
control_client.report_incorrect_hcaptcha(&map).await;
};
§Notes
Read more here:
https://anti-captcha.com/apidoc/methods/reportIncorrectHcaptcha
Sourcepub async fn push_antigate_var(
&self,
enp_payload: &HashMap<String, String>,
) -> Value
pub async fn push_antigate_var( &self, enp_payload: &HashMap<String, String>, ) -> Value
Method request pushAntiGateVariable
enp
§Examples
use std::collections::HashMap;
use rust_anticaptcha::control::Control;
async fn run() {
let control_client = Control::new();
let mut map = HashMap::new();
map.insert("clientKey".to_string(), "API_KEY".to_string());
map.insert("taskId".to_string(), 12345.to_string());
map.insert("name".to_string(), "my_late_variable".to_string());
map.insert("value".to_string(), "The value".to_string());
control_client.push_antigate_var(&map).await;
}
§Notes
Read more here:
https://anti-captcha.com/apidoc/methods/pushAntiGateVariable
Sourcepub async fn get_spending_stats(
&self,
enp_payload: &HashMap<String, String>,
) -> Value
pub async fn get_spending_stats( &self, enp_payload: &HashMap<String, String>, ) -> Value
Method request getSpendingStats
enp
§Examples
use std::collections::HashMap;
use rust_anticaptcha::control::Control;
async fn run() {
let control_client = Control::new();
let mut map = HashMap::new();
map.insert("clientKey".to_string(), "API_KEY".to_string());
map.insert("date".to_string(), 1672185600.to_string());
map.insert("queue".to_string(), "Recaptcha Proxyless".to_string());
control_client.get_spending_stats(&map).await;
}
§Returns
This method grabs account spendings and task volume statistics for a 24 hour period.
§Notes
Read more here:
Sourcepub async fn get_app_stats(
&self,
enp_payload: &HashMap<String, String>,
) -> Value
pub async fn get_app_stats( &self, enp_payload: &HashMap<String, String>, ) -> Value
Method request getAppStats
enp
§Examples
use std::collections::HashMap;
use rust_anticaptcha::control::Control;
async fn run() {
let control_client = Control::new();
let mut map = HashMap::new();
map.insert("clientKey".to_string(), "API_KEY".to_string());
map.insert("softId".to_string(), 867.to_string());
map.insert("mode".to_string(), "money".to_string());
control_client.get_app_stats(&map).await;
}
§Returns
This method retrieves daily statistics for your application, which you register in Developer Center.
§Notes
Read more here: