Skip to content

UOD-421: Extend README with minScore, client options, errors and cost - #4

Merged
djaga-ru merged 4 commits into
mainfrom
UOD-421
Nov 20, 2026
Merged

djaga-ru merged 4 commits into
mainfrom
UOD-421

Conversation

@djaga-ru

Copy link
Copy Markdown
Collaborator

Extends the Rust SDK README for UOD-421. Covers minScore in the types table, client options, error handling and polling, and the solution cost. All content is README-only.

1. minScore in the types table - README.md

  • documents optional min_score (0.1-0.9, builder with_min_score) on RecaptchaV2EnterpriseRequest, RecaptchaV3ProxylessRequest and RecaptchaV3EnterpriseRequest (three replaced table rows)

2. Client options - README.md

  • new Client Configuration section: with_service_url, with_soft_id (DEFAULT_SOFT_ID 152), with_client_timeout, with_client_proxy, with_timeouts_override with a CapMonsterClient::new example

3. Error handling and polling - README.md

  • new Error Handling section: every variant of capmonstercloud_client::Error and the GetResultTimeouts schedule with with_timeouts_override

4. Solution cost - README.md

  • documents SolvedTask.cost: Option<f64> (USD) and fixes the error handling match example to read SolvedTask.solution after the return type change

Commits:

  • Document optional minScore in the supported types table
  • Document client options in README
  • Document error handling and polling timeouts in README
  • Document solution cost in README

Stats: 1 file changed, 59 insertions(+), 3 deletions(-) (three replaced or fixed lines).

RecaptchaV2EnterpriseRequest, RecaptchaV3ProxylessRequest and
RecaptchaV3EnterpriseRequest accept an optional min_score (0.1-0.9,
serde name minScore, builder with_min_score, validated by
check_min_score) but the table did not mention it.

- Note optional min_score (0.1-0.9) on the three reCAPTCHA rows
The builder methods accepted by ClientOptions were not described in the
README.

- Add a Client Configuration section: ClientOptions::new(api_key) with
  with_service_url, with_soft_id (DEFAULT_SOFT_ID 152 sent with every
  createTask), with_client_timeout (20 s per HTTP request),
  with_client_proxy (ClientProxy with ProxyType and optional
  with_auth), and with_timeouts_override, with a builder example
The Error enum and the polling behaviour were not described in detail
in the README.

- Add an Error Handling section: every variant of the
  capmonstercloud_client::Error enum (CreateTask, GetResult, GetBalance
  with code/description, Timeout(Duration), Validation, Status, Http,
  Json, MalformedResponse, UnsupportedProxyType) with a match example
- Describe automatic getTaskResult polling: the per-type
  GetResultTimeouts schedule, GetResultTimeouts::new and
  with_timeouts_override, and cancellation by dropping the future or
  wrapping the call in tokio::time::timeout
- Note that unsolved tasks are not charged
solve_captcha returns SolvedTask { solution, cost }; the quick start
examples already read SolvedTask.solution but the error handling match
still indexed the old shape.

- Show solved.cost in the Quick Start example and fix the match example
  to read SolvedTask.solution
- Note the USD price of a solution in the polling and timeouts section
@djaga-ru djaga-ru self-assigned this Nov 19, 2026
@djaga-ru djaga-ru added bug Something isn't working documentation Improvements or additions to documentation labels Nov 19, 2026
@djaga-ru
djaga-ru merged commit b26ad7c into main Nov 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant