Skip to main content

Module messages_api

Module messages_api 

Source
Expand description

Gmail Messages API wrapper.

messages.list uses cursor pagination (nextPageToken), like Datadog’s v2 logs search — MessagesApi::search issues a single page, MessagesApi::search_all auto-paginates up to a caller-supplied limit (or HARD_CAP when the limit is 0), and MessagesApi::search_all_unbounded_streaming auto-paginates with no cap at all for gmail sync’s full-listing pass (#1467). Gmail’s list endpoint is GET-with-query-params (not POST-with-body like Datadog’s logs search), so URL construction follows the free build_*_url pattern from src/datadog/monitors_api.rs instead.

Structs§

MessageSummary
A search hit enriched with the headers a search-result table/list needs.
MessagesApi
Messages API façade.

Enums§

MessageFormat
The format query parameter accepted by messages.get.

Constants§

DEFAULT_SEARCH_LIMIT
Default limit for a search when the caller doesn’t specify one.
GMAIL_QUOTA_UNITS_PER_SECOND
Gmail’s documented quota ceiling, in quota units per user per second.
HARD_CAP
Per-call upper bound on the number of messages returned by MessagesApi::search_all, even when the caller passes limit = 0.
MAX_CONCURRENCY
Upper bound on MessagesApi::search_summaries’s concurrency parameter, regardless of what the caller (CLI --concurrency or the MCP concurrency param) requests.
MAX_PAGE_LIMIT
Maximum page size accepted by GET /gmail/v1/users/{userId}/messages.
MESSAGES_GET_COST_UNITS
Quota-unit cost of one messages.get call, regardless of format.
MESSAGES_LIST_COST_UNITS
Quota-unit cost of one messages.list page request.