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: &Value) -> Value
pub async fn get_queue_stats(&self, enp_payload: &Value) -> Value
Sourcepub async fn report_incorrect_image(&self, enp_payload: &Value) -> Value
pub async fn report_incorrect_image(&self, enp_payload: &Value) -> Value
Method request reportIncorrectImageCaptcha
enp
§Examples
use serde_json::json;
use rust_anticaptcha::control::Control;
async fn run() {
let control_client = Control::new();
let map = json!({"clientKey": "API_KEY", "taskId": 12345});
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: &Value) -> Value
pub async fn report_incorrect_recaptcha(&self, enp_payload: &Value) -> Value
Method request reportIncorrectRecaptcha
enp
§Examples
use serde_json::json;
use rust_anticaptcha::control::Control;
async fn run() {
let control_client = Control::new();
let map = json!({"clientKey": "API_KEY", "taskId": 12345});
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: &Value) -> Value
pub async fn report_correct_recaptcha(&self, enp_payload: &Value) -> Value
Method request reportCorrectRecaptcha
enp
§Examples
use serde_json::json;
use rust_anticaptcha::control::Control;
async fn run() {
let control_client = Control::new();
let map = json!({"clientKey": "API_KEY", "taskId": 12345});
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: &Value) -> Value
pub async fn report_incorrect_hcaptcha(&self, enp_payload: &Value) -> Value
Method request reportIncorrectHcaptcha
enp
§Examples
use serde_json::json;
use rust_anticaptcha::control::Control;
async fn run() {
let control_client = Control::new();
let map = json!({"clientKey": "API_KEY", "taskId": 12345});
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: &Value) -> Value
pub async fn push_antigate_var(&self, enp_payload: &Value) -> Value
Method request pushAntiGateVariable
enp
§Examples
use serde_json::json;
use rust_anticaptcha::control::Control;
async fn run() {
let control_client = Control::new();
let map = json!({
"clientKey": "API_KEY",
"taskId": 12345,
"name": "my_late_variable",
"value": "some_value"
});
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: &Value) -> Value
pub async fn get_spending_stats(&self, enp_payload: &Value) -> Value
Method request getSpendingStats
enp
§Examples
use serde_json::json;
use rust_anticaptcha::control::Control;
async fn run() {
let control_client = Control::new();
let map = json!({
"clientKey": "API_KEY",
"date": 1672185600,
"queue": "Recaptcha Proxyless"
});
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: &Value) -> Value
pub async fn get_app_stats(&self, enp_payload: &Value) -> Value
Method request getAppStats
enp
§Examples
use serde_json::json;
use rust_anticaptcha::control::Control;
async fn run() {
let control_client = Control::new();
let map = json!({
"clientKey": "API_KEY",
"softId": 867,
"mode": "money"
});
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: