class UsersThreads extends Resource (View source)

The "threads" collection of methods.

Typical usage is:

 $gmailService = new Google\Service\Gmail(...);
 $threads = $gmailService->users_threads;

Methods

delete(string $userId, string $id, array $optParams = [])

Immediately and permanently deletes the specified thread. Any messages that belong to the thread are also deleted. This operation cannot be undone.

get(string $userId, string $id, array $optParams = [])

Gets the specified thread. (threads.get)

listUsersThreads(string $userId, array $optParams = [])

Lists the threads in the user's mailbox. (threads.listUsersThreads)

modify(string $userId, string $id, ModifyThreadRequest $postBody, array $optParams = [])

Modifies the labels applied to the thread. This applies to all messages in the thread. (threads.modify)

trash(string $userId, string $id, array $optParams = [])

Moves the specified thread to the trash. Any messages that belong to the thread are also moved to the trash. (threads.trash)

untrash(string $userId, string $id, array $optParams = [])

Removes the specified thread from the trash. Any messages that belong to the thread are also removed from the trash. (threads.untrash)

Details

delete(string $userId, string $id, array $optParams = [])

Immediately and permanently deletes the specified thread. Any messages that belong to the thread are also deleted. This operation cannot be undone.

Prefer threads.trash instead. (threads.delete)

Parameters

string $userId

The user's email address. The special value me can be used to indicate the authenticated user.

string $id

ID of the Thread to delete.

array $optParams

Optional parameters.

Exceptions

Exception

Thread get(string $userId, string $id, array $optParams = [])

Gets the specified thread. (threads.get)

Parameters

string $userId

The user's email address. The special value me can be used to indicate the authenticated user.

string $id

The ID of the thread to retrieve.

array $optParams

Optional parameters.

Return Value

Thread

Exceptions

Exception

ListThreadsResponse listUsersThreads(string $userId, array $optParams = [])

Lists the threads in the user's mailbox. (threads.listUsersThreads)

Parameters

string $userId

The user's email address. The special value me can be used to indicate the authenticated user.

array $optParams

Optional parameters.

Return Value

ListThreadsResponse

Exceptions

Exception

Thread modify(string $userId, string $id, ModifyThreadRequest $postBody, array $optParams = [])

Modifies the labels applied to the thread. This applies to all messages in the thread. (threads.modify)

Parameters

string $userId

The user's email address. The special value me can be used to indicate the authenticated user.

string $id

The ID of the thread to modify.

ModifyThreadRequest $postBody
array $optParams

Optional parameters.

Return Value

Thread

Exceptions

Exception

Thread trash(string $userId, string $id, array $optParams = [])

Moves the specified thread to the trash. Any messages that belong to the thread are also moved to the trash. (threads.trash)

Parameters

string $userId

The user's email address. The special value me can be used to indicate the authenticated user.

string $id

The ID of the thread to Trash.

array $optParams

Optional parameters.

Return Value

Thread

Exceptions

Exception

Thread untrash(string $userId, string $id, array $optParams = [])

Removes the specified thread from the trash. Any messages that belong to the thread are also removed from the trash. (threads.untrash)

Parameters

string $userId

The user's email address. The special value me can be used to indicate the authenticated user.

string $id

The ID of the thread to remove from Trash.

array $optParams

Optional parameters.

Return Value

Thread

Exceptions

Exception