NAME
Google::RestApi::GmailApi1::Thread - Thread object for Gmail.
SYNOPSIS
# Get a thread
my $thread = $gmail_api->thread(id => 'thread_id');
my $details = $thread->get();
# Modify thread labels
$thread->modify(
add_label_ids => ['STARRED'],
remove_label_ids => ['UNREAD'],
);
# Trash/untrash
$thread->trash();
$thread->untrash();
# Permanently delete
$thread->delete();
DESCRIPTION
Represents a Gmail thread. Supports reading, modifying labels, trashing, and deleting threads.
METHODS
get(format => $format, fields => $fields)
Gets thread details including all messages. Requires thread ID.
Format can be 'full', 'metadata', or 'minimal'.
modify(add_label_ids => \@ids, remove_label_ids => \@ids)
Modifies the labels on all messages in the thread. Requires thread ID.
trash()
Moves the thread to trash. Requires thread ID.
untrash()
Removes the thread from trash. Requires thread ID.
delete()
Permanently deletes the thread. Requires thread ID.
thread_id()
Returns the thread ID.
gmail_api()
Returns the parent GmailApi1 object.
AUTHORS
Robin Murray mvsjes@cpan.org
COPYRIGHT
Copyright (c) 2019-2026 Robin Murray. All rights reserved.
This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.