summaryrefslogtreecommitdiff
path: root/docs/howto
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2022-02-15 20:58:20 +0100
committermathieui <mathieui@mathieui.net>2022-02-15 20:58:20 +0100
commit22b00c607306c10202c41cdc02ceb633e9f91740 (patch)
tree7304c5dbd015ebfc951b6889c20db04ceb437e45 /docs/howto
parent92c3f69829fad6e77e25aab64bdbcf988d937994 (diff)
parenta50bffae890f52295e91603178597023140438ca (diff)
downloadslixmpp-22b00c607306c10202c41cdc02ceb633e9f91740.tar.gz
slixmpp-22b00c607306c10202c41cdc02ceb633e9f91740.tar.bz2
slixmpp-22b00c607306c10202c41cdc02ceb633e9f91740.tar.xz
slixmpp-22b00c607306c10202c41cdc02ceb633e9f91740.zip
Merge branch 'update-doc-yieldfrom' into 'master'
docs: remove yield from and fix some old changes See merge request poezio/slixmpp!182
Diffstat (limited to 'docs/howto')
-rw-r--r--docs/howto/guide_xep_0030.rst22
1 files changed, 11 insertions, 11 deletions
diff --git a/docs/howto/guide_xep_0030.rst b/docs/howto/guide_xep_0030.rst
index a3af4857..4b795c93 100644
--- a/docs/howto/guide_xep_0030.rst
+++ b/docs/howto/guide_xep_0030.rst
@@ -172,14 +172,14 @@ the `XEP-0059 <http://xmpp.org/extensions/xep-0059.html>`_ plug-in.
.. code-block:: python
- info = yield from self['xep_0030'].get_info(jid='foo@example.com',
- node='bar',
- ifrom='baz@mycomponent.example.com',
- timeout=30)
+ info = await self['xep_0030'].get_info(jid='foo@example.com',
+ node='bar',
+ ifrom='baz@mycomponent.example.com',
+ timeout=30)
- items = self['xep_0030'].get_info(jid='foo@example.com',
- node='bar',
- iterator=True)
+ items = await self['xep_0030'].get_items(jid='foo@example.com',
+ node='bar',
+ iterator=True)
For more examples on how to use basic disco queries, check the ``disco_browser.py``
example in the ``examples`` directory.
@@ -194,7 +194,7 @@ a full Iq stanza.
.. code-block:: python
- info = self['xep_0030'].get_info(node='foo', local=True)
- items = self['xep_0030'].get_items(jid='somejid@mycomponent.example.com',
- node='bar',
- local=True)
+ info = await self['xep_0030'].get_info(node='foo', local=True)
+ items = await self['xep_0030'].get_items(jid='somejid@mycomponent.example.com',
+ node='bar',
+ local=True)