Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions examples/manual_test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

MAX_EVENTS = 10
MAX_CHATS = 10
MAX_POSTS = 10
MAX_TRANSACTIONS = 10


Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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']}', "
Expand Down
Loading