XEP-0054: API changes

- ``get_vcard``, ``publish_vcard`` are now coroutines.
This commit is contained in:
mathieui
2021-02-14 11:47:20 +01:00
parent d17967f58e
commit f7ecce42ac
2 changed files with 55 additions and 19 deletions

View File

@@ -8,6 +8,38 @@ XEP-0054: vcard-temp
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Internal API methods
--------------------
This plugin maintains by default an in-memory cache of the received
VCards.
.. glossary::
set_vcard
- **jid**: :class:`~.JID` of whom to set the vcard
- **node**: unused
- **ifrom**: unused
- **args**: :class:`~.VCardTemp` object to store for this JID.
Set a VCard for a JID.
get_vcard
- **jid**: :class:`~.JID` of whom to set the vcard
- **node**: unused
- **ifrom**: :class:`~.JID` the request is coming from
- **args**: unused
- **returns**: :class:`~.VCardTemp` object for this JID or None.
Get a stored VCard for a JID.
del_vcard
- **jid**: :class:`~.JID` of whom to set the vcard
- **node**: unused
- **ifrom**: unused
- **args**: unused
Delete a stored VCard for a JID.
Stanza elements
---------------