10
class UnparsableDateRange(Exception):
11
"""The date_range was not in the format of 2012-01-01..2012-01-31."""
10
14
class UnsupportedDisplayType(Exception):
11
15
"""Raised when an Unsupported display_type is requested."""
74
78
raise Exception('!!')
76
def get_messages(self, archive_id, message_ids=None, limit=None,
77
memo=None, order=None, headers=None,
78
max_body_length=None, include_hidden=False,
80
def get_messages(self, archive_id, message_ids=None, date_range=None,
81
limit=None, memo=None, order=None, headers=None,
82
include_hidden=False, max_body_length=None,
79
83
display_type='all'):
80
84
"""Retrieve specified messages.
82
86
:param archive_id: The archive to retrieve messages from.
83
87
:param message_ids: (optional) Retrieve only messages with these ids.
88
:param date_range: Retrieve the messages from or between a range of
89
dates. Example: 2012-01-01..2012-01-31 retrieve all the messages
90
between the 01 and 31 of January, including message from 01
84
92
:param limit: The maximum number of messages to return. The server
85
93
may, at its discretion, return fewer.
86
94
:param memo: (optional) Opaque identifier describing the position in
109
117
if message_ids is not None:
110
118
parameters['message_ids'] = message_ids
119
if date_range is not None:
120
parameters['date_range'] = date_range
111
121
if limit is not None:
112
122
parameters['limit'] = limit
113
123
if memo is not None: