pub struct SheetsApi<'a> { /* private fields */ }Expand description
Sheets API façade.
Implementations§
Source§impl<'a> SheetsApi<'a>
impl<'a> SheetsApi<'a>
Sourcepub fn new(client: &'a SheetsClient) -> Self
pub fn new(client: &'a SheetsClient) -> Self
Wraps an existing SheetsClient.
Sourcepub async fn get_spreadsheet(&self, spreadsheet_id: &str) -> Result<Spreadsheet>
pub async fn get_spreadsheet(&self, spreadsheet_id: &str) -> Result<Spreadsheet>
Fetches a spreadsheet’s metadata — its title and the list of sheets.
Always fields-masked; see [SPREADSHEET_FIELDS].
Sourcepub async fn get_spreadsheet_with_protections(
&self,
spreadsheet_id: &str,
) -> Result<Spreadsheet>
pub async fn get_spreadsheet_with_protections( &self, spreadsheet_id: &str, ) -> Result<Spreadsheet>
Fetches a spreadsheet’s metadata including protected ranges —
the one read the protection verbs need that no other caller does.
See [SPREADSHEET_FIELDS_WITH_PROTECTIONS].
Sourcepub async fn get_spreadsheet_with_filter_views(
&self,
spreadsheet_id: &str,
) -> Result<Spreadsheet>
pub async fn get_spreadsheet_with_filter_views( &self, spreadsheet_id: &str, ) -> Result<Spreadsheet>
Fetches a spreadsheet’s metadata including the basic filter and
filter views — the one read filter.rs’s verbs need that no other
caller does. See [SPREADSHEET_FIELDS_WITH_FILTER_VIEWS].
Sourcepub async fn get_spreadsheet_with_conditional_formats(
&self,
spreadsheet_id: &str,
) -> Result<Spreadsheet>
pub async fn get_spreadsheet_with_conditional_formats( &self, spreadsheet_id: &str, ) -> Result<Spreadsheet>
Fetches a spreadsheet’s metadata including conditional format
rules — shared by all four conditional_format.rs verbs (issue
#1793), mirroring Self::get_spreadsheet_with_protections’s reuse
across all four protection verbs. add-conditional-format doesn’t
strictly need the existing list, but reusing this one fetch instead
of adding a second, narrower one keeps Sheet.conditional_formats
consistently populated whenever any conditional-format verb runs.
See [SPREADSHEET_FIELDS_WITH_CONDITIONAL_FORMATS].
Sourcepub async fn get_spreadsheet_with_named_ranges(
&self,
spreadsheet_id: &str,
) -> Result<Spreadsheet>
pub async fn get_spreadsheet_with_named_ranges( &self, spreadsheet_id: &str, ) -> Result<Spreadsheet>
Fetches a spreadsheet’s metadata including named ranges — the
one read the named-range verbs need that no other caller does. See
[SPREADSHEET_FIELDS_WITH_NAMED_RANGES].
Sourcepub async fn get_spreadsheet_with_embedded_objects(
&self,
spreadsheet_id: &str,
) -> Result<Spreadsheet>
pub async fn get_spreadsheet_with_embedded_objects( &self, spreadsheet_id: &str, ) -> Result<Spreadsheet>
Fetches a spreadsheet’s metadata including charts and slicers —
shared by all eight embedded_object.rs verbs (issue #1797), the
same way Self::get_spreadsheet_with_conditional_formats is
shared by its four. See
[SPREADSHEET_FIELDS_WITH_EMBEDDED_OBJECTS].
Sourcepub async fn get_spreadsheet_with_pivot_tables(
&self,
spreadsheet_id: &str,
) -> Result<Spreadsheet>
pub async fn get_spreadsheet_with_pivot_tables( &self, spreadsheet_id: &str, ) -> Result<Spreadsheet>
Fetches a spreadsheet’s metadata including every populated cell’s
pivotTable property — list-pivot-tables’ one fetch (issue
#1798). See [SPREADSHEET_FIELDS_WITH_PIVOT_TABLES].
Sourcepub async fn get_spreadsheet_with_banding(
&self,
spreadsheet_id: &str,
) -> Result<Spreadsheet>
pub async fn get_spreadsheet_with_banding( &self, spreadsheet_id: &str, ) -> Result<Spreadsheet>
Fetches a spreadsheet’s metadata including banded ranges —
shared by all four banding.rs verbs (issue #1832), mirroring
Self::get_spreadsheet_with_filter_views’s reuse across its own
four verbs. See [SPREADSHEET_FIELDS_WITH_BANDING].
Sourcepub async fn get_spreadsheet_with_dimension_groups(
&self,
spreadsheet_id: &str,
) -> Result<Spreadsheet>
pub async fn get_spreadsheet_with_dimension_groups( &self, spreadsheet_id: &str, ) -> Result<Spreadsheet>
Fetches a spreadsheet’s metadata including dimension groups —
shared by all four dimension_group.rs verbs (issue #1833),
mirroring Self::get_spreadsheet_with_banding’s reuse across its
own four verbs. See [SPREADSHEET_FIELDS_WITH_DIMENSION_GROUPS].
Sourcepub async fn get_cell_pivot(
&self,
spreadsheet_id: &str,
composed_a1: &str,
) -> Result<Spreadsheet>
pub async fn get_cell_pivot( &self, spreadsheet_id: &str, composed_a1: &str, ) -> Result<Spreadsheet>
Fetches a single cell’s pivotTable property and displayed value —
add-pivot-table’s occupied-anchor check and delete-pivot-table’s
“currently:” preview (issue #1798). composed_a1 must be a
single-cell A1 reference carrying its own Sheet! prefix; the
response’s sheets list still carries every sheet’s properties (the
mask’s own sheets.properties(...) clause), but sheets.data is
scoped to composed_a1 by the ranges query parameter. See
[CELL_PIVOT_FIELDS].
Sourcepub async fn get_cell_formats(
&self,
spreadsheet_id: &str,
composed_a1: &str,
) -> Result<Spreadsheet>
pub async fn get_cell_formats( &self, spreadsheet_id: &str, composed_a1: &str, ) -> Result<Spreadsheet>
Fetches a range’s cell-level formatting — read-cell-format (issue
#1878). composed_a1 may be any range a1::compose can build, not
just a single cell; the response’s sheets.data is scoped to it by
the ranges query parameter. See [CELL_FORMAT_FIELDS].
Sourcepub async fn values_get(
&self,
spreadsheet_id: &str,
range: &str,
render: ValueRenderOption,
) -> Result<ValueRange>
pub async fn values_get( &self, spreadsheet_id: &str, range: &str, render: ValueRenderOption, ) -> Result<ValueRange>
Fetches the cell values of a single A1 range.
Sourcepub async fn values_batch_get(
&self,
spreadsheet_id: &str,
ranges: &[String],
render: ValueRenderOption,
) -> Result<BatchGetValuesResponse>
pub async fn values_batch_get( &self, spreadsheet_id: &str, ranges: &[String], render: ValueRenderOption, ) -> Result<BatchGetValuesResponse>
Fetches the cell values of several A1 ranges in one request.
Callers must match results on each ValueRange::range, never on the
order of ranges — see that field’s docs.
Sourcepub async fn search_developer_metadata(
&self,
spreadsheet_id: &str,
filters: Vec<DataFilter>,
) -> Result<SearchDeveloperMetadataResponse>
pub async fn search_developer_metadata( &self, spreadsheet_id: &str, filters: Vec<DataFilter>, ) -> Result<SearchDeveloperMetadataResponse>
Searches for developer-metadata entries matching filters
(issue #1795, ADR-0081 §4).
Read-only, so — unlike Self::batch_update/Self::copy_to —
this is plain pub, not pub(in crate::drive), and never goes
through [append_write_scope_hint]: nothing here mutates.
developer_metadata.rs is the one caller, and it always includes
visibility: DOCUMENT_VISIBILITY in every filter it builds, so the
server itself never returns a PROJECT-visibility entry to begin
with.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SheetsApi<'a>
impl<'a> !UnwindSafe for SheetsApi<'a>
impl<'a> Freeze for SheetsApi<'a>
impl<'a> Send for SheetsApi<'a>
impl<'a> Sync for SheetsApi<'a>
impl<'a> Unpin for SheetsApi<'a>
impl<'a> UnsafeUnpin for SheetsApi<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more