diff idavoll/gateway.py @ 186:365fd3e4daf8

Add maxItems support.
author Ralph Meijer <ralphm@ik.nu>
date Wed, 16 Apr 2008 14:14:27 +0000
parents 9038908dc2f5
children 69cdd8c6a431
line wrap: on
line diff
--- a/idavoll/gateway.py	Tue Apr 15 17:32:56 2008 +0000
+++ b/idavoll/gateway.py	Wed Apr 16 14:14:27 2008 +0000
@@ -587,7 +587,7 @@
             return http.StatusResponse(responsecode.NOT_FOUND,
                                        "Node not found")
 
-        d = self.service.items(jid, nodeIdentifier)
+        d = self.service.items(jid, nodeIdentifier, maxItems)
         d.addCallback(respond)
         d.addErrback(trapNotFound)
         return d
@@ -722,7 +722,7 @@
     def items(self, xmppURI, maxItems=None):
         query = {'uri': xmppURI}
         if maxItems:
-             query['maxItems'] = int(maxItems)
+             query['max_items'] = int(maxItems)
         f = getPageWithFactory(self._makeURI('items', query),
                     method='GET',
                     agent=self.agent)