Skip to content

Commit 2a90e93

Browse files
authored
feat: Add html/text columns for broadcasts (#169)
1 parent 79f1af6 commit 2a90e93

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

resend/broadcasts/_broadcast.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,11 @@ class Broadcast(_FromParam):
5656
"""
5757
The date and time the broadcast was sent.
5858
"""
59+
html: Union[str, None]
60+
"""
61+
The HTML content of the broadcast.
62+
"""
63+
text: Union[str, None]
64+
"""
65+
The plain text content of the broadcast.
66+
"""

resend/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "2.16.0"
1+
__version__ = "2.17.0"
22

33

44
def get_version() -> str:

tests/broadcasts_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ def test_broadcasts_get(self) -> None:
4545
"created_at": "2024-12-01T19:32:22.980Z",
4646
"scheduled_at": None,
4747
"sent_at": None,
48+
"html": "<p>Hello World</p>",
49+
"text": "Hello World",
4850
}
4951
)
5052

@@ -60,6 +62,8 @@ def test_broadcasts_get(self) -> None:
6062
assert broadcast["created_at"] == "2024-12-01T19:32:22.980Z"
6163
assert broadcast["scheduled_at"] is None
6264
assert broadcast["sent_at"] is None
65+
assert broadcast["html"] == "<p>Hello World</p>"
66+
assert broadcast["text"] == "Hello World"
6367

6468
def test_broadcasts_send(self) -> None:
6569
self.set_mock_json({"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e791"})

0 commit comments

Comments
 (0)