use only sheets portion of google api

This commit is contained in:
arc-alex
2023-11-17 16:15:28 +01:00
parent e9683c6cab
commit 81cf30daa0
3 changed files with 16 additions and 17 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import { OAuth2Client } from 'google-auth-library';
import { readFile, writeFile } from 'fs/promises';
import { google } from 'googleapis';
import { sheets } from '@googleapis/sheets';
import http from 'http';
import { URL } from 'url';
import { logger } from '../classes/Logger.js';
@@ -55,7 +55,7 @@ class sheet {
throw new Error('Got incorrect options to excel import', JSON.parse(options));
}
const rq = await google.sheets({ version: 'v4', auth: sheet.client }).spreadsheets.values.get({
const rq = await sheets({ version: 'v4', auth: sheet.client }).spreadsheets.values.get({
spreadsheetId: sheetId,
valueRenderOption: 'FORMATTED_VALUE',
majorDimension: 'ROWS',