From e3173bafa985b73ea0bb68dd29158b692138a1bb Mon Sep 17 00:00:00 2001 From: elliot-100 <3186037+elliot-100@users.noreply.github.com> Date: Sun, 15 Mar 2026 11:38:07 +0000 Subject: [PATCH] feat: add posts summary to `manual_test_functions.py` --- examples/manual_test_functions.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/examples/manual_test_functions.py b/examples/manual_test_functions.py index cb2d6ae..962c7de 100644 --- a/examples/manual_test_functions.py +++ b/examples/manual_test_functions.py @@ -16,6 +16,7 @@ MAX_EVENTS = 10 MAX_CHATS = 10 +MAX_POSTS = 10 MAX_TRANSACTIONS = 10 @@ -50,6 +51,13 @@ async def main() -> None: for i, chat in enumerate(chats): print(f"[{i}] {_chat_summary(chat)}") + # Posts + print(f"\nGetting up to {MAX_POSTS} posts...") + posts = await s.get_posts(max_posts=MAX_POSTS) + print(f"{len(posts)} posts:") + for i, post in enumerate(posts): + print(f"[{i}] {_post_summary(post)}") + # Attendance export print("\nGetting attendance report for the first event...") e = events[0] @@ -109,6 +117,12 @@ def _chat_summary(chat: JSONDict) -> str: ) +def _post_summary(post: JSONDict) -> str: + return ( + f"id='{post['id']}', timestamp='{post['timestamp']}', title='{post['title']}'" + ) + + def _transaction_summary(transaction: JSONDict) -> str: return ( f"id='{transaction['id']}', "