Skip to content

docs: update for API ergonomics pass (whatsapp-rust#1089) - #431

Merged
jlucaso1 merged 2 commits into
mainfrom
claude/nifty-bohr-30r5tv
Jul 24, 2026
Merged

jlucaso1 merged 2 commits into
mainfrom
claude/nifty-bohr-30r5tv

Conversation

@jlucaso1

@jlucaso1 jlucaso1 commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

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.mdxClient::get_push_name/get_pn/get_lid renamed to push_name/pn/lid; updated the EditOptions prose reference to point at the new builder-based construction.
  • api/bot.mdx — Fixed a stale client.get_pn() call site; documented #[must_use] on BotBuilder and BotHandle (dropping BotHandle aborts the bot — the docs previously stated the opposite for the drop case).
  • api/send.mdxSendOptions and EditOptions are now #[non_exhaustive] and can no longer be built as struct literals from outside the crate; every example switched to the with_* builder pattern (SendOptions::default().with_message_id(...), etc.).
  • guides/sending-messages.mdx — Same struct-literal → builder-pattern update across all SendOptions/EditOptions examples, plus a note explaining why (#[non_exhaustive]).
  • api/polls.mdx / guides/polls.mdxPolls/PollOptionResult import examples updated to the new crate-root re-export path (whatsapp_rust::Polls instead of whatsapp_rust::features::Polls).
  • api/signal.mdx — Noted EncType is now re-exported from the crate root (whatsapp_rust::EncType), updated the example import.
  • api/mex.mdx — Noted MexGraphQLError (and siblings) are re-exported from the crate root.
  • api/groups.mdx — Added an explicit query_info vs get_metadata comparison 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

  • Spot-check rendered pages for api/client.mdx, api/bot.mdx, api/send.mdx, guides/sending-messages.mdx, api/groups.mdx in the Mintlify preview
  • Confirm no other pages reference the old get_push_name/get_pn/get_lid accessor names or old SendOptions { ... } struct-literal examples

Generated 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 expands query_info vs get_metadata guidance.

  • Migration
    • Rename Client::get_push_name/get_pn/get_lidpush_name/pn/lid; examples updated.
    • Build SendOptions/EditOptions via ::default().with_* (now #[non_exhaustive]); all examples updated. SendOptions snippet now shows #[derive(Debug, Clone, Default)].
    • Use crate-root re-exports in examples: whatsapp_rust::{Polls, PollOptionResult, PollVoteCiphertext, EncType, MexGraphQLError}; fixed stale wording in the polls note.
    • Document #[must_use] on BotBuilder (warns if unused) and BotHandle (dropping aborts; .await or call .shutdown()/.abort()).
    • Prefer query_info (cached, slim) for routing/encryption; use get_metadata (network, full) for display/auditing; added a clear comparison in the groups reference.

Written for commit 61ec878. Summary will update on new commits.

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.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jlucaso1, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 54 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 375755a1-0e25-4501-b8e9-541f13cef413

📥 Commits

Reviewing files that changed from the base of the PR and between b40bb0e and 61ec878.

📒 Files selected for processing (9)
  • api/bot.mdx
  • api/client.mdx
  • api/groups.mdx
  • api/mex.mdx
  • api/polls.mdx
  • api/send.mdx
  • api/signal.mdx
  • guides/polls.mdx
  • guides/sending-messages.mdx

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mintlify

mintlify Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
whatsapp-rust 🟢 Ready View Preview Jul 24, 2026, 6:18 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@greptile-apps

greptile-apps Bot commented Jul 24, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates documentation across nine pages to reflect the breaking API changes in whatsapp-rust#1089. All changed surfaces are covered: accessor renames, builder-pattern construction for #[non_exhaustive] structs, crate-root re-exports, corrected BotHandle drop semantics, and a new query_info vs get_metadata comparison table.

  • Accessor renames (get_push_name/get_pn/get_lidpush_name/pn/lid) are applied consistently across api/client.mdx and api/bot.mdx, with "Renamed from" migration notes added.
  • #[non_exhaustive] migration: every SendOptions { ... } and EditOptions { ... } struct-literal example in both the API reference and the guide has been converted to the ::default().with_* builder chain, and explanatory notes were added after the struct definitions.
  • Re-export notes for Polls, PollOptionResult, PollVoteCiphertext, EncType, and the Mex error types are accurate and paired with updated import examples; the legacy features:: paths are noted as still functional rather than removed.

Confidence Score: 5/5

Pure documentation update with no runtime code; all breaking changes from the upstream API pass are accurately reflected.

Every renamed accessor, struct-literal removal, import path, and behavioral correction has been applied consistently across the API reference and guides. The only open item is a note placement suggestion in the sending-messages guide that does not affect correctness.

No files require special attention; guides/sending-messages.mdx has a minor note-placement suggestion but is otherwise correct.

Important Files Changed

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

Comment thread api/polls.mdx Outdated
Comment thread api/send.mdx
- 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
@jlucaso1
jlucaso1 merged commit d5d52ae into main Jul 24, 2026
4 checks passed
@mintlify

mintlify Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
whatsapp-rust 🟡 Building Jul 24, 2026, 6:17 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants