thunderbird_accounts.subscription.mailchimp

Classes

MailchimpClient()

Thin client for the Mailchimp Marketing API v3 list endpoints.

class thunderbird_accounts.subscription.mailchimp.MailchimpClient[source]

Bases: object

Thin client for the Mailchimp Marketing API v3 list endpoints.

__init__()[source]
add_or_tag_member(email: str, tag: str, *, language: str, error_context: dict | None = None) → None[source]

Add a list member or apply a tag if they are already subscribed.

remove_tag_from_member(email: str, tag: str, *, error_context: dict | None = None) → None[source]

Remove a tag from an existing list member.

Best-effort: silently returns if the member does not exist or the tag is not present. Errors during the remove request are logged and captured in Sentry but never raised so that callers are not blocked by cleanup failures.