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']}', "