NAME
Google::RestApi::DocsApi1::Document - Represents a Google Docs document with batch update support.
DESCRIPTION
Document inherits from Google::RestApi::Request and provides methods to queue Google Docs API batch update requests. Requests are collected and submitted together via submit_requests().
See the description and synopsis at Google::RestApi::DocsApi1.
NAVIGATION
SUBROUTINES
- new(%args)
-
Creates a new Document instance.
%args consists of:
docs_apiGoogle::RestApi::DocsApi1: Required. The parent DocsApi1 object.id<string>: Required. The document ID (Google Drive file ID).
- api(%args)
-
Calls the parent DocsApi1's 'api' routine adding the document ID.
- document_id()
-
Returns the document ID.
- get(%args)
-
Gets the document content.
%args consists of:
fields<string>: Optional. Fields to return (e.g. 'title', 'body').
- submit_requests()
-
Submits all queued batch requests to the Google Docs API batchUpdate endpoint.
- insert_text(%args)
-
Queues an insertText request.
%args:
text(required),index(optional),segment_id(optional). - delete_content(%args)
-
Queues a deleteContentRange request.
%args:
range(required hashref with startIndex/endIndex). - replace_all_text(%args)
-
Queues a replaceAllText request.
%args:
find(required),replacement(required),match_case(default true). - update_text_style(%args)
-
Queues an updateTextStyle request.
%args:
range(required),style(required hashref),fields(required). - update_paragraph_style(%args)
-
Queues an updateParagraphStyle request.
%args:
range(required),style(required hashref),fields(required). - insert_table(%args)
-
Queues an insertTable request.
%args:
index(required),rows(required),columns(required),segment_id(optional). - insert_inline_image(%args)
-
Queues an insertInlineImage request.
%args:
index(required),uri(required),width(optional hashref),height(optional hashref),segment_id(optional). - create_paragraph_bullets(%args)
-
Queues a createParagraphBullets request.
%args:
range(required),bullet_preset(required). - delete_paragraph_bullets(%args)
-
Queues a deleteParagraphBullets request.
%args:
range(required hashref). - create_named_range(%args)
-
Queues a createNamedRange request.
%args:
name(required),range(required hashref). - delete_named_range(named_range_id)
-
Queues a deleteNamedRange request.
- create_header(%args)
-
Queues a createHeader request.
%args:
type(required, e.g. 'DEFAULT'),section_break_location(optional hashref). -
Queues a createFooter request.
%args:
type(required),section_break_location(optional hashref). - delete_header(header_id)
-
Queues a deleteHeader request.
-
Queues a deleteFooter request.
- insert_page_break(%args)
-
Queues an insertPageBreak request.
%args:
index(required),segment_id(optional). - insert_section_break(%args)
-
Queues an insertSectionBreak request.
%args:
index(required),type(required),segment_id(optional). - update_document_style(%args)
-
Queues an updateDocumentStyle request.
%args:
style(required hashref),fields(required). - docs_api()
-
Returns the parent DocsApi1 object.
- rest_api()
-
Returns the underlying Google::RestApi instance.
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.