diff 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
line wrap: on
line diff
--- a/libervia_server/__init__.py	Tue Feb 25 11:31:11 2014 +0100
+++ b/libervia_server/__init__.py	Tue Feb 25 17:50:47 2014 +0100
@@ -280,6 +280,24 @@
         else:
             raise Exception("Invalid data")
 
+    def jsonrpc_getMblogs(self, publisher_jid, item_ids):
+        """Get specified microblogs posted by a contact
+        @param publisher_jid: jid of the publisher
+        @param item_ids: list of microblogs items IDs
+        @return list of microblog data (dict)"""
+        profile = ISATSession(self.session).profile
+        d = self.asyncBridgeCall("getGroupBlogs", publisher_jid, item_ids, profile)
+        return d
+
+    def jsonrpc_getMblogsWithComments(self, publisher_jid, item_ids):
+        """Get specified microblogs posted by a contact and their comments
+        @param publisher_jid: jid of the publisher
+        @param item_ids: list of microblogs items IDs
+        @return list of couple (microblog data, list of microblog data)"""
+        profile = ISATSession(self.session).profile
+        d = self.asyncBridgeCall("getGroupBlogsWithComments", publisher_jid, item_ids, profile)
+        return d
+
     def jsonrpc_getLastMblogs(self, publisher_jid, max_item):
         """Get last microblogs posted by a contact
         @param publisher_jid: jid of the publisher