Skip to content

feat: add broadcasts.cancel() method - #91

Merged
AntoniosBarotsis merged 1 commit into
mainfrom
broadcasts-cancel
Aug 12, 2026
Merged

feat: add broadcasts.cancel() method#91
AntoniosBarotsis merged 1 commit into
mainfrom
broadcasts-cancel

Conversation

@dielduarte

@dielduarte dielduarte commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds BroadcastsSvc::cancel(broadcast_id), calling POST /broadcasts/:id/cancel to cancel a queued or scheduled broadcast.
  • Adds CancelBroadcastResponse type (id) and re-exports it from lib.rs, mirroring SendBroadcastResponse/UpdateBroadcastResponse.
  • Adds a parse_cancel_broadcast_response_test deserialization test, matching the existing parse_broadcast_test pattern.

Part of the broadcast cancel rollout: resend/resend-monorepo#8126, resend/resend-openapi#85, resend/resend-node#1059, resend/resend-docs#1722, resend/resend-go#144, resend/resend-java#122, resend/resend-php#135, resend/resend-python#250, resend/resend-ruby#216.

Test plan

  • cargo check --lib --tests (default features) — clean
  • cargo clippy --lib --tests --no-default-features --features blocking,native-tls -- -D warnings — clean
  • cargo test --lib broadcasts:: — 2 passed, 3 pre-existing ignored (live-API integration tests)
  • cargo fmt --check — clean

🤖 Generated with Claude Code


Summary by cubic

Adds BroadcastsSvc::cancel() to cancel queued or scheduled broadcasts via POST /broadcasts/:id/cancel. Exposes CancelBroadcastResponse and re-exports it in lib.rs to match other broadcast responses.

  • New Features
    • Implement cancel(broadcast_id); sends POST with no body and returns CancelBroadcastResponse.
    • Add CancelBroadcastResponse { id }; re-exported from lib.rs.
    • Add parse_cancel_broadcast_response_test for deserialization.

Written for commit e49fdc3. Summary will update on new commits.

Review in cubic

Cancels a queued or scheduled broadcast via POST /broadcasts/:id/cancel,
mirroring the get/delete broadcast request shape (no body).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@klotty klotty left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Adds a new cancel() API method and response type mirroring existing broadcast methods, with a deserialization test. Additive, well-scoped change with no operational or contract tradeoffs.

Re-trigger cubic

@dielduarte
dielduarte marked this pull request as ready for review August 11, 2026 12:08
@github-actions github-actions Bot added the linear-synced PR has been synced to Linear label Aug 12, 2026
@AntoniosBarotsis
AntoniosBarotsis merged commit 6741a2d into main Aug 12, 2026
4 checks passed
@AntoniosBarotsis
AntoniosBarotsis deleted the broadcasts-cancel branch August 12, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linear-synced PR has been synced to Linear

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants