NAME
Tie::Google::Sheets::Client - Low level client used internally by Tie::Google::Sheets
VERSION
version 0.01
DESCRIPTION
This is a low level class used internally by Tie::Google::Sheets to talk to the Google Sheets API. It is not part of the public interface and may change without notice; do not use it directly.
ATTRIBUTES
spreadsheet_id
The id of the spreadsheet being accessed.
ua
The HTTP::AnyUA instance used to make requests.
access_token
The OAuth2 bearer token (or code reference) given to "new", if any.
service_account
The decoded service account key, if a service account was given to "new".
token
The most recently obtained OAuth2 access token, when authenticating via "service_account".
token_expires
The epoch time at which "token" expires.
CONSTRUCTOR
new
my $client = Tie::Google::Sheets::Client->new(%options);
Constructor. %options are the same as documented in "CONSTRUCTOR" in Tie::Google::Sheets.
METHODS
sheet_titles
my $titles = $client->sheet_titles;
Returns an array reference of worksheet titles.
sheet_id_for_title
my $sheet_id = $client->sheet_id_for_title($title);
Returns the numeric sheet id for the worksheet named $title, or undef if there is no such worksheet.
get_value
my $value = $client->get_value($title, $a1);
Returns the value of the cell $a1 (for example "A1") in worksheet $title.
update_value
$client->update_value($title, $a1, $value);
Sets the value of the cell $a1 in worksheet $title.
clear_value
$client->clear_value($title, $a1);
Clears the value of the cell $a1 in worksheet $title.
clear_range
$client->clear_range($title, $a1);
$client->clear_range($title);
Clears the value of the cell $a1 in worksheet $title, or, if $a1 is omitted, clears every cell in the worksheet.
get_all_values
my $rows = $client->get_all_values($title);
Returns an array reference of array references holding every value in the used range of worksheet $title.
add_sheet
$client->add_sheet($title);
Adds a new, empty worksheet named $title.
delete_sheet
$client->delete_sheet($title);
Deletes the worksheet named $title.
AUTHOR
Graham Ollis <plicease@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Graham Ollis.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.