[gapi.client.sheets] Update Google Sheets API with fixes (#37847)

* Update Google Sheets API with fixes

Updated typings for Google Sheets, generated using https://github.com/Maxim-Mazurok/google-api-typings-generator/tree/patch-1

* Update tests for gapi.client.sheets

* Fix bugs

* Added "resource" as a Request body

https://github.com/Maxim-Mazurok/google-api-typings-generator/pull/3

* Added ClearValuesRequest interface

* Disable no-empty-interface for empty interfaces
This commit is contained in:
Maxim Mazurok 2019-09-27 19:19:43 +03:00 committed by Ben Lichtman
parent 877a5c9df4
commit f50535eb66
2 changed files with 486 additions and 114 deletions

View File

@ -1,7 +1,7 @@
/* This is stub file for gapi.client.{{=it.name}} definition tests */
/* IMPORTANT.
* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually.
* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator
* This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator/tree/patch-1. Please do not edit it manually.
* In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator or https://github.com/Bolisov/google-api-typings-generator
**/
gapi.load('client', () => {
/** now we can use gapi.client */
@ -12,13 +12,13 @@ gapi.load('client', () => {
/** declare client_id registered in Google Developers Console */
const client_id = '<<PUT YOUR CLIENT ID HERE>>';
const scope = [
/** View and manage the files in your Google Drive */
/** See, edit, create, and delete all of your Google Drive files */
'https://www.googleapis.com/auth/drive',
/** View and manage Google Drive files and folders that you have opened or created with this app */
'https://www.googleapis.com/auth/drive.file',
/** View the files in your Google Drive */
/** See and download all your Google Drive files */
'https://www.googleapis.com/auth/drive.readonly',
/** View and manage your spreadsheets in Google Drive */
/** See, edit, create, and delete your spreadsheets in Google Drive */
'https://www.googleapis.com/auth/spreadsheets',
/** View your Google Spreadsheets */
'https://www.googleapis.com/auth/spreadsheets.readonly',
@ -57,11 +57,11 @@ gapi.load('client', () => {
* collaborator changes. If there are no collaborators, the spreadsheet
* should reflect your changes.
*/
await gapi.client.spreadsheets.batchUpdate({
await gapi.client.sheets.spreadsheets.batchUpdate({
spreadsheetId: "spreadsheetId",
});
/** Creates a spreadsheet, returning the newly created spreadsheet. */
await gapi.client.spreadsheets.create({
await gapi.client.sheets.spreadsheets.create({
});
/**
* Returns the spreadsheet at the given ID.
@ -86,7 +86,7 @@ gapi.load('client', () => {
* return only the portions of the spreadsheet that intersect the requested
* ranges. Ranges are specified using A1 notation.
*/
await gapi.client.spreadsheets.get({
await gapi.client.sheets.spreadsheets.get({
includeGridData: true,
ranges: "ranges",
spreadsheetId: "spreadsheetId",
@ -115,7 +115,7 @@ gapi.load('client', () => {
* For large spreadsheets, it is recommended to retrieve only the specific
* fields of the spreadsheet that you want.
*/
await gapi.client.spreadsheets.getByDataFilter({
await gapi.client.sheets.spreadsheets.getByDataFilter({
spreadsheetId: "spreadsheetId",
});
}

File diff suppressed because it is too large Load Diff