XEP-0222: Persistent Storage of Public Data via PubSub¶
- class slixmpp.plugins.xep_0222.XEP_0222(xmpp, config=None)[source]¶
XEP-0222: Persistent Storage of Public Data via PubSub
- configure(node, **iqkwargs)[source]¶
Update a node’s configuration to match the public storage profile.
- Parameters:
node (
str
) – Node to set the configuration at.- Return type:
Future
- dependencies: ClassVar[Set[str]] = {'xep_0004', 'xep_0060', 'xep_0163'}¶
Some plugins may depend on others in order to function properly. Any plugin names included in
dependencies
will be initialized as needed if this plugin is enabled.
- description: str = 'XEP-0222: Persistent Storage of Public Data via PubSub'¶
A longer name for the plugin, describing its purpose. For example, a plugin for XEP-0030 would use ‘Service Discovery’ as its description value.
- name: str = 'xep_0222'¶
A short name for the plugin based on the implemented specification. For example, a plugin for XEP-0030 would use ‘xep_0030’.
- retrieve(node, id=None, item_ids=None, **iqkwargs)[source]¶
Retrieve public data via PEP.
This is just a (very) thin wrapper around the XEP-0060 publish() method to set the defaults expected by PEP.
- Parameters:
node (
str
) – The node to retrieve content from.id (
Optional
[str
]) – Optionally specify the ID of the item.item_ids (
Optional
[List
[str
]]) – Specify a group of IDs. If id is also specified, it will be included in item_ids.
- Return type:
Future
- store(stanza, node=None, id=None, **pubsubkwargs)[source]¶
Store public data via PEP.
This is just a (very) thin wrapper around the XEP-0060 publish() method to set the defaults expected by PEP.
- Parameters:
stanza (
ElementBase
) – The public content to store.node (
Optional
[str
]) – The node to publish the content to. If not specified, the stanza’s namespace will be used.id (
Optional
[str
]) – Optionally specify the ID of the item.options – Publish options to use, which will be modified to fit the persistent storage option profile.
- Return type:
Future