NAME

Google::RestApi::DriveApi3::Comment - Comment object for Google Drive files.

SYNOPSIS

# List all comments
my @comments = $file->comments();

# Get a specific comment
my $comment = $file->comment(id => 'comment_id');
my $details = $comment->get();

# Create a new comment
my $new_comment = $file->comment()->create(
  content => 'Great work on this document!',
);

# Update comment
$comment->update(content => 'Updated comment text');

# Delete comment
$comment->delete();

# Work with replies
my @replies = $comment->replies();
my $reply = $comment->reply()->create(content => 'Thanks!');

DESCRIPTION

Represents a comment on a Google Drive file. Supports creating, reading, updating, and deleting comments, as well as managing replies.

METHODS

create(content => $text, ...)

Creates a new comment. Required parameter: content.

Optional parameters: - anchor: JSON string specifying anchor location - quoted_content: The text being quoted

get(fields => $fields, include_deleted => $bool)

Gets comment details. Requires comment ID.

update(content => $text)

Updates the comment content. Requires comment ID.

delete()

Deletes the comment. Requires comment ID.

reply(id => $id)

Returns a Reply object. Without id, can create new replies.

replies(include_deleted => $bool, max_pages => $n, page_callback => $coderef)

Lists all replies to the comment. max_pages limits the number of pages fetched (default 0 = unlimited). Supports page_callback, see "PAGE CALLBACKS" in Google::RestApi.

comment_id()

Returns the comment ID.

file()

Returns the parent File 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.