Documentation
¶
Index ¶
- func ValidateBirthday(s string) (time.Time, error)
- func ValidateContactFieldLen(value, label string, limit int) error
- func ValidateEmail(email string) error
- func ValidatePhone(phone string) error
- type Address
- type Attachment
- type AttachmentInput
- type AttendeeAvailabilityInfo
- type AutoReplySettings
- type CalendarEvent
- type CalendarInfo
- type Category
- type Client
- func (c *Client) CategorizeMessage(ctx context.Context, messageID string, categories []string) error
- func (c *Client) CompleteTodoTask(ctx context.Context, listID, taskID string) error
- func (c *Client) CopyDriveItem(ctx context.Context, driveID, itemID, destParentID, newName string) error
- func (c *Client) CreateCategory(ctx context.Context, name, color string) (*Category, error)
- func (c *Client) CreateChecklistItem(ctx context.Context, listID, taskID, displayName string) (*TodoChecklistItem, error)
- func (c *Client) CreateContact(ctx context.Context, in *ContactCreateInput) (*Contact, error)
- func (c *Client) CreateDraft(ctx context.Context, subject, body string, to, cc, bcc []string, isHTML bool) (*DraftMessage, error)
- func (c *Client) CreateEvent(ctx context.Context, subject string, start, end time.Time, location string, ...) (*CalendarEvent, error)
- func (c *Client) CreateFolder(ctx context.Context, driveID, parentItemID, folderName string) (*DriveItem, error)
- func (c *Client) CreateLinkedResource(ctx context.Context, ...) (*TodoLinkedResource, error)
- func (c *Client) CreateMailFolder(ctx context.Context, displayName string) (*MailFolder, error)
- func (c *Client) CreateMailRule(ctx context.Context, name, from, subjectContains string, hasAttachment bool, ...) (*MailRule, error)
- func (c *Client) CreateShareLink(ctx context.Context, driveID, itemID, linkType, scope string) (*ShareLink, error)
- func (c *Client) CreateTodoList(ctx context.Context, displayName string) (*TodoList, error)
- func (c *Client) CreateTodoTask(ctx context.Context, ...) (*TodoTask, error)
- func (c *Client) CreateUploadSession(ctx context.Context, driveID, remotePath string, replace bool) (string, error)
- func (c *Client) DeleteCategory(ctx context.Context, categoryID string) error
- func (c *Client) DeleteChecklistItem(ctx context.Context, listID, taskID, itemID string) error
- func (c *Client) DeleteContact(ctx context.Context, contactID string) error
- func (c *Client) DeleteDraft(ctx context.Context, draftID string) error
- func (c *Client) DeleteDriveItem(ctx context.Context, driveID, itemID string) error
- func (c *Client) DeleteEvent(ctx context.Context, eventID string) error
- func (c *Client) DeleteLinkedResource(ctx context.Context, listID, taskID, resourceID string) error
- func (c *Client) DeleteMailFolder(ctx context.Context, folderID string) error
- func (c *Client) DeleteMailRule(ctx context.Context, ruleID string) error
- func (c *Client) DeleteMessage(ctx context.Context, messageID string) error
- func (c *Client) DeleteTodoAttachment(ctx context.Context, listID, taskID, attachmentID string) error
- func (c *Client) DeleteTodoList(ctx context.Context, listID string) error
- func (c *Client) DeleteTodoTask(ctx context.Context, listID, taskID string) error
- func (c *Client) DownloadAttachment(ctx context.Context, messageID, attachmentID string) (*Attachment, error)
- func (c *Client) DownloadDriveItem(ctx context.Context, driveID, itemID string) ([]byte, error)
- func (c *Client) DownloadTodoAttachment(ctx context.Context, listID, taskID, attachmentID string) (name, contentType string, content []byte, err error)
- func (c *Client) FindMeetingTimes(ctx context.Context, attendees []string, start, end time.Time, ...) ([]MeetingTimeSuggestion, error)
- func (c *Client) FlagMessage(ctx context.Context, messageID, flagStatus string) error
- func (c *Client) ForwardMessage(ctx context.Context, messageID, comment string, toRecipients []string) error
- func (c *Client) GetAttachments(ctx context.Context, messageID string) ([]Attachment, error)
- func (c *Client) GetAutoReply(ctx context.Context) (*AutoReplySettings, error)
- func (c *Client) GetContact(ctx context.Context, contactID string) (*Contact, error)
- func (c *Client) GetDrive(ctx context.Context, driveID string) (*DriveInfo, error)
- func (c *Client) GetDriveItem(ctx context.Context, driveID, itemID string) (*DriveItem, error)
- func (c *Client) GetEvent(ctx context.Context, eventID string) (*CalendarEvent, error)
- func (c *Client) GetMessage(ctx context.Context, messageID string) (*MailMessage, error)
- func (c *Client) GetProfile(ctx context.Context) (*UserProfile, error)
- func (c *Client) GetSchedule(ctx context.Context, emails []string, start, end time.Time) ([]ScheduleInfo, error)
- func (c *Client) GetTodoTask(ctx context.Context, listID, taskID string) (*TodoTask, error)
- func (c *Client) Inner() *msgraphsdk.GraphServiceClient
- func (c *Client) ListCalendarView(ctx context.Context, startTime, endTime time.Time, calendarID string, ...) ([]CalendarEvent, error)
- func (c *Client) ListCalendars(ctx context.Context) ([]CalendarInfo, error)
- func (c *Client) ListCategories(ctx context.Context) ([]Category, error)
- func (c *Client) ListChecklistItems(ctx context.Context, listID, taskID string) ([]TodoChecklistItem, error)
- func (c *Client) ListContacts(ctx context.Context, top, skip int32, orderBy string) ([]Contact, error)
- func (c *Client) ListDrafts(ctx context.Context, top int32) ([]DraftMessage, error)
- func (c *Client) ListDriveChildren(ctx context.Context, driveID, itemID string, top int32) ([]DriveItem, error)
- func (c *Client) ListDriveChildrenByPath(ctx context.Context, driveID, path string, top int32) ([]DriveItem, error)
- func (c *Client) ListDriveItemVersions(ctx context.Context, driveID, itemID string) ([]DriveItemVersion, error)
- func (c *Client) ListDrives(ctx context.Context) ([]DriveInfo, error)
- func (c *Client) ListEvents(ctx context.Context, startTime, endTime time.Time, calendarID string, ...) ([]CalendarEvent, error)
- func (c *Client) ListLinkedResources(ctx context.Context, listID, taskID string) ([]TodoLinkedResource, error)
- func (c *Client) ListMailFolders(ctx context.Context) ([]MailFolder, error)
- func (c *Client) ListMailRules(ctx context.Context) ([]MailRule, error)
- func (c *Client) ListMessages(ctx context.Context, opts *ListMessagesOptions) ([]MailMessage, error)
- func (c *Client) ListTodoAttachments(ctx context.Context, listID, taskID string) ([]TodoAttachment, error)
- func (c *Client) ListTodoLists(ctx context.Context) ([]TodoList, error)
- func (c *Client) ListTodoTasks(ctx context.Context, listID string, top int32, status string) ([]TodoTask, error)
- func (c *Client) MarkMessage(ctx context.Context, messageID string, isRead bool) error
- func (c *Client) MoveDriveItem(ctx context.Context, driveID, itemID, destParentID, newName string) (*DriveItem, error)
- func (c *Client) MoveMessage(ctx context.Context, messageID, folderID string) error
- func (c *Client) RecentDriveItems(ctx context.Context, driveID string) ([]DriveItem, error)
- func (c *Client) RenameMailFolder(ctx context.Context, folderID, displayName string) (*MailFolder, error)
- func (c *Client) ReplyMessage(ctx context.Context, messageID, comment string, replyAll bool) error
- func (c *Client) ResolveItemByPath(ctx context.Context, driveID, path string) (*DriveItem, error)
- func (c *Client) RespondToEvent(ctx context.Context, eventID, response string) error
- func (c *Client) SearchContacts(ctx context.Context, query string, top int32) ([]Contact, error)
- func (c *Client) SearchDirectory(ctx context.Context, query string, top int32) ([]Person, error)
- func (c *Client) SearchDrive(ctx context.Context, driveID, query string, top int32) ([]DriveItem, error)
- func (c *Client) SearchMessages(ctx context.Context, query string, top int32) ([]MailMessage, error)
- func (c *Client) SearchPeople(ctx context.Context, query string, top int32) ([]Person, error)
- func (c *Client) SendDraft(ctx context.Context, draftID string) error
- func (c *Client) SendMessage(ctx context.Context, subject, body string, ...) error
- func (c *Client) SetAutoReply(ctx context.Context, ...) error
- func (c *Client) SetImportance(ctx context.Context, messageID, importance string) error
- func (c *Client) SharedWithMeItems(ctx context.Context, driveID string) ([]DriveItem, error)
- func (c *Client) ToggleChecklistItem(ctx context.Context, listID, taskID, itemID string) (*TodoChecklistItem, error)
- func (c *Client) UpdateChecklistItem(ctx context.Context, listID, taskID, itemID string, displayName *string, ...) (*TodoChecklistItem, error)
- func (c *Client) UpdateContact(ctx context.Context, contactID string, in *ContactUpdateInput) (*Contact, error)
- func (c *Client) UpdateEvent(ctx context.Context, eventID string, subject *string, start, end *time.Time, ...) (*CalendarEvent, error)
- func (c *Client) UpdateTodoTask(ctx context.Context, listID, taskID string, ...) (*TodoTask, error)
- func (c *Client) UploadSmallFile(ctx context.Context, driveID, remotePath string, content []byte, replace bool) (*DriveItem, error)
- func (c *Client) UploadTodoAttachment(ctx context.Context, listID, taskID, name, contentType string, content []byte) (*TodoAttachment, error)
- type Contact
- type ContactCreateInput
- type ContactUpdateInput
- type DraftMessage
- type DriveInfo
- type DriveItem
- type DriveItemVersion
- type ListMessagesOptions
- type MailFolder
- type MailMessage
- type MailRule
- type MeetingTimeSuggestion
- type Person
- type ScheduleInfo
- type ScheduleItem
- type ShareLink
- type TodoAttachment
- type TodoChecklistItem
- type TodoLinkedResource
- type TodoList
- type TodoTask
- type UserProfile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateBirthday ¶ added in v0.7.0
ValidateBirthday parses an ISO date string (YYYY-MM-DD) and returns the parsed time.
func ValidateContactFieldLen ¶ added in v0.7.0
ValidateContactFieldLen checks that a contact string field is within length limits.
func ValidateEmail ¶
ValidateEmail checks basic email format and length.
func ValidatePhone ¶
ValidatePhone checks basic phone number format.
Types ¶
type Address ¶ added in v0.7.0
type Address struct {
Street string `json:"street,omitempty"`
City string `json:"city,omitempty"`
State string `json:"state,omitempty"`
PostalCode string `json:"postalCode,omitempty"`
CountryOrRegion string `json:"countryOrRegion,omitempty"`
}
Address is a physical address.
type Attachment ¶
type Attachment struct {
ID string `json:"id"`
Name string `json:"name"`
ContentType string `json:"contentType"`
Size int32 `json:"size"`
Content []byte `json:"-"`
}
Attachment represents a mail attachment
type AttachmentInput ¶ added in v0.2.0
AttachmentInput represents an attachment to be sent with a message
type AttendeeAvailabilityInfo ¶ added in v0.3.0
type AttendeeAvailabilityInfo struct {
Email string `json:"email"`
Availability string `json:"availability"`
}
AttendeeAvailabilityInfo represents an attendee's availability for a time slot
type AutoReplySettings ¶ added in v0.2.0
type AutoReplySettings struct {
Status string `json:"status"`
InternalMessage string `json:"internalMessage"`
ExternalMessage string `json:"externalMessage"`
StartTime string `json:"startTime,omitempty"`
EndTime string `json:"endTime,omitempty"`
ExternalAudience string `json:"externalAudience"`
}
AutoReplySettings is a simplified auto-reply configuration for output
type CalendarEvent ¶
type CalendarEvent struct {
ID string `json:"id"`
Subject string `json:"subject"`
Start string `json:"start"`
End string `json:"end"`
Location string `json:"location"`
Organizer string `json:"organizer"`
Attendees []string `json:"attendees,omitempty"`
IsAllDay bool `json:"isAllDay"`
IsOnline bool `json:"isOnlineMeeting"`
OnlineURL string `json:"onlineMeetingUrl,omitempty"`
Status string `json:"showAs"`
Recurrence string `json:"recurrence,omitempty"`
BodyPreview string `json:"bodyPreview"`
Body string `json:"body,omitempty"`
}
CalendarEvent is a simplified calendar event for output
type CalendarInfo ¶
type CalendarInfo struct {
ID string `json:"id"`
Name string `json:"name"`
Color string `json:"color"`
Owner string `json:"owner"`
}
CalendarInfo is a simplified calendar representation
type Category ¶ added in v0.4.5
type Category struct {
ID string `json:"id"`
DisplayName string `json:"displayName"`
Color string `json:"color"`
}
Category is a simplified outlook category for output
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the Graph SDK client
func NewClient ¶
func NewClient(cred azcore.TokenCredential) (*Client, error)
NewClient creates a new Graph API client from a token credential
func (*Client) CategorizeMessage ¶ added in v0.2.0
func (c *Client) CategorizeMessage(ctx context.Context, messageID string, categories []string) error
CategorizeMessage sets the categories on a message
func (*Client) CompleteTodoTask ¶ added in v0.2.0
CompleteTodoTask marks a task as completed.
func (*Client) CopyDriveItem ¶ added in v0.8.0
func (c *Client) CopyDriveItem(ctx context.Context, driveID, itemID, destParentID, newName string) error
CopyDriveItem initiates an async copy of an item to a new parent.
func (*Client) CreateCategory ¶ added in v0.4.5
func (*Client) CreateChecklistItem ¶ added in v0.6.0
func (c *Client) CreateChecklistItem(ctx context.Context, listID, taskID, displayName string) (*TodoChecklistItem, error)
CreateChecklistItem creates a new checklist item on a task.
func (*Client) CreateContact ¶
func (*Client) CreateDraft ¶ added in v0.2.0
func (c *Client) CreateDraft(ctx context.Context, subject, body string, to, cc, bcc []string, isHTML bool) (*DraftMessage, error)
CreateDraft creates a draft message without sending it
func (*Client) CreateEvent ¶
func (*Client) CreateFolder ¶ added in v0.8.0
func (c *Client) CreateFolder(ctx context.Context, driveID, parentItemID, folderName string) (*DriveItem, error)
CreateFolder creates a new folder under the given parent item ID.
func (*Client) CreateLinkedResource ¶ added in v0.6.0
func (c *Client) CreateLinkedResource(ctx context.Context, listID, taskID, displayName, appName, externalID, webURL string) (*TodoLinkedResource, error)
CreateLinkedResource creates a new linked resource on a task.
func (*Client) CreateMailFolder ¶ added in v0.4.5
CreateMailFolder creates a new mail folder.
func (*Client) CreateMailRule ¶ added in v0.3.0
func (*Client) CreateShareLink ¶ added in v0.8.0
func (c *Client) CreateShareLink(ctx context.Context, driveID, itemID, linkType, scope string) (*ShareLink, error)
CreateShareLink creates a sharing link for an item.
func (*Client) CreateTodoList ¶ added in v0.4.5
CreateTodoList creates a new task list.
func (*Client) CreateTodoTask ¶ added in v0.2.0
func (c *Client) CreateTodoTask(ctx context.Context, listID, title, dueDate, importance, body, startDate, reminderDate, recurrence string, categories []string) (*TodoTask, error)
CreateTodoTask creates a new task in the given list.
func (*Client) CreateUploadSession ¶ added in v0.8.0
func (c *Client) CreateUploadSession(ctx context.Context, driveID, remotePath string, replace bool) (string, error)
CreateUploadSession creates a resumable upload session for large files (>= 4MB).
func (*Client) DeleteCategory ¶ added in v0.4.5
func (*Client) DeleteChecklistItem ¶ added in v0.6.0
DeleteChecklistItem deletes a checklist item.
func (*Client) DeleteContact ¶
func (*Client) DeleteDraft ¶ added in v0.2.0
DeleteDraft deletes a draft message
func (*Client) DeleteDriveItem ¶ added in v0.8.0
DeleteDriveItem deletes an item.
func (*Client) DeleteEvent ¶
func (*Client) DeleteLinkedResource ¶ added in v0.6.0
DeleteLinkedResource deletes a linked resource from a task.
func (*Client) DeleteMailFolder ¶ added in v0.4.5
DeleteMailFolder deletes a mail folder.
func (*Client) DeleteMailRule ¶ added in v0.3.0
func (*Client) DeleteMessage ¶
func (*Client) DeleteTodoAttachment ¶ added in v0.6.0
func (c *Client) DeleteTodoAttachment(ctx context.Context, listID, taskID, attachmentID string) error
DeleteTodoAttachment deletes a task attachment.
func (*Client) DeleteTodoList ¶ added in v0.4.5
DeleteTodoList deletes a task list.
func (*Client) DeleteTodoTask ¶ added in v0.2.0
DeleteTodoTask deletes a task.
func (*Client) DownloadAttachment ¶ added in v0.2.0
func (*Client) DownloadDriveItem ¶ added in v0.8.0
DownloadDriveItem downloads file content by item ID. For large files, use GetDriveItem to get the DownloadURL and stream directly.
func (*Client) DownloadTodoAttachment ¶ added in v0.6.0
func (c *Client) DownloadTodoAttachment(ctx context.Context, listID, taskID, attachmentID string) (name, contentType string, content []byte, err error)
DownloadTodoAttachment downloads a task attachment's content.
func (*Client) FindMeetingTimes ¶ added in v0.3.0
func (c *Client) FindMeetingTimes(ctx context.Context, attendees []string, start, end time.Time, durationMinutes int32) ([]MeetingTimeSuggestion, error)
FindMeetingTimes finds available meeting times for the given attendees
func (*Client) FlagMessage ¶ added in v0.2.0
FlagMessage sets the follow-up flag status on a message
func (*Client) ForwardMessage ¶
func (*Client) GetAttachments ¶
func (*Client) GetAutoReply ¶ added in v0.2.0
func (c *Client) GetAutoReply(ctx context.Context) (*AutoReplySettings, error)
GetAutoReply retrieves the current auto-reply (out-of-office) settings
func (*Client) GetContact ¶
func (*Client) GetDrive ¶ added in v0.8.0
GetDrive returns details for a specific drive, or the default drive if driveID is empty.
func (*Client) GetDriveItem ¶ added in v0.8.0
GetDriveItem returns metadata for a specific item.
func (*Client) GetMessage ¶
func (*Client) GetProfile ¶ added in v0.2.0
func (c *Client) GetProfile(ctx context.Context) (*UserProfile, error)
GetProfile retrieves the current user's profile information
func (*Client) GetSchedule ¶ added in v0.2.0
func (c *Client) GetSchedule(ctx context.Context, emails []string, start, end time.Time) ([]ScheduleInfo, error)
GetSchedule retrieves free/busy availability for the specified email addresses
func (*Client) GetTodoTask ¶ added in v0.2.0
GetTodoTask returns a single task by ID.
func (*Client) Inner ¶
func (c *Client) Inner() *msgraphsdk.GraphServiceClient
Inner returns the underlying Graph SDK client
func (*Client) ListCalendarView ¶ added in v0.3.0
func (c *Client) ListCalendarView(ctx context.Context, startTime, endTime time.Time, calendarID string, top int32) ([]CalendarEvent, error)
ListCalendarView returns expanded occurrences (including recurring) in a date range.
func (*Client) ListCalendars ¶
func (c *Client) ListCalendars(ctx context.Context) ([]CalendarInfo, error)
func (*Client) ListCategories ¶ added in v0.4.5
func (*Client) ListChecklistItems ¶ added in v0.6.0
func (c *Client) ListChecklistItems(ctx context.Context, listID, taskID string) ([]TodoChecklistItem, error)
ListChecklistItems returns all checklist items for a task.
func (*Client) ListContacts ¶
func (*Client) ListDrafts ¶ added in v0.2.0
ListDrafts lists messages in the Drafts folder
func (*Client) ListDriveChildren ¶ added in v0.8.0
func (c *Client) ListDriveChildren(ctx context.Context, driveID, itemID string, top int32) ([]DriveItem, error)
ListDriveChildren returns items in a folder by item ID.
func (*Client) ListDriveChildrenByPath ¶ added in v0.8.0
func (c *Client) ListDriveChildrenByPath(ctx context.Context, driveID, path string, top int32) ([]DriveItem, error)
ListDriveChildrenByPath returns items in a folder by path.
func (*Client) ListDriveItemVersions ¶ added in v0.8.0
func (c *Client) ListDriveItemVersions(ctx context.Context, driveID, itemID string) ([]DriveItemVersion, error)
ListDriveItemVersions returns version history for an item.
func (*Client) ListDrives ¶ added in v0.8.0
ListDrives returns all drives for the current user.
func (*Client) ListEvents ¶
func (*Client) ListLinkedResources ¶ added in v0.6.0
func (c *Client) ListLinkedResources(ctx context.Context, listID, taskID string) ([]TodoLinkedResource, error)
ListLinkedResources returns all linked resources for a task.
func (*Client) ListMailFolders ¶
func (c *Client) ListMailFolders(ctx context.Context) ([]MailFolder, error)
func (*Client) ListMailRules ¶ added in v0.3.0
func (*Client) ListMessages ¶
func (c *Client) ListMessages(ctx context.Context, opts *ListMessagesOptions) ([]MailMessage, error)
func (*Client) ListTodoAttachments ¶ added in v0.6.0
func (c *Client) ListTodoAttachments(ctx context.Context, listID, taskID string) ([]TodoAttachment, error)
ListTodoAttachments returns all attachments for a task.
func (*Client) ListTodoLists ¶ added in v0.2.0
ListTodoLists returns all task lists for the current user.
func (*Client) ListTodoTasks ¶ added in v0.2.0
func (c *Client) ListTodoTasks(ctx context.Context, listID string, top int32, status string) ([]TodoTask, error)
ListTodoTasks returns tasks in a given task list.
func (*Client) MarkMessage ¶
func (*Client) MoveDriveItem ¶ added in v0.8.0
func (c *Client) MoveDriveItem(ctx context.Context, driveID, itemID, destParentID, newName string) (*DriveItem, error)
MoveDriveItem moves or renames an item.
func (*Client) MoveMessage ¶
func (*Client) RecentDriveItems ¶ added in v0.8.0
RecentDriveItems returns recently accessed items.
func (*Client) RenameMailFolder ¶ added in v0.4.5
func (c *Client) RenameMailFolder(ctx context.Context, folderID, displayName string) (*MailFolder, error)
RenameMailFolder renames a mail folder.
func (*Client) ReplyMessage ¶
func (*Client) ResolveItemByPath ¶ added in v0.8.0
ResolveItemByPath resolves a path to a DriveItem using the Graph API path syntax.
func (*Client) RespondToEvent ¶
func (*Client) SearchContacts ¶
func (*Client) SearchDirectory ¶ added in v0.4.4
SearchDirectory searches the organization directory via /users with $search
func (*Client) SearchDrive ¶ added in v0.8.0
func (c *Client) SearchDrive(ctx context.Context, driveID, query string, top int32) ([]DriveItem, error)
SearchDrive searches for items matching a query.
func (*Client) SearchMessages ¶
func (*Client) SearchPeople ¶ added in v0.3.0
func (*Client) SendMessage ¶
func (*Client) SetAutoReply ¶ added in v0.2.0
func (c *Client) SetAutoReply(ctx context.Context, status, internalMsg, externalMsg, startTime, endTime, audience string) error
SetAutoReply updates the auto-reply (out-of-office) settings
func (*Client) SetImportance ¶ added in v0.2.0
SetImportance sets the importance level on a message
func (*Client) SharedWithMeItems ¶ added in v0.8.0
SharedWithMeItems returns items shared with the current user.
func (*Client) ToggleChecklistItem ¶ added in v0.6.0
func (c *Client) ToggleChecklistItem(ctx context.Context, listID, taskID, itemID string) (*TodoChecklistItem, error)
ToggleChecklistItem toggles the IsChecked state of a checklist item.
func (*Client) UpdateChecklistItem ¶ added in v0.6.0
func (c *Client) UpdateChecklistItem(ctx context.Context, listID, taskID, itemID string, displayName *string, isChecked *bool) (*TodoChecklistItem, error)
UpdateChecklistItem updates a checklist item's properties.
func (*Client) UpdateContact ¶
func (*Client) UpdateEvent ¶
func (*Client) UpdateTodoTask ¶ added in v0.4.5
func (c *Client) UpdateTodoTask(ctx context.Context, listID, taskID string, title, dueDate, importance, body, startDate, reminderDate, recurrence *string, categories *[]string) (*TodoTask, error)
UpdateTodoTask updates a task's properties.
func (*Client) UploadSmallFile ¶ added in v0.8.0
func (c *Client) UploadSmallFile(ctx context.Context, driveID, remotePath string, content []byte, replace bool) (*DriveItem, error)
UploadSmallFile uploads a file under 4MB via simple PUT.
func (*Client) UploadTodoAttachment ¶ added in v0.6.0
func (c *Client) UploadTodoAttachment(ctx context.Context, listID, taskID, name, contentType string, content []byte) (*TodoAttachment, error)
UploadTodoAttachment uploads a file attachment to a task.
type Contact ¶
type Contact struct {
ID string `json:"id"`
DisplayName string `json:"displayName"`
FirstName string `json:"givenName"`
LastName string `json:"surname"`
MiddleName string `json:"middleName,omitempty"`
NickName string `json:"nickName,omitempty"`
Emails []string `json:"emailAddresses"`
BusinessPhones []string `json:"businessPhones,omitempty"`
HomePhones []string `json:"homePhones,omitempty"`
MobilePhone string `json:"mobilePhone,omitempty"`
ImAddresses []string `json:"imAddresses,omitempty"`
Company string `json:"companyName"`
JobTitle string `json:"jobTitle"`
Department string `json:"department,omitempty"`
OfficeLocation string `json:"officeLocation,omitempty"`
Profession string `json:"profession,omitempty"`
Manager string `json:"manager,omitempty"`
AssistantName string `json:"assistantName,omitempty"`
Birthday string `json:"birthday,omitempty"`
PersonalNotes string `json:"personalNotes,omitempty"`
SpouseName string `json:"spouseName,omitempty"`
Children []string `json:"children,omitempty"`
Categories []string `json:"categories,omitempty"`
BusinessHomePage string `json:"businessHomePage,omitempty"`
BusinessAddress *Address `json:"businessAddress,omitempty"`
HomeAddress *Address `json:"homeAddress,omitempty"`
OtherAddress *Address `json:"otherAddress,omitempty"`
}
Contact is a simplified contact representation
type ContactCreateInput ¶ added in v0.7.0
type ContactCreateInput struct {
FirstName string
LastName string
Emails []string
BusinessPhone string
HomePhone string
MobilePhone string
Company string
JobTitle string
Department string
Birthday string
PersonalNotes string
Manager string
MiddleName string
NickName string
Categories []string
Address *Address
AddressType string // "business", "home", "other"
}
ContactCreateInput contains the fields for creating a contact.
type ContactUpdateInput ¶ added in v0.7.0
type ContactUpdateInput struct {
FirstName *string
LastName *string
Emails *[]string
BusinessPhone *string
HomePhone *string
MobilePhone *string
Company *string
JobTitle *string
Department *string
Birthday *string
PersonalNotes *string
Manager *string
MiddleName *string
NickName *string
Categories *[]string
Address *Address
AddressType string
}
ContactUpdateInput contains the fields for updating a contact. Nil pointers mean "don't change".
type DraftMessage ¶ added in v0.2.0
type DraftMessage struct {
ID string `json:"id"`
Subject string `json:"subject"`
To []string `json:"to"`
Body string `json:"body,omitempty"`
Created string `json:"createdDateTime"`
}
DraftMessage is a simplified draft message for output
type DriveInfo ¶ added in v0.8.0
type DriveInfo struct {
ID string `json:"id"`
Name string `json:"name"`
DriveType string `json:"driveType"`
QuotaTotal int64 `json:"quotaTotal"`
QuotaUsed int64 `json:"quotaUsed"`
QuotaRemaining int64 `json:"quotaRemaining"`
QuotaState string `json:"quotaState"`
OwnerName string `json:"ownerName,omitempty"`
OwnerEmail string `json:"ownerEmail,omitempty"`
WebURL string `json:"webUrl"`
}
DriveInfo is a simplified drive for output.
type DriveItem ¶ added in v0.8.0
type DriveItem struct {
ID string `json:"id"`
Name string `json:"name"`
Size int64 `json:"size"`
ItemType string `json:"itemType"`
MimeType string `json:"mimeType,omitempty"`
CreatedAt string `json:"createdDateTime"`
ModifiedAt string `json:"lastModifiedDateTime"`
WebURL string `json:"webUrl"`
DownloadURL string `json:"-"` // pre-authenticated URL with embedded token; excluded from JSON for security
ParentPath string `json:"parentPath,omitempty"`
ChildCount int32 `json:"childCount,omitempty"`
CreatedBy string `json:"createdBy,omitempty"`
ModifiedBy string `json:"modifiedBy,omitempty"`
}
DriveItem is a simplified drive item for output.
type DriveItemVersion ¶ added in v0.8.0
type DriveItemVersion struct {
ID string `json:"id"`
ModifiedAt string `json:"lastModifiedDateTime"`
Size int64 `json:"size"`
ModifiedBy string `json:"lastModifiedBy,omitempty"`
}
DriveItemVersion is a simplified version entry for output.
type ListMessagesOptions ¶
type ListMessagesOptions struct {
FolderID string
Top int32
Filter string
OrderBy string
Search string
Select []string
}
ListMessagesOptions for filtering messages
type MailFolder ¶
type MailFolder struct {
ID string `json:"id"`
DisplayName string `json:"displayName"`
TotalCount int32 `json:"totalItemCount"`
UnreadCount int32 `json:"unreadItemCount"`
ParentFolderID string `json:"parentFolderId,omitempty"`
}
MailFolder is a simplified folder representation
type MailMessage ¶
type MailMessage struct {
ID string `json:"id"`
Subject string `json:"subject"`
From string `json:"from"`
To []string `json:"to"`
ReceivedAt string `json:"receivedDateTime"`
IsRead bool `json:"isRead"`
HasAttachments bool `json:"hasAttachments"`
BodyPreview string `json:"bodyPreview"`
Body string `json:"body,omitempty"`
BodyType string `json:"bodyType,omitempty"`
Categories []string `json:"categories,omitempty"`
}
MailMessage is a simplified mail message for output
type MailRule ¶ added in v0.3.0
type MailRule struct {
ID string `json:"id"`
DisplayName string `json:"displayName"`
Sequence int32 `json:"sequence"`
IsEnabled bool `json:"isEnabled"`
Conditions string `json:"conditions"`
Actions string `json:"actions"`
}
MailRule is a simplified message rule for output
type MeetingTimeSuggestion ¶ added in v0.3.0
type MeetingTimeSuggestion struct {
Start string `json:"start"`
End string `json:"end"`
Confidence float64 `json:"confidence"`
OrganizerAvailability string `json:"organizerAvailability"`
AttendeeAvailabilities []AttendeeAvailabilityInfo `json:"attendeeAvailabilities,omitempty"`
}
MeetingTimeSuggestion represents a suggested meeting time
type Person ¶ added in v0.3.0
type Person struct {
DisplayName string `json:"displayName"`
Email string `json:"email"`
JobTitle string `json:"jobTitle,omitempty"`
Department string `json:"department,omitempty"`
Company string `json:"companyName,omitempty"`
}
Person is a simplified person for output
type ScheduleInfo ¶ added in v0.2.0
type ScheduleInfo struct {
Email string `json:"email"`
Availability string `json:"availability"`
Items []ScheduleItem `json:"scheduleItems"`
}
ScheduleInfo represents the free/busy schedule for a user
type ScheduleItem ¶ added in v0.2.0
type ScheduleItem struct {
Status string `json:"status"`
Start string `json:"start"`
End string `json:"end"`
Subject string `json:"subject,omitempty"`
}
ScheduleItem represents a single busy block in a user's schedule
type ShareLink ¶ added in v0.8.0
type ShareLink struct {
}
ShareLink is a simplified sharing link for output.
type TodoAttachment ¶ added in v0.6.0
type TodoAttachment struct {
ID string `json:"id"`
Name string `json:"name"`
ContentType string `json:"contentType"`
Size int32 `json:"size"`
}
TodoAttachment is a simplified attachment for output
type TodoChecklistItem ¶ added in v0.6.0
type TodoChecklistItem struct {
ID string `json:"id"`
DisplayName string `json:"displayName"`
IsChecked bool `json:"isChecked"`
CreatedAt string `json:"createdDateTime,omitempty"`
}
TodoChecklistItem is a simplified checklist item for output
type TodoLinkedResource ¶ added in v0.6.0
type TodoLinkedResource struct {
ID string `json:"id"`
DisplayName string `json:"displayName"`
ApplicationName string `json:"applicationName"`
ExternalID string `json:"externalId"`
WebURL string `json:"webUrl"`
}
TodoLinkedResource is a simplified linked resource for output
type TodoList ¶ added in v0.2.0
type TodoList struct {
ID string `json:"id"`
DisplayName string `json:"displayName"`
IsOwner bool `json:"isOwner"`
}
TodoList is a simplified task list for output
type TodoTask ¶ added in v0.2.0
type TodoTask struct {
ID string `json:"id"`
Title string `json:"title"`
Status string `json:"status"`
Importance string `json:"importance"`
DueDate string `json:"dueDateTime,omitempty"`
CreatedAt string `json:"createdDateTime"`
CompletedAt string `json:"completedDateTime,omitempty"`
Body string `json:"body,omitempty"`
StartDate string `json:"startDateTime,omitempty"`
IsReminderOn bool `json:"isReminderOn"`
ReminderDate string `json:"reminderDateTime,omitempty"`
Recurrence string `json:"recurrence,omitempty"`
Categories []string `json:"categories,omitempty"`
HasAttachments bool `json:"hasAttachments"`
}
TodoTask is a simplified task for output
type UserProfile ¶ added in v0.2.0
type UserProfile struct {
DisplayName string `json:"displayName"`
Email string `json:"mail"`
UPN string `json:"userPrincipalName"`
JobTitle string `json:"jobTitle,omitempty"`
Department string `json:"department,omitempty"`
Office string `json:"officeLocation,omitempty"`
Phone string `json:"businessPhones,omitempty"`
}
UserProfile is a simplified user profile for output