Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
Google_Service_Gmail_UsersDrafts_Resource Class Reference

The "drafts" collection of methods. More...

Inheritance diagram for Google_Service_Gmail_UsersDrafts_Resource:
Google_Service_Resource

Public Member Functions

 call ($name, $arguments, $expected_class=null)
 TODO: This function needs simplifying.
 
 create ($userId, Google_Service_Gmail_Draft $postBody, $optParams=array())
 Creates a new draft with the DRAFT label.
 
 delete ($userId, $id, $optParams=array())
 Immediately and permanently deletes the specified draft.
 
 get ($userId, $id, $optParams=array())
 Gets the specified draft.
 
 listUsersDrafts ($userId, $optParams=array())
 Lists the drafts in the user's mailbox.
 
 send ($userId, Google_Service_Gmail_Draft $postBody, $optParams=array())
 Sends the specified, existing draft to the recipients in the To, Cc, and Bcc headers.
 
 update ($userId, $id, Google_Service_Gmail_Draft $postBody, $optParams=array())
 Replaces a draft's content.
 

Protected Member Functions

 convertToArrayAndStripNulls ($o)
 

Detailed Description

The "drafts" collection of methods.

Typical usage is: $gmailService = new Google_Service_Gmail(...); $drafts = $gmailService->drafts;

Member Function Documentation

◆ call()

Google_Service_Resource::call ( $name,
$arguments,
$expected_class = null )
inherited

TODO: This function needs simplifying.

Parameters
$name
$arguments
$expected_class- optional, the expected class name
Return values
Google_Http_Request|expected_class
Exceptions
Google_Exception

◆ create()

Google_Service_Gmail_UsersDrafts_Resource::create ( $userId,
Google_Service_Gmail_Draft $postBody,
$optParams = array() )

Creates a new draft with the DRAFT label.

(drafts.create)

Parameters
string$userIdThe user's email address. The special value me can be used to indicate the authenticated user.
Google_Draft$postBody
array$optParamsOptional parameters.
Return values
Google_Service_Gmail_Draft

◆ delete()

Google_Service_Gmail_UsersDrafts_Resource::delete ( $userId,
$id,
$optParams = array() )

Immediately and permanently deletes the specified draft.

Does not simply trash it. (drafts.delete)

Parameters
string$userIdThe user's email address. The special value me can be used to indicate the authenticated user.
string$idThe ID of the draft to delete.
array$optParamsOptional parameters.

◆ get()

Google_Service_Gmail_UsersDrafts_Resource::get ( $userId,
$id,
$optParams = array() )

Gets the specified draft.

(drafts.get)

Parameters
string$userIdThe user's email address. The special value me can be used to indicate the authenticated user.
string$idThe ID of the draft to retrieve.
array$optParamsOptional parameters.

@opt_param string format The format to return the draft in.

Return values
Google_Service_Gmail_Draft

◆ listUsersDrafts()

Google_Service_Gmail_UsersDrafts_Resource::listUsersDrafts ( $userId,
$optParams = array() )

Lists the drafts in the user's mailbox.

(drafts.listUsersDrafts)

Parameters
string$userIdThe user's email address. The special value me can be used to indicate the authenticated user.
array$optParamsOptional parameters.

@opt_param string pageToken Page token to retrieve a specific page of results in the list. @opt_param string maxResults Maximum number of drafts to return.

Return values
Google_Service_Gmail_ListDraftsResponse

◆ send()

Google_Service_Gmail_UsersDrafts_Resource::send ( $userId,
Google_Service_Gmail_Draft $postBody,
$optParams = array() )

Sends the specified, existing draft to the recipients in the To, Cc, and Bcc headers.

(drafts.send)

Parameters
string$userIdThe user's email address. The special value me can be used to indicate the authenticated user.
Google_Draft$postBody
array$optParamsOptional parameters.
Return values
Google_Service_Gmail_Message

◆ update()

Google_Service_Gmail_UsersDrafts_Resource::update ( $userId,
$id,
Google_Service_Gmail_Draft $postBody,
$optParams = array() )

Replaces a draft's content.

(drafts.update)

Parameters
string$userIdThe user's email address. The special value me can be used to indicate the authenticated user.
string$idThe ID of the draft to update.
Google_Draft$postBody
array$optParamsOptional parameters.
Return values
Google_Service_Gmail_Draft

The documentation for this class was generated from the following file: