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
+1 -1
View File
@@ -5,6 +5,7 @@
"version": "2.13.1",
"exports": "./src/index.js",
"dependencies": {
"@googleapis/sheets": "^5.0.5",
"body-parser": "^1.20.0",
"cors": "^2.8.5",
"dotenv": "^16.0.1",
@@ -13,7 +14,6 @@
"express-static-gzip": "^2.1.7",
"express-validator": "^6.14.2",
"google-auth-library": "^9.2.0",
"googleapis": "^128.0.0",
"lowdb": "^5.0.5",
"multer": "^1.4.5-lts.1",
"node-osc": "^9.0.2",
+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',