comparison libervia_server/__init__.py @ 389:2d782349b88a

server_side: display blog comments when you click on a main item header or title
author souliane <souliane@mailoo.org>
date Tue, 25 Feb 2014 17:50:47 +0100
parents b96b8b666d17
children c86d7a8d2c1e
comparison
equal deleted inserted replaced
388:893451e35686 389:2d782349b88a
277 profile = ISATSession(self.session).profile 277 profile = ISATSession(self.session).profile
278 if node and text: 278 if node and text:
279 return self.sat_host.bridge.sendGroupBlogComment(node, text, extra, profile) 279 return self.sat_host.bridge.sendGroupBlogComment(node, text, extra, profile)
280 else: 280 else:
281 raise Exception("Invalid data") 281 raise Exception("Invalid data")
282
283 def jsonrpc_getMblogs(self, publisher_jid, item_ids):
284 """Get specified microblogs posted by a contact
285 @param publisher_jid: jid of the publisher
286 @param item_ids: list of microblogs items IDs
287 @return list of microblog data (dict)"""
288 profile = ISATSession(self.session).profile
289 d = self.asyncBridgeCall("getGroupBlogs", publisher_jid, item_ids, profile)
290 return d
291
292 def jsonrpc_getMblogsWithComments(self, publisher_jid, item_ids):
293 """Get specified microblogs posted by a contact and their comments
294 @param publisher_jid: jid of the publisher
295 @param item_ids: list of microblogs items IDs
296 @return list of couple (microblog data, list of microblog data)"""
297 profile = ISATSession(self.session).profile
298 d = self.asyncBridgeCall("getGroupBlogsWithComments", publisher_jid, item_ids, profile)
299 return d
282 300
283 def jsonrpc_getLastMblogs(self, publisher_jid, max_item): 301 def jsonrpc_getLastMblogs(self, publisher_jid, max_item):
284 """Get last microblogs posted by a contact 302 """Get last microblogs posted by a contact
285 @param publisher_jid: jid of the publisher 303 @param publisher_jid: jid of the publisher
286 @param max_item: number of items to ask 304 @param max_item: number of items to ask