Skip to main content

Module graph

Module graph 

Source
Expand description

Microsoft Graph API client.

Re-exports§

pub use events::EventsPage;
pub use events::NewEvent;
pub use events::RsvpKind;
pub use events::cancel_event;
pub use events::create_event;
pub use events::delete_event;
pub use events::get_event;
pub use events::list_calendar_view;
pub use events::move_event_to_calendar;
pub use events::move_time;
pub use events::rsvp_event;
pub use events::update_event;

Modules§

events
Microsoft Graph calendar event endpoints.

Structs§

GraphClient
Stateful Microsoft Graph client. Holds an AuthClient and a shared HTTP client.
InboxPage
One page of inbox messages plus a flag indicating whether more pages exist.
Me
Outgoing
What the user is sending — pre-Graph-serialization shape.

Functions§

add_attachment
POST /me/messages/{id}/attachments — attach a file to a draft.
create_draft
POST /me/messages — create a draft message in the Drafts folder. Returns the new draft’s Graph message ID.
create_forward_draft
POST /me/messages/{id}/createForward — create a forward draft with the given recipients already populated.
create_reply_all_draft
POST /me/messages/{id}/createReplyAll — create a reply-all draft.
create_reply_draft
POST /me/messages/{id}/createReply — create a reply draft. Returns the new draft’s Graph message ID.
delete_attachment
DELETE /me/messages/{id}/attachments/{att_id}.
delete_message
DELETE /me/messages/{id} — moves the message to Deleted Items. Same call works for drafts and for inbox messages; the destination folder differs only by what the user is currently in.
fetch_message_headers
GET /me/messages/{id}?$select=internetMessageHeaders — fetch just the raw RFC 5322 headers for a message. Used by pidge mail unsubscribe to locate List-Unsubscribe / List-Unsubscribe-Post.
forward_message
POST /me/messages/{id}/forward — forward to new recipients with optional comment.
get_attachment_bytes
GET /me/messages/{id}/attachments/{attachment_id} — fetch a single attachment with its base64 contentBytes. Returns the decoded bytes.
get_me
get_message
GET /me/messages/{id} — fetch a single message with full body.
list_attachments
GET /me/messages/{id}/attachments — list attachments without fetching bytes. Filters to file attachments only.
list_calendars
list_drafts
List a page of drafts from the Drafts folder. Drafts don’t have a real “received” time, so Graph sorts by lastModifiedDateTime desc here.
list_inbox
List a page of messages from the Inbox folder, sorted by receivedDateTime desc.
mark_read
PATCH /me/messages/{id} — mark the message as read.
mark_unread
PATCH /me/messages/{id} — mark the message as unread.
move_message
POST /me/messages/{id}/move — move the message to another folder.
reply_all_message
POST /me/messages/{id}/replyAll — reply to every recipient on the thread.
reply_message
POST /me/messages/{id}/reply — reply to a message with an optional comment prepended to Graph’s auto-generated quoted text.
search_messages
Search messages across all folders using Graph’s $search KQL query.
send_draft
POST /me/messages/{id}/send — send an existing draft.
send_mail
POST /me/sendMail — compose-and-send a new message in one call.
set_flag
PATCH /me/messages/{id} — set or clear the follow-up flag.
update_draft
PATCH /me/messages/{id} — overwrite a draft’s editable fields. Only the fields in Outgoing are patched, since that’s what our wizard owns.