Annotate API scripts.
This commit is contained in:
parent
28b697ac9d
commit
43bf07bf15
3 changed files with 13 additions and 4 deletions
|
@ -26,6 +26,8 @@ import sys
|
|||
import os
|
||||
import optparse
|
||||
|
||||
from typing import Any, Dict
|
||||
|
||||
usage = """print-messages --user=<bot's email address> --api-key=<bot's api key> [options]
|
||||
|
||||
Prints out each message received by the indicated bot or user.
|
||||
|
@ -44,6 +46,7 @@ parser.add_option_group(zulip.generate_option_group(parser))
|
|||
client = zulip.init_from_options(options)
|
||||
|
||||
def print_message(message):
|
||||
# type: (Dict[str, Any]) -> None
|
||||
print(message)
|
||||
|
||||
# This is a blocking call, and will continuously poll for new messages
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue