]> git.sesse.net Git - skvidarsync/commitdiff
Get more of the sheet, so that we get the headings (will be needed soon).
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 28 Oct 2023 10:56:51 +0000 (12:56 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 28 Oct 2023 10:56:51 +0000 (12:56 +0200)
bin/sync.pl

index 6fac46bcb5598e6225e07ba410611e3c46ff5cb1..5d09c24c893cee9000a564048753dff392b08ca2 100644 (file)
@@ -190,7 +190,7 @@ while (my $ref = $q->fetchrow_hashref) {
 }
 
 # Get the list of all people in the sheet (we're going to need them soon anyway).
-my $response = $ua->get('https://sheets.googleapis.com/v4/spreadsheets/' . $config::sheet_id . '?key=' . $config::gsheets_api_key . '&ranges=' . $tab_name . '!A9:Z5000&fields=sheets/data/rowData/values/userEnteredValue',
+my $response = $ua->get('https://sheets.googleapis.com/v4/spreadsheets/' . $config::sheet_id . '?key=' . $config::gsheets_api_key . '&ranges=' . $tab_name . '!A4:Z5000&fields=sheets/data/rowData/values/userEnteredValue',
        Authorization => 'Bearer ' . $token
 );
 my $main_sheet_json = JSON::XS::decode_json($response->decoded_content);
@@ -199,7 +199,7 @@ my $main_sheet_json = JSON::XS::decode_json($response->decoded_content);
 my %seen_names = ();
 {
        my $main_sheet_rows = $main_sheet_json->{'sheets'}[0]{'data'}[0]{'rowData'};
-       my $rowno = 9;
+       my $rowno = 4;
        for my $row (@$main_sheet_rows) {
                my $colno = 0;
                for my $val (@{$row->{'values'}}) {