Skip to content

fix: take the broadcast id as a positional argument in recipients - #264

Merged
felipefreitag merged 1 commit into
mainfrom
fix/recipients-positional-id
Aug 24, 2026
Merged

fix: take the broadcast id as a positional argument in recipients#264
felipefreitag merged 1 commit into
mainfrom
fix/recipients-positional-id

Conversation

@felipefreitag

@felipefreitag felipefreitag commented Aug 24, 2026

Copy link
Copy Markdown
Member

What

Change Broadcasts.recipients(params) to Broadcasts.recipients(id, params), and the same for recipients_async. Remove broadcast_id from RecipientsParams. Update the tests and both examples.

Why

#261 put the broadcast id inside the params dict. Every sibling GET with a path id takes a positional id: clicked_links in the same class, Attachments.list, Emails.share, Receiving.get. The old shape also forced the impl to filter the id back out of the query dict.

The method is merged but not released (no tag contains it), so the signature change is not breaking.

Verification

  • pytest --doctest-modules tests: 614 passed.
  • flake8 and mypy (CI flags): clean.
  • Live call against the real API with the new signature: type=sent returns the recipient list, the email substring filter works, and a bad id raises ResendError (404).

Summary by cubic

Make Broadcasts.recipients and recipients_async take the broadcast id as a positional argument and remove broadcast_id from RecipientsParams. This aligns recipients with other path-id GETs and simplifies query construction.

  • Bold text intended -
  • But not more than two sections possible...

Written for commit 5c2718c. Summary will update on new commits.

Review in cubic

The recipients method took broadcast_id inside the params dict.
Every sibling GET with a path id takes a positional id:
clicked_links, Attachments.list, Emails.share, Receiving.get.
Align recipients and recipients_async with that convention.

The method is merged but not released, so this is not a breaking
change.
@felipefreitag
felipefreitag merged commit 533fd9c into main Aug 24, 2026
20 checks passed
@felipefreitag
felipefreitag deleted the fix/recipients-positional-id branch August 24, 2026 17:18
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