comparison sat/plugins/plugin_xep_0277.py @ 2760:3480d4fdf83a

plugins XEP-0060, XEP-0313: implemented Order-By protoXEP: new "order_by" key can be used in extra data, value can be, for now, "creation" or "modification".
author Goffi <goffi@goffi.org>
date Sun, 06 Jan 2019 17:36:51 +0100
parents 56f94936df1e
children 003b8b4b56a7
comparison
equal deleted inserted replaced
2759:607cfc79e40f 2760:3480d4fdf83a
786 profile_key, 786 profile_key,
787 ) 787 )
788 788
789 ## get ## 789 ## get ##
790 790
791 def _mbGet( 791 def _mbGet(self, service="", node="", max_items=10, item_ids=None, extra_dict=None,
792 self, 792 profile_key=C.PROF_KEY_NONE):
793 service="",
794 node="",
795 max_items=10,
796 item_ids=None,
797 extra_dict=None,
798 profile_key=C.PROF_KEY_NONE,
799 ):
800 """ 793 """
801 @param max_items(int): maximum number of item to get, C.NO_LIMIT for no limit 794 @param max_items(int): maximum number of item to get, C.NO_LIMIT for no limit
802 @param item_ids (list[unicode]): list of item IDs 795 @param item_ids (list[unicode]): list of item IDs
803 """ 796 """
804 client = self.host.getClient(profile_key) 797 client = self.host.getClient(profile_key)
814 extra.rsm_request, 807 extra.rsm_request,
815 extra.extra, 808 extra.extra,
816 ) 809 )
817 810
818 @defer.inlineCallbacks 811 @defer.inlineCallbacks
819 def mbGet( 812 def mbGet(self, client, service=None, node=None, max_items=10, item_ids=None,
820 self, 813 rsm_request=None, extra=None):
821 client,
822 service=None,
823 node=None,
824 max_items=10,
825 item_ids=None,
826 rsm_request=None,
827 extra=None,
828 ):
829 """Get some microblogs 814 """Get some microblogs
830 815
831 @param service(jid.JID, None): jid of the publisher 816 @param service(jid.JID, None): jid of the publisher
832 None to get profile's PEP 817 None to get profile's PEP
833 @param node(unicode, None): node to get (or microblog node if None) 818 @param node(unicode, None): node to get (or microblog node if None)