changeset 724:994be887e843

browser and server sides: bridge method mbGetLast has been renamed to mbGet and takes a new parameter "item_ids"
author souliane <souliane@mailoo.org>
date Thu, 10 Sep 2015 07:40:59 +0200
parents afbe061b2d66
children c1abaa91a121
files src/browser/sat_browser/json.py src/server/server.py
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/browser/sat_browser/json.py	Wed Aug 26 09:15:56 2015 +0200
+++ b/src/browser/sat_browser/json.py	Thu Sep 10 07:40:59 2015 +0200
@@ -172,7 +172,7 @@
         LiberviaJsonProxy.__init__(self, "/json_api",
                         ["getContacts", "addContact", "sendMessage",
                          "psDeleteNode", "psRetractItem", "psRetractItems",
-                         "mbSend", "mbRetract", "mbGetLast", "mbGetFromMany", "mbGetFromManyRTResult",
+                         "mbSend", "mbRetract", "mbGet", "mbGetFromMany", "mbGetFromManyRTResult",
                          "mbGetFromManyWithComments", "mbGetFromManyWithCommentsRTResult",
                          "getHistory", "getPresenceStatuses", "joinMUC", "mucLeave", "getRoomsJoined",
                          "getRoomsSubjects", "inviteMUC", "launchTarotGame", "getTarotCardsPaths", "tarotGameReady",
--- a/src/server/server.py	Wed Aug 26 09:15:56 2015 +0200
+++ b/src/server/server.py	Thu Sep 10 07:40:59 2015 +0200
@@ -315,17 +315,18 @@
         profile = ISATSession(self.session).profile
         return self.asyncBridgeCall("mbRetract", service, node, items, profile)
 
-    def jsonrpc_mbGetLast(self, service_jid, node, max_items, extra):
+    def jsonrpc_mbGet(self, service_jid, node, max_items, item_ids, extra):
         """Get last microblogs from publisher_jid
 
         @param service_jid (unicode): pubsub service, usually publisher jid
         @param node(unicode): mblogs node, or empty string to get the defaut one
         @param max_items (int): maximum number of item to get or C.NO_LIMIT to get everything
+        @param item_ids (list[unicode]): list of item IDs
         @param rsm (dict): TODO
         @return: a deferred couple with the list of items and metadatas.
         """
         profile = ISATSession(self.session).profile
-        return self.asyncBridgeCall("mbGetLast", service_jid, node, max_items, extra, profile)
+        return self.asyncBridgeCall("mbGet", service_jid, node, max_items, item_ids, extra, profile)
 
     def jsonrpc_mbGetFromMany(self, publishers_type, publishers, max_items, extra):
         """Get many blog nodes at once