From 7772e26a8c766c2606b40f4260e406cd3ed56435 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 14 Feb 2021 11:38:44 +0100 Subject: XEP-0027: API changes - ``get_keyids`` and ``get_keyid`` are now coroutines. - ``set_keyid`` and ``del_keyid`` now return a Future. --- docs/api/plugins/xep_0027.rst | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'docs/api/plugins/xep_0027.rst') diff --git a/docs/api/plugins/xep_0027.rst b/docs/api/plugins/xep_0027.rst index 418baada..566c9427 100644 --- a/docs/api/plugins/xep_0027.rst +++ b/docs/api/plugins/xep_0027.rst @@ -9,6 +9,48 @@ XEP-0027: Current Jabber OpenPGP Usage :exclude-members: session_bind, plugin_init, plugin_end +Internal API methods +-------------------- + +The default API here is managing a JID→Keyid dict in-memory. + +.. glossary:: + + get_keyid + - **jid**: :class:`~.JID` to get. + - **node**: unused + - **ifrom**: unused + - **args**: unused + - **returns**: ``Optional[str]``, the keyid or None + + Get the KeyiD for a JID, None if it is not found. + + set_keyid + - **jid**: :class:`~.JID` to set the id for. + - **node**: unused + - **ifrom**: unused + - **args**: ``str``, keyid to set + + Set the KeyiD for a JID. + + del_keyid + - **jid**: :class:`~.JID` to delete from the mapping. + - **node**: unused + - **ifrom**: unused + - **args**: unused + + Delete the KeyiD for a JID. + + get_keyids + - **jid**: unused + - **node**: unused + - **ifrom**: unused + - **args**: unused + - **returns**: ``Dict[JID, str]`` the full internal mapping + + Get all currently stored KeyIDs. + + Stanza elements --------------- -- cgit v1.2.3 From 9927e69435e4e451722184d5b73107554a4df5c6 Mon Sep 17 00:00:00 2001 From: mathieui Date: Fri, 26 Feb 2021 00:07:47 +0100 Subject: docs: add references to API docs --- docs/api/plugins/xep_0027.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs/api/plugins/xep_0027.rst') diff --git a/docs/api/plugins/xep_0027.rst b/docs/api/plugins/xep_0027.rst index 566c9427..3a7fb561 100644 --- a/docs/api/plugins/xep_0027.rst +++ b/docs/api/plugins/xep_0027.rst @@ -9,6 +9,8 @@ XEP-0027: Current Jabber OpenPGP Usage :exclude-members: session_bind, plugin_init, plugin_end +.. _api-0027: + Internal API methods -------------------- -- cgit v1.2.3