summaryrefslogtreecommitdiff
path: root/slixmpp/plugins/xep_0128/extended_disco.py
diff options
context:
space:
mode:
authorLink Mauve <linkmauve@linkmauve.fr>2020-12-10 19:45:30 +0100
committerLink Mauve <linkmauve@linkmauve.fr>2020-12-10 19:45:30 +0100
commit1e2d15b8f58249b31dd5882772d58add1369fc37 (patch)
tree6d39e5fc8241884acf30b209a07ef4cabd80c323 /slixmpp/plugins/xep_0128/extended_disco.py
parentd37182804102682a715df43c48a6d874835cd71a (diff)
parent155fc58a22d631746436a81119a94c80d6ea2d2b (diff)
downloadslixmpp-1e2d15b8f58249b31dd5882772d58add1369fc37.tar.gz
slixmpp-1e2d15b8f58249b31dd5882772d58add1369fc37.tar.bz2
slixmpp-1e2d15b8f58249b31dd5882772d58add1369fc37.tar.xz
slixmpp-1e2d15b8f58249b31dd5882772d58add1369fc37.zip
Merge branch 'docs-event-sphinx-plugins' into 'master'
Docs: add more events, add plugins to the doc See merge request poezio/slixmpp!84
Diffstat (limited to 'slixmpp/plugins/xep_0128/extended_disco.py')
-rw-r--r--slixmpp/plugins/xep_0128/extended_disco.py45
1 files changed, 19 insertions, 26 deletions
diff --git a/slixmpp/plugins/xep_0128/extended_disco.py b/slixmpp/plugins/xep_0128/extended_disco.py
index bf3971e3..ae4f149a 100644
--- a/slixmpp/plugins/xep_0128/extended_disco.py
+++ b/slixmpp/plugins/xep_0128/extended_disco.py
@@ -8,8 +8,10 @@
import logging
+from typing import Optional
+
import slixmpp
-from slixmpp import Iq
+from slixmpp import Iq, JID
from slixmpp.xmlstream import register_stanza_plugin
from slixmpp.plugins import BasePlugin
from slixmpp.plugins.xep_0004 import Form
@@ -27,16 +29,9 @@ class XEP_0128(BasePlugin):
Also see <http://www.xmpp.org/extensions/xep-0128.html>.
- Attributes:
- disco -- A reference to the XEP-0030 plugin.
- static -- Object containing the default set of static
- node handlers.
- xmpp -- The main Slixmpp object.
-
- Methods:
- set_extended_info -- Set extensions to a disco#info result.
- add_extended_info -- Add an extension to a disco#info result.
- del_extended_info -- Remove all extensions from a disco#info result.
+ :var disco: A reference to the XEP-0030 plugin.
+ :var static: Object containing the default set of static
+ node handlers.
"""
name = 'xep_0128'
@@ -67,12 +62,11 @@ class XEP_0128(BasePlugin):
Replaces any existing extended information.
- Arguments:
- jid -- The JID to modify.
- node -- The node to modify.
- data -- Either a form, or a list of forms to use
- as extended information, replacing any
- existing extensions.
+ :param jid: The JID to modify.
+ :param node: The node to modify.
+ :param data: Either a form, or a list of forms to use
+ as extended information, replacing any
+ existing extensions.
"""
self.api['set_extended_info'](jid, node, None, kwargs)
@@ -80,20 +74,19 @@ class XEP_0128(BasePlugin):
"""
Add additional, extended identity information to a node.
- Arguments:
- jid -- The JID to modify.
- node -- The node to modify.
- data -- Either a form, or a list of forms to add
- as extended information.
+ :param jid: The JID to modify.
+ :param node: The node to modify.
+ :param data: Either a form, or a list of forms to add
+ as extended information.
"""
self.api['add_extended_info'](jid, node, None, kwargs)
- def del_extended_info(self, jid=None, node=None, **kwargs):
+ def del_extended_info(self, jid: Optional[JID] = None,
+ node: Optional[str] = None, **kwargs):
"""
Remove all extended identity information to a node.
- Arguments:
- jid -- The JID to modify.
- node -- The node to modify.
+ :param jid: The JID to modify.
+ :param node: The node to modify.
"""
self.api['del_extended_info'](jid, node, None, kwargs)