Expand description
Docs v1 API façade — typed wrappers over the endpoints the CLI needs,
mirroring crate::drive::sheets::api::SheetsApi’s shape.
Free build_*_url functions take a literal base_url so they are
unit-testable without a client, exactly like sheets/api.rs’s and
files_api.rs’s.
§Why there is no fields mask
spreadsheets.get is always masked, because unmasked it embeds every
cell of every sheet. The mirror-image decision here is the opposite one,
and it is deliberate rather than an omission — there is a test pinning
it. Three reasons:
- A Docs mask cannot be made recursion-safe. A
fieldsmask spells nesting depth out literally, and a table may contain a table to arbitrary depth. Any fixed-depth mask therefore silently drops document text below its deepest named level — partial content indistinguishable from complete content, which is exactly the failure modeMAX_SHEETS_PER_READrefuses rather than tolerates. - It would have to be written twice. With
includeTabsContent=truethe content lives undertabs.documentTab.body.content…, notbody.content…, so the mask’s root depends on a query parameter. Two masks that must agree is two masks that will diverge. - The payload is bounded in a way a spreadsheet’s is not. Google caps a Doc at roughly a million characters, so the worst-case response is large but bounded; a spreadsheet’s cell count has no comparable ceiling.
[MAX_DOCUMENT_BYTES] is the guard that replaces it. If payload size
ever does become a problem, a mask belongs on the info path only
(which needs a shallow skeleton and no recursion) and must never be
applied to read.
Structs§
- DocsApi
- Docs API façade.
Enums§
- Suggestions
View Mode - How the API should render pending suggestions.