plugin XEP-0060: fix get_items docstring.
This commit is contained in:
parent
8d4120fb8a
commit
edc77d1517
1 changed files with 17 additions and 6 deletions
|
|
@ -987,20 +987,31 @@ class XEP_0060:
|
||||||
"""Retrieve pubsub items from a node.
|
"""Retrieve pubsub items from a node.
|
||||||
|
|
||||||
@param service: pubsub service.
|
@param service: pubsub service.
|
||||||
|
If None, use profile's PEP.
|
||||||
@param node: node id.
|
@param node: node id.
|
||||||
@param max_items: optional limit on the number of retrieved items.
|
@param max_items: optional limit on the number of retrieved items.
|
||||||
|
Can't be used with MAM.
|
||||||
@param item_ids (list[str]): identifiers of the items to be retrieved (can't be
|
@param item_ids (list[str]): identifiers of the items to be retrieved (can't be
|
||||||
used with rsm_request). If requested items don't exist, they won't be
|
used with rsm_request). If requested items don't exist, they won't be
|
||||||
returned, meaning that we can have an empty list as result (NotFound
|
returned, meaning that we can have an empty list as result (NotFound
|
||||||
exception is NOT raised).
|
exception is NOT raised).
|
||||||
@param sub_id : optional subscription identifier.
|
@param sub_id : optional subscription identifier.
|
||||||
@param rsm_request: RSM request data
|
@param rsm_request: RSM request data
|
||||||
@return: a deferred tuple containing:
|
@param extra: extra data, with the following keys:
|
||||||
- list of items
|
- mam: MAM query (dict) to retrieve archives instead of pubsub items
|
||||||
- metadata with the following keys:
|
- order_by: ordering of the pubsub items
|
||||||
- rsm_first, rsm_last, rsm_count, rsm_index: first, last, count and index
|
- subscribe: if True, subscribe to the node
|
||||||
value of RSMResponse
|
- encrypted: encrypted metadata to add to the result
|
||||||
- service, node: service and node used
|
@return: a tuple containing:
|
||||||
|
- list of items (domish elements)
|
||||||
|
- metadata dict with the following keys:
|
||||||
|
- service: service JID used
|
||||||
|
- node: node used
|
||||||
|
- uri: node URI
|
||||||
|
- rsm: RSM response data (first, last, index, count), if ``rsm_request``
|
||||||
|
is set
|
||||||
|
- complete, stable: MAM completeness data, if MAM is used
|
||||||
|
- encrypted: if present in ``extra``
|
||||||
"""
|
"""
|
||||||
if rsm_request is not None:
|
if rsm_request is not None:
|
||||||
# For the moment we convert RSMRequest to tx_xmpp rsm.RSMRequest for backward
|
# For the moment we convert RSMRequest to tx_xmpp rsm.RSMRequest for backward
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue