getInboxEmailsPaginatedWithHttpInfo method
Get inbox emails paginated
Get a paginated list of emails in an inbox. Does not hold connections open.
Note: This method returns the HTTP Response
.
Parameters:
-
String inboxId (required): Id of inbox that emails belongs to
-
int page: Optional page index in inbox emails list pagination
-
int size: Optional page size in inbox emails list pagination
-
String sort: Optional createdAt sort direction ASC or DESC
-
DateTime since: Optional filter by received after given date time
-
DateTime before: Optional filter by received before given date time
Implementation
Future<Response> getInboxEmailsPaginatedWithHttpInfo(String inboxId, { int? page, int? size, String? sort, DateTime? since, DateTime? before, }) async {
// ignore: prefer_const_declarations
final path = r'/inboxes/{inboxId}/emails/paginated'
.replaceAll('{inboxId}', inboxId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (page != null) {
queryParams.addAll(_queryParams('', 'page', page));
}
if (size != null) {
queryParams.addAll(_queryParams('', 'size', size));
}
if (sort != null) {
queryParams.addAll(_queryParams('', 'sort', sort));
}
if (since != null) {
queryParams.addAll(_queryParams('', 'since', since));
}
if (before != null) {
queryParams.addAll(_queryParams('', 'before', before));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}