parent
9d683e4669
commit
86729a862c
14 changed files with 44 additions and 41 deletions
|
@ -29,7 +29,9 @@ usage = """create-user --new-email=<email address> --new-password=<password> --n
|
|||
Create a user. You must be a realm admin to use this API, and the user
|
||||
will be created in your realm.
|
||||
|
||||
Example: create-user --site=http://localhost:9991 --user=rwbarton@example.com --new-email=jarthur@example.com --new-password=random17 --new-full-name 'J. Arthur Random' --new-short-name='jarthur'
|
||||
Example: create-user --new-email=jarthur@example.com --new-password=random17 --new-full-name 'J. Arthur Random' --new-short-name='jarthur'
|
||||
|
||||
Specify your Zulip API credentials and server in a ~/.zuliprc file or using the options.
|
||||
"""
|
||||
|
||||
import zulip
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
from __future__ import print_function
|
||||
import argparse
|
||||
|
||||
usage = """edit-message [options] --message=<msg_id> --subject=<new subject> --content=<new content> --user=<sender's email address> --api-key=<sender's api key>
|
||||
usage = """edit-message [options] --message=<msg_id> --subject=<new subject> --content=<new content>
|
||||
|
||||
Edits a message that you sent
|
||||
|
||||
Example: edit-message --message-id="348135" --subject="my subject" --content="test message" --user=othello-bot@example.com --api-key=a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5
|
||||
Example: edit-message --message-id="348135" --subject="my subject" --content="test message"
|
||||
|
||||
You can omit --user and --api-key arguments if you have a properly set up ~/.zuliprc
|
||||
Specify your Zulip API credentials and server in a ~/.zuliprc file or using the options.
|
||||
"""
|
||||
|
||||
import zulip
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
from __future__ import print_function
|
||||
import argparse
|
||||
|
||||
usage = """get-public-streams --user=<bot's email address> --api-key=<bot's api key> [options]
|
||||
usage = """get-public-streams [options]
|
||||
|
||||
Prints out all the public streams in the realm.
|
||||
|
||||
Example: get-public-streams --user=othello-bot@example.com --api-key=a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5
|
||||
Example: get-public-streams
|
||||
|
||||
You can omit --user and --api-key arguments if you have a properly set up ~/.zuliprc
|
||||
Specify your Zulip API credentials and server in a ~/.zuliprc file or using the options.
|
||||
"""
|
||||
|
||||
import zulip
|
||||
|
|
|
@ -24,11 +24,13 @@
|
|||
from __future__ import print_function
|
||||
import argparse
|
||||
|
||||
usage = """list-members --user=<bot's email address> --api-key=<bot's api key> [options]
|
||||
usage = """list-members [options]
|
||||
|
||||
List the names and e-mail addresses of the people in your realm.
|
||||
|
||||
You can omit --user and --api-key arguments if you have a properly set up ~/.zuliprc
|
||||
Example: list-members
|
||||
|
||||
Specify your Zulip API credentials and server in a ~/.zuliprc file or using the options.
|
||||
"""
|
||||
|
||||
import zulip
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
from __future__ import print_function
|
||||
import argparse
|
||||
|
||||
usage = """list-subscriptions --user=<bot's email address> --api-key=<bot's api key> [options]
|
||||
usage = """list-subscriptions [options]
|
||||
|
||||
Prints out a list of the user's subscriptions.
|
||||
|
||||
Example: list-subscriptions --user=username@example.com --api-key=a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5
|
||||
Example: list-subscriptions
|
||||
|
||||
You can omit --user and --api-key arguments if you have a properly set up ~/.zuliprc
|
||||
Specify your Zulip API credentials and server in a ~/.zuliprc file or using the options.
|
||||
"""
|
||||
|
||||
import zulip
|
||||
|
|
|
@ -26,13 +26,13 @@ import argparse
|
|||
|
||||
from typing import Any, Dict
|
||||
|
||||
usage = """print-events --user=<bot's email address> --api-key=<bot's api key> [options]
|
||||
usage = """print-events [options]
|
||||
|
||||
Prints out certain events received by the indicated bot or user matching the filter below.
|
||||
|
||||
Example: print-events --user=username@example.com --api-key=a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5
|
||||
Example: print-events
|
||||
|
||||
You can omit --user and --api-key arguments if you have a properly set up ~/.zuliprc
|
||||
Specify your Zulip API credentials and server in a ~/.zuliprc file or using the options.
|
||||
"""
|
||||
|
||||
import zulip
|
||||
|
|
|
@ -26,13 +26,13 @@ import argparse
|
|||
|
||||
from typing import Any, Dict
|
||||
|
||||
usage = """print-messages --user=<bot's email address> --api-key=<bot's api key> [options]
|
||||
usage = """print-messages [options]
|
||||
|
||||
Prints out each message received by the indicated bot or user.
|
||||
|
||||
Example: print-messages --user=username@example.com --api-key=a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5
|
||||
Example: print-messages
|
||||
|
||||
You can omit --user and --api-key arguments if you have a properly set up ~/.zuliprc
|
||||
Specify your Zulip API credentials and server in a ~/.zuliprc file or using the options.
|
||||
"""
|
||||
|
||||
import zulip
|
||||
|
|
|
@ -25,13 +25,13 @@ from __future__ import print_function
|
|||
import json
|
||||
import argparse
|
||||
|
||||
usage = """recent-messages [options] --count=<no. of previous messages> --user=<sender's email address> --api-key=<sender's api key>
|
||||
usage = """recent-messages [options] --count=<no. of previous messages>
|
||||
|
||||
Prints out last count messages received by the indicated bot or user
|
||||
Prints out last count messages received by the bot or user used for authentication.
|
||||
|
||||
Example: recent-messages --count=101 --user=username@example.com --api-key=a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5
|
||||
Example: recent-messages --count=101
|
||||
|
||||
You can omit --user and --api-key arguments if you have a properly set up ~/.zuliprc
|
||||
Specify your Zulip API credentials and server in a ~/.zuliprc file or using the options.
|
||||
"""
|
||||
|
||||
import zulip
|
||||
|
|
|
@ -25,14 +25,14 @@ from __future__ import print_function
|
|||
import sys
|
||||
import argparse
|
||||
|
||||
usage = """subscribe --user=<bot's email address> --api-key=<bot's api key> [options] --streams=<streams>
|
||||
usage = """subscribe [options] --streams=<streams>
|
||||
|
||||
Ensures the user is subscribed to the listed streams.
|
||||
|
||||
Examples: subscribe --user=username@example.com --api-key=a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5 --streams=foo
|
||||
subscribe --user=username@example.com --api-key=a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5 --streams='foo bar'
|
||||
Examples: subscribe --streams=foo
|
||||
subscribe --streams='foo bar'
|
||||
|
||||
You can omit --user and --api-key arguments if you have a properly set up ~/.zuliprc
|
||||
Specify your Zulip API credentials and server in a ~/.zuliprc file or using the options.
|
||||
"""
|
||||
|
||||
import zulip
|
||||
|
|
|
@ -25,14 +25,14 @@ from __future__ import print_function
|
|||
import sys
|
||||
import argparse
|
||||
|
||||
usage = """unsubscribe --user=<bot's email address> --api-key=<bot's api key> [options] --streams=<streams>
|
||||
usage = """unsubscribe [options] --streams=<streams>
|
||||
|
||||
Ensures the user is not subscribed to the listed streams.
|
||||
|
||||
Examples: unsubscribe --user=username@example.com --api-key=a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5 --streams=foo
|
||||
unsubscribe --user=username@example.com --api-key=a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5 --streams='foo bar'
|
||||
Examples: unsubscribe --streams=foo
|
||||
unsubscribe --streams='foo bar'
|
||||
|
||||
You can omit --user and --api-key arguments if you have a properly set up ~/.zuliprc
|
||||
Specify your Zulip API credentials and server in a ~/.zuliprc file or using the options.
|
||||
"""
|
||||
|
||||
import zulip
|
||||
|
|
|
@ -31,13 +31,13 @@ import zulip
|
|||
class StringIO(_StringIO):
|
||||
name = '' # https://github.com/python/typeshed/issues/598
|
||||
|
||||
usage = """upload-file --user=<user's email address> --api-key=<user's api key> [options]
|
||||
usage = """upload-file [options]
|
||||
|
||||
Upload a file, and print the corresponding URI.
|
||||
|
||||
Example: upload-file --user=cordelia@zulip.com --api-key=a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5 --file-path=cat.png
|
||||
Example: upload-file --file-path=cat.png
|
||||
|
||||
You can omit --user and --api-key arguments if you have a properly set up ~/.zuliprc
|
||||
Specify your Zulip API credentials and server in a ~/.zuliprc file or using the options.
|
||||
If no --file-path is specified, a placeholder text file will be used instead.
|
||||
"""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue