summaryrefslogtreecommitdiff
path: root/doc/domains.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/domains.rst')
-rw-r--r--doc/domains.rst40
1 files changed, 23 insertions, 17 deletions
diff --git a/doc/domains.rst b/doc/domains.rst
index bd99a4c5..e75d3e5e 100644
--- a/doc/domains.rst
+++ b/doc/domains.rst
@@ -316,35 +316,41 @@ The field names must consist of one of these keywords and an argument (except
for ``returns`` and ``rtype``, which do not need an argument). This is best
explained by an example::
- .. py:function:: format_exception(etype, value, tb[, limit=None])
+ .. py:function:: send_message(sender, recipient, message_body, [priority=1])
- Format the exception with a traceback.
+ Send a message to a recipient
- :param etype: exception type
- :param value: exception value
- :param tb: traceback object
- :param limit: maximum number of stack frames to show
- :type limit: integer or None
- :rtype: list of strings
+ :param str sender: The person sending the message
+ :param str recipient: The recipient of the message
+ :param str message_body: The body of the message
+ :param priority: The priority of the message, can be a number 1-5
+ :type priority: integer or None
+ :return: the message id
+ :rtype: int
+ :raises ValueError: if the message_body exceeds 160 characters
+ :raises TypeError: if the message_body is not a basestring
This will render like this:
- .. py:function:: format_exception(etype, value, tb[, limit=None])
+ .. py:function:: send_message(sender, recipient, message_body, [priority=1])
:noindex:
- Format the exception with a traceback.
+ Send a message to a recipient
- :param etype: exception type
- :param value: exception value
- :param tb: traceback object
- :param limit: maximum number of stack frames to show
- :type limit: integer or None
- :rtype: list of strings
+ :param str sender: The person sending the message
+ :param str recipient: The recipient of the message
+ :param str message_body: The body of the message
+ :param priority: The priority of the message, can be a number 1-5
+ :type priority: integer or None
+ :return: the message id
+ :rtype: int
+ :raises ValueError: if the message_body exceeds 160 characters
+ :raises TypeError: if the message_body is not a basestring
It is also possible to combine parameter type and description, if the type is a
single word, like this::
- :param integer limit: maximum number of stack frames to show
+ :param int priority: The priority of the message, can be a number 1-5
.. _python-roles: