about summary refs log tree commit diff stats
path: root/apidocs/python/src/prof.py
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2017-01-21 20:23:28 +0000
committerJames Booth <boothj5@gmail.com>2017-01-21 20:23:28 +0000
commit7090f85d853b32ac6799bdc5641cd81502ff65dc (patch)
treed1868c5f1f502a10753f702837ac8a48a2bc2832 /apidocs/python/src/prof.py
parent9cfd17821c427ae2c129842b5f626fbdb3a73a67 (diff)
downloadprofani-tty-7090f85d853b32ac6799bdc5641cd81502ff65dc.tar.gz
Add chat and room show calls to plugins api
Diffstat (limited to 'apidocs/python/src/prof.py')
-rw-r--r--apidocs/python/src/prof.py90
1 files changed, 88 insertions, 2 deletions
diff --git a/apidocs/python/src/prof.py b/apidocs/python/src/prof.py
index 35981473..6c80e2f2 100644
--- a/apidocs/python/src/prof.py
+++ b/apidocs/python/src/prof.py
@@ -31,7 +31,7 @@ def cons_show(message):
 
 def cons_show_themed(group, key, default, message): 
     """Show a message in the console, using the specified theme.\n
-    Themes can be must be specified in ``~/.local/share/profanity/plugin_themes``
+    Themes are specified in ``~/.local/share/profanity/plugin_themes``
 
     :param group: the group name in the themes file
     :param key: the item name within the group
@@ -376,7 +376,7 @@ def win_show(tag, message):
 
 def win_show_themed(tag, group, key, default, message): 
     """Show a message in the plugin window, using the specified theme.\n
-    Themes must be specified in ``~/.local/share/profanity/plugin_themes``
+    Themes are specified in ``~/.local/share/profanity/plugin_themes``
 
     :param tag: The tag of the window to display the message
     :type tag: str or unicode
@@ -797,3 +797,89 @@ def room_unset_message_char(roomjid):
         prof.room_unset_message_char("ohnoes@conference.chat.org")
     """
     pass
+
+
+def chat_show(barejid, message):
+    """Show a message in a chat window.
+
+    :param barejid: Jabber ID of the recipient
+    :param message: the message to print
+    :type barejid: str or unicode
+    :type message: str or unicode
+    :return: ``True`` if the message was printed, ``False`` otherwise
+    :rtype: boolean
+
+    Example:
+    ::
+        prof.chat_show("bob@server.org", "From a plugin in the chat window for bob")
+    """
+    pass
+
+
+def chat_show_themed(barejid, group, key, default, ch, message):
+    """Show a message a chat window, using the specified theme and prefix character.\n
+    Themes are specified in ``~/.local/share/profanity/plugin_themes``
+
+    :param barejid: Jabber ID of the recipient
+    :param group: the group name in the themes file or ``None``
+    :param key: the item name within the group or ``None``
+    :param default: default colour if the theme cannot be found or ``None``
+    :param ch: The prefix character to show, or ``None`` for default behaviour
+    :param message: the message to print
+    :type barejid: str or unicode
+    :type group: str, unicode or None
+    :type key: str, unicode or None
+    :type default: str, unicode or None
+    :type ch: str or unicode
+    :type message: str or unicode
+    :return: ``True`` if the message was printed, ``False`` otherwise
+    :rtype: boolean
+
+    Example:
+    ::
+        prof.chat_show_themed("bob@server.org", "myplugin", "text", None, "!", "Plugin themed message")
+    """
+    pass
+
+
+def room_show(roomjid, message):
+    """Show a message in a chat room window.
+
+    :param roomjid: Jabber ID of the room
+    :param message: the message to print
+    :type roomjid: str or unicode
+    :type message: str or unicode
+    :return: ``True`` if the message was printed, ``False`` otherwise
+    :rtype: boolean
+
+    Example:
+    ::
+        prof.room_show("chat@conference.chat.org", "From a plugin in the chat room window")
+    """
+    pass
+
+
+def room_show_themed(roomjid, group, key, default, ch, message):
+    """Show a message a chat room window, using the specified theme and prefix character.\n
+    Themes are specified in ``~/.local/share/profanity/plugin_themes``
+
+    :param roomjid: Jabber ID of the room
+    :param group: the group name in the themes file or ``None``
+    :param key: the item name within the group or ``None``
+    :param default: default colour if the theme cannot be found or ``None``
+    :param ch: The prefix character to show, or ``None`` for default behaviour
+    :param message: the message to print
+    :type roomjid: str or unicode
+    :type group: str, unicode or None
+    :type key: str, unicode or None
+    :type default: str, unicode or None
+    :type ch: str or unicode
+    :type message: str or unicode
+    :return: ``True`` if the message was printed, ``False`` otherwise
+    :rtype: boolean
+
+    Example:
+    ::
+        prof.room_show_themed("chat@conference.chat.org", "myplugin", "text", None, "!", "Plugin themed message")
+    """
+    pass