docs: update for API ergonomics pass (whatsapp-rust#1089) - #431
Conversation
Rename Client::get_push_name/get_pn/get_lid to push_name/pn/lid, document SendOptions/EditOptions as #[non_exhaustive] with with_* builder setters, note the new crate-root re-exports (Polls, PollOptionResult, PollVoteCiphertext, MexGraphQLError, EncType), document #[must_use] on BotHandle/BotBuilder/ClientBuilder, and add an explicit query_info vs get_metadata comparison in the groups reference.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
Next review available in: 54 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
| Filename | Overview |
|---|---|
| api/bot.mdx | Corrects the stale get_pn() call to pn(), inverts the previously wrong BotHandle drop behavior description (drop now aborts rather than keeps alive), and adds a #[must_use] note for BotBuilder. |
| api/client.mdx | Renames get_push_name/get_pn/get_lid sections to push_name/pn/lid, adds Renamed from notes for migration clarity, and updates the edit_message_with_options prose to reference the builder pattern for EditOptions. |
| api/groups.mdx | Adds a clear query_info vs get_metadata comparison table and expands the get_metadata return-value description with LID backfill and cache behavior details. |
| api/send.mdx | Adds #[derive(Debug, Clone, Default)] and #[non_exhaustive] to SendOptions and EditOptions blocks, converts all struct-literal examples to ::default().with_* builder chains, and adds notes explaining the construction constraint. |
| api/mex.mdx | Adds a note that MexGraphQLError and siblings are now re-exported from the crate root. |
| api/polls.mdx | Updates import examples from whatsapp_rust::features::Polls/PollOptionResult to crate-root paths and adds a note documenting re-exports including PollVoteCiphertext. |
| api/signal.mdx | Switches the encrypt_message example import from wacore::message_processing::EncType to whatsapp_rust::EncType and adds a note recommending the crate-root path. |
| guides/polls.mdx | Updates two PollOptionResult imports to the crate-root path to match the re-export. |
| guides/sending-messages.mdx | Converts all SendOptions/EditOptions struct-literal examples to builder chains and adds a trailing #[non_exhaustive] note; the note appears ~490 lines after the first builder usage, leaving early examples unexplained. |
Reviews (2): Last reviewed commit: "docs: address review feedback on PR #431" | Re-trigger Greptile
- api/polls.mdx: fix stale "shown above" wording in the crate-root re-export Note now that examples use the root path directly - api/send.mdx: add missing #[derive(Debug, Clone, Default)] to the SendOptions code block, matching EditOptions below it
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Summary
Updates documentation for the breaking API changes merged in oxidezap/whatsapp-rust#1089, an API-ergonomics pass over the public client surface. No changelog entries were added (per project convention, those are human-authored).
Changes
api/client.mdx—Client::get_push_name/get_pn/get_lidrenamed topush_name/pn/lid; updated theEditOptionsprose reference to point at the new builder-based construction.api/bot.mdx— Fixed a staleclient.get_pn()call site; documented#[must_use]onBotBuilderandBotHandle(droppingBotHandleaborts the bot — the docs previously stated the opposite for the drop case).api/send.mdx—SendOptionsandEditOptionsare now#[non_exhaustive]and can no longer be built as struct literals from outside the crate; every example switched to thewith_*builder pattern (SendOptions::default().with_message_id(...), etc.).guides/sending-messages.mdx— Same struct-literal → builder-pattern update across allSendOptions/EditOptionsexamples, plus a note explaining why (#[non_exhaustive]).api/polls.mdx/guides/polls.mdx—Polls/PollOptionResultimport examples updated to the new crate-root re-export path (whatsapp_rust::Pollsinstead ofwhatsapp_rust::features::Polls).api/signal.mdx— NotedEncTypeis now re-exported from the crate root (whatsapp_rust::EncType), updated the example import.api/mex.mdx— NotedMexGraphQLError(and siblings) are re-exported from the crate root.api/groups.mdx— Added an explicitquery_infovsget_metadatacomparison table, mirroring the new rustdoc added in the source PR, so readers no longer have to infer the distinction from two separate return types.Test plan
api/client.mdx,api/bot.mdx,api/send.mdx,guides/sending-messages.mdx,api/groups.mdxin the Mintlify previewget_push_name/get_pn/get_lidaccessor names or oldSendOptions { ... }struct-literal examplesGenerated by Claude Code
Summary by cubic
Updates docs to match the API ergonomics pass in
whatsapp_rust(#1089). Renames client accessors, switches examples to builder-style options, adds crate-root import paths, documents#[must_use], and expandsquery_infovsget_metadataguidance.Client::get_push_name/get_pn/get_lid→push_name/pn/lid; examples updated.SendOptions/EditOptionsvia::default().with_*(now#[non_exhaustive]); all examples updated.SendOptionssnippet now shows#[derive(Debug, Clone, Default)].whatsapp_rust::{Polls, PollOptionResult, PollVoteCiphertext, EncType, MexGraphQLError}; fixed stale wording in the polls note.#[must_use]onBotBuilder(warns if unused) andBotHandle(dropping aborts;.awaitor call.shutdown()/.abort()).query_info(cached, slim) for routing/encryption; useget_metadata(network, full) for display/auditing; added a clear comparison in the groups reference.Written for commit 61ec878. Summary will update on new commits.