comparison src/server/server.py @ 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 5745b5e6586a
children 03ccd68a6dab
comparison
equal deleted inserted replaced
723:afbe061b2d66 724:994be887e843
313 @param items (iterable): ids of items to retract 313 @param items (iterable): ids of items to retract
314 """ 314 """
315 profile = ISATSession(self.session).profile 315 profile = ISATSession(self.session).profile
316 return self.asyncBridgeCall("mbRetract", service, node, items, profile) 316 return self.asyncBridgeCall("mbRetract", service, node, items, profile)
317 317
318 def jsonrpc_mbGetLast(self, service_jid, node, max_items, extra): 318 def jsonrpc_mbGet(self, service_jid, node, max_items, item_ids, extra):
319 """Get last microblogs from publisher_jid 319 """Get last microblogs from publisher_jid
320 320
321 @param service_jid (unicode): pubsub service, usually publisher jid 321 @param service_jid (unicode): pubsub service, usually publisher jid
322 @param node(unicode): mblogs node, or empty string to get the defaut one 322 @param node(unicode): mblogs node, or empty string to get the defaut one
323 @param max_items (int): maximum number of item to get or C.NO_LIMIT to get everything 323 @param max_items (int): maximum number of item to get or C.NO_LIMIT to get everything
324 @param item_ids (list[unicode]): list of item IDs
324 @param rsm (dict): TODO 325 @param rsm (dict): TODO
325 @return: a deferred couple with the list of items and metadatas. 326 @return: a deferred couple with the list of items and metadatas.
326 """ 327 """
327 profile = ISATSession(self.session).profile 328 profile = ISATSession(self.session).profile
328 return self.asyncBridgeCall("mbGetLast", service_jid, node, max_items, extra, profile) 329 return self.asyncBridgeCall("mbGet", service_jid, node, max_items, item_ids, extra, profile)
329 330
330 def jsonrpc_mbGetFromMany(self, publishers_type, publishers, max_items, extra): 331 def jsonrpc_mbGetFromMany(self, publishers_type, publishers, max_items, extra):
331 """Get many blog nodes at once 332 """Get many blog nodes at once
332 333
333 @param publishers_type (unicode): one of "ALL", "GROUP", "JID" 334 @param publishers_type (unicode): one of "ALL", "GROUP", "JID"