~didrocks/unity/altf10

« back to all changes in this revision

Viewing changes to grackle/client.py

  • Committer: Aaron Bentley
  • Date: 2012-01-12 09:37:51 UTC
  • Revision ID: aaron@canonical.com-20120112093751-ltzymm8dbk34vixq
ImplementĀ memo/limitĀ support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        else:
41
41
            raise Exception('!!')
42
42
 
43
 
    def get_messages(self, archive_id, message_ids=None):
 
43
    def get_messages(self, archive_id, message_ids=None, limit=None,
 
44
                     memo=None):
44
45
        parameters = {}
45
46
        if message_ids is not None:
46
47
            parameters['message_ids'] = message_ids
 
48
        if limit is not None:
 
49
            parameters['limit'] = limit
 
50
        if memo is not None:
 
51
            parameters['memo'] = memo
47
52
        query = {'parameters': simplejson.dumps(parameters)}
48
53
        response = self._verb_archive('GET', archive_id, query)
49
54
        data = response.read()