@googleapis/sheets 5.0.0 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/build/v4.d.ts +1 -1022
- package/build/v4.js.map +1 -1
- package/package.json +1 -1
- package/v4.ts +1 -1022
package/build/v4.d.ts
CHANGED
|
@@ -3520,7 +3520,7 @@ export declare namespace sheets_v4 {
|
|
|
3520
3520
|
*/
|
|
3521
3521
|
randomizeRange?: Schema$RandomizeRangeRequest;
|
|
3522
3522
|
/**
|
|
3523
|
-
*
|
|
3523
|
+
* Refreshes one or multiple data sources and associated dbobjects.
|
|
3524
3524
|
*/
|
|
3525
3525
|
refreshDataSource?: Schema$RefreshDataSourceRequest;
|
|
3526
3526
|
/**
|
|
@@ -4886,65 +4886,6 @@ export declare namespace sheets_v4 {
|
|
|
4886
4886
|
constructor(context: APIRequestContext);
|
|
4887
4887
|
/**
|
|
4888
4888
|
* Applies one or more updates to the spreadsheet. Each request is validated before being applied. If any request is not valid then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. The replies will mirror the requests. For example, if you applied 4 updates and the 3rd one had a reply, then the response will have 2 empty replies, the actual reply, and another empty reply, in that order. Due to the collaborative nature of spreadsheets, it is not guaranteed that the spreadsheet will reflect exactly your changes after this completes, however it is guaranteed that the updates in the request will be applied together atomically. Your changes may be altered with respect to collaborator changes. If there are no collaborators, the spreadsheet should reflect your changes.
|
|
4889
|
-
* @example
|
|
4890
|
-
* ```js
|
|
4891
|
-
* // Before running the sample:
|
|
4892
|
-
* // - Enable the API at:
|
|
4893
|
-
* // https://console.developers.google.com/apis/api/sheets.googleapis.com
|
|
4894
|
-
* // - Login into gcloud by running:
|
|
4895
|
-
* // `$ gcloud auth application-default login`
|
|
4896
|
-
* // - Install the npm module by running:
|
|
4897
|
-
* // `$ npm install googleapis`
|
|
4898
|
-
*
|
|
4899
|
-
* const {google} = require('googleapis');
|
|
4900
|
-
* const sheets = google.sheets('v4');
|
|
4901
|
-
*
|
|
4902
|
-
* async function main() {
|
|
4903
|
-
* const auth = new google.auth.GoogleAuth({
|
|
4904
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4905
|
-
* scopes: [
|
|
4906
|
-
* 'https://www.googleapis.com/auth/drive',
|
|
4907
|
-
* 'https://www.googleapis.com/auth/drive.file',
|
|
4908
|
-
* 'https://www.googleapis.com/auth/spreadsheets',
|
|
4909
|
-
* ],
|
|
4910
|
-
* });
|
|
4911
|
-
*
|
|
4912
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
4913
|
-
* const authClient = await auth.getClient();
|
|
4914
|
-
* google.options({auth: authClient});
|
|
4915
|
-
*
|
|
4916
|
-
* // Do the magic
|
|
4917
|
-
* const res = await sheets.spreadsheets.batchUpdate({
|
|
4918
|
-
* // The spreadsheet to apply the updates to.
|
|
4919
|
-
* spreadsheetId: 'placeholder-value',
|
|
4920
|
-
*
|
|
4921
|
-
* // Request body metadata
|
|
4922
|
-
* requestBody: {
|
|
4923
|
-
* // request body parameters
|
|
4924
|
-
* // {
|
|
4925
|
-
* // "includeSpreadsheetInResponse": false,
|
|
4926
|
-
* // "requests": [],
|
|
4927
|
-
* // "responseIncludeGridData": false,
|
|
4928
|
-
* // "responseRanges": []
|
|
4929
|
-
* // }
|
|
4930
|
-
* },
|
|
4931
|
-
* });
|
|
4932
|
-
* console.log(res.data);
|
|
4933
|
-
*
|
|
4934
|
-
* // Example response
|
|
4935
|
-
* // {
|
|
4936
|
-
* // "replies": [],
|
|
4937
|
-
* // "spreadsheetId": "my_spreadsheetId",
|
|
4938
|
-
* // "updatedSpreadsheet": {}
|
|
4939
|
-
* // }
|
|
4940
|
-
* }
|
|
4941
|
-
*
|
|
4942
|
-
* main().catch(e => {
|
|
4943
|
-
* console.error(e);
|
|
4944
|
-
* throw e;
|
|
4945
|
-
* });
|
|
4946
|
-
*
|
|
4947
|
-
* ```
|
|
4948
4889
|
*
|
|
4949
4890
|
* @param params - Parameters for request
|
|
4950
4891
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4959,71 +4900,6 @@ export declare namespace sheets_v4 {
|
|
|
4959
4900
|
batchUpdate(callback: BodyResponseCallback<Schema$BatchUpdateSpreadsheetResponse>): void;
|
|
4960
4901
|
/**
|
|
4961
4902
|
* Creates a spreadsheet, returning the newly created spreadsheet.
|
|
4962
|
-
* @example
|
|
4963
|
-
* ```js
|
|
4964
|
-
* // Before running the sample:
|
|
4965
|
-
* // - Enable the API at:
|
|
4966
|
-
* // https://console.developers.google.com/apis/api/sheets.googleapis.com
|
|
4967
|
-
* // - Login into gcloud by running:
|
|
4968
|
-
* // `$ gcloud auth application-default login`
|
|
4969
|
-
* // - Install the npm module by running:
|
|
4970
|
-
* // `$ npm install googleapis`
|
|
4971
|
-
*
|
|
4972
|
-
* const {google} = require('googleapis');
|
|
4973
|
-
* const sheets = google.sheets('v4');
|
|
4974
|
-
*
|
|
4975
|
-
* async function main() {
|
|
4976
|
-
* const auth = new google.auth.GoogleAuth({
|
|
4977
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4978
|
-
* scopes: [
|
|
4979
|
-
* 'https://www.googleapis.com/auth/drive',
|
|
4980
|
-
* 'https://www.googleapis.com/auth/drive.file',
|
|
4981
|
-
* 'https://www.googleapis.com/auth/spreadsheets',
|
|
4982
|
-
* ],
|
|
4983
|
-
* });
|
|
4984
|
-
*
|
|
4985
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
4986
|
-
* const authClient = await auth.getClient();
|
|
4987
|
-
* google.options({auth: authClient});
|
|
4988
|
-
*
|
|
4989
|
-
* // Do the magic
|
|
4990
|
-
* const res = await sheets.spreadsheets.create({
|
|
4991
|
-
* // Request body metadata
|
|
4992
|
-
* requestBody: {
|
|
4993
|
-
* // request body parameters
|
|
4994
|
-
* // {
|
|
4995
|
-
* // "dataSourceSchedules": [],
|
|
4996
|
-
* // "dataSources": [],
|
|
4997
|
-
* // "developerMetadata": [],
|
|
4998
|
-
* // "namedRanges": [],
|
|
4999
|
-
* // "properties": {},
|
|
5000
|
-
* // "sheets": [],
|
|
5001
|
-
* // "spreadsheetId": "my_spreadsheetId",
|
|
5002
|
-
* // "spreadsheetUrl": "my_spreadsheetUrl"
|
|
5003
|
-
* // }
|
|
5004
|
-
* },
|
|
5005
|
-
* });
|
|
5006
|
-
* console.log(res.data);
|
|
5007
|
-
*
|
|
5008
|
-
* // Example response
|
|
5009
|
-
* // {
|
|
5010
|
-
* // "dataSourceSchedules": [],
|
|
5011
|
-
* // "dataSources": [],
|
|
5012
|
-
* // "developerMetadata": [],
|
|
5013
|
-
* // "namedRanges": [],
|
|
5014
|
-
* // "properties": {},
|
|
5015
|
-
* // "sheets": [],
|
|
5016
|
-
* // "spreadsheetId": "my_spreadsheetId",
|
|
5017
|
-
* // "spreadsheetUrl": "my_spreadsheetUrl"
|
|
5018
|
-
* // }
|
|
5019
|
-
* }
|
|
5020
|
-
*
|
|
5021
|
-
* main().catch(e => {
|
|
5022
|
-
* console.error(e);
|
|
5023
|
-
* throw e;
|
|
5024
|
-
* });
|
|
5025
|
-
*
|
|
5026
|
-
* ```
|
|
5027
4903
|
*
|
|
5028
4904
|
* @param params - Parameters for request
|
|
5029
4905
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5038,65 +4914,6 @@ export declare namespace sheets_v4 {
|
|
|
5038
4914
|
create(callback: BodyResponseCallback<Schema$Spreadsheet>): void;
|
|
5039
4915
|
/**
|
|
5040
4916
|
* Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID. By default, data within grids is not returned. You can include grid data in one of 2 ways: * Specify a [field mask](https://developers.google.com/sheets/api/guides/field-masks) listing your desired fields using the `fields` URL parameter in HTTP * Set the includeGridData URL parameter to true. If a field mask is set, the `includeGridData` parameter is ignored For large spreadsheets, as a best practice, retrieve only the specific spreadsheet fields that you want. To retrieve only subsets of spreadsheet data, use the ranges URL parameter. Ranges are specified using [A1 notation](/sheets/api/guides/concepts#cell). You can define a single cell (for example, `A1`) or multiple cells (for example, `A1:D5`). You can also get cells from other sheets within the same spreadsheet (for example, `Sheet2!A1:C4`) or retrieve multiple ranges at once (for example, `?ranges=A1:D5&ranges=Sheet2!A1:C4`). Limiting the range returns only the portions of the spreadsheet that intersect the requested ranges.
|
|
5041
|
-
* @example
|
|
5042
|
-
* ```js
|
|
5043
|
-
* // Before running the sample:
|
|
5044
|
-
* // - Enable the API at:
|
|
5045
|
-
* // https://console.developers.google.com/apis/api/sheets.googleapis.com
|
|
5046
|
-
* // - Login into gcloud by running:
|
|
5047
|
-
* // `$ gcloud auth application-default login`
|
|
5048
|
-
* // - Install the npm module by running:
|
|
5049
|
-
* // `$ npm install googleapis`
|
|
5050
|
-
*
|
|
5051
|
-
* const {google} = require('googleapis');
|
|
5052
|
-
* const sheets = google.sheets('v4');
|
|
5053
|
-
*
|
|
5054
|
-
* async function main() {
|
|
5055
|
-
* const auth = new google.auth.GoogleAuth({
|
|
5056
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5057
|
-
* scopes: [
|
|
5058
|
-
* 'https://www.googleapis.com/auth/drive',
|
|
5059
|
-
* 'https://www.googleapis.com/auth/drive.file',
|
|
5060
|
-
* 'https://www.googleapis.com/auth/drive.readonly',
|
|
5061
|
-
* 'https://www.googleapis.com/auth/spreadsheets',
|
|
5062
|
-
* 'https://www.googleapis.com/auth/spreadsheets.readonly',
|
|
5063
|
-
* ],
|
|
5064
|
-
* });
|
|
5065
|
-
*
|
|
5066
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
5067
|
-
* const authClient = await auth.getClient();
|
|
5068
|
-
* google.options({auth: authClient});
|
|
5069
|
-
*
|
|
5070
|
-
* // Do the magic
|
|
5071
|
-
* const res = await sheets.spreadsheets.get({
|
|
5072
|
-
* // True if grid data should be returned. This parameter is ignored if a field mask was set in the request.
|
|
5073
|
-
* includeGridData: 'placeholder-value',
|
|
5074
|
-
* // The ranges to retrieve from the spreadsheet.
|
|
5075
|
-
* ranges: 'placeholder-value',
|
|
5076
|
-
* // The spreadsheet to request.
|
|
5077
|
-
* spreadsheetId: 'placeholder-value',
|
|
5078
|
-
* });
|
|
5079
|
-
* console.log(res.data);
|
|
5080
|
-
*
|
|
5081
|
-
* // Example response
|
|
5082
|
-
* // {
|
|
5083
|
-
* // "dataSourceSchedules": [],
|
|
5084
|
-
* // "dataSources": [],
|
|
5085
|
-
* // "developerMetadata": [],
|
|
5086
|
-
* // "namedRanges": [],
|
|
5087
|
-
* // "properties": {},
|
|
5088
|
-
* // "sheets": [],
|
|
5089
|
-
* // "spreadsheetId": "my_spreadsheetId",
|
|
5090
|
-
* // "spreadsheetUrl": "my_spreadsheetUrl"
|
|
5091
|
-
* // }
|
|
5092
|
-
* }
|
|
5093
|
-
*
|
|
5094
|
-
* main().catch(e => {
|
|
5095
|
-
* console.error(e);
|
|
5096
|
-
* throw e;
|
|
5097
|
-
* });
|
|
5098
|
-
*
|
|
5099
|
-
* ```
|
|
5100
4917
|
*
|
|
5101
4918
|
* @param params - Parameters for request
|
|
5102
4919
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5111,68 +4928,6 @@ export declare namespace sheets_v4 {
|
|
|
5111
4928
|
get(callback: BodyResponseCallback<Schema$Spreadsheet>): void;
|
|
5112
4929
|
/**
|
|
5113
4930
|
* Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID. This method differs from GetSpreadsheet in that it allows selecting which subsets of spreadsheet data to return by specifying a dataFilters parameter. Multiple DataFilters can be specified. Specifying one or more data filters returns the portions of the spreadsheet that intersect ranges matched by any of the filters. By default, data within grids is not returned. You can include grid data one of 2 ways: * Specify a [field mask](https://developers.google.com/sheets/api/guides/field-masks) listing your desired fields using the `fields` URL parameter in HTTP * Set the includeGridData parameter to true. If a field mask is set, the `includeGridData` parameter is ignored For large spreadsheets, as a best practice, retrieve only the specific spreadsheet fields that you want.
|
|
5114
|
-
* @example
|
|
5115
|
-
* ```js
|
|
5116
|
-
* // Before running the sample:
|
|
5117
|
-
* // - Enable the API at:
|
|
5118
|
-
* // https://console.developers.google.com/apis/api/sheets.googleapis.com
|
|
5119
|
-
* // - Login into gcloud by running:
|
|
5120
|
-
* // `$ gcloud auth application-default login`
|
|
5121
|
-
* // - Install the npm module by running:
|
|
5122
|
-
* // `$ npm install googleapis`
|
|
5123
|
-
*
|
|
5124
|
-
* const {google} = require('googleapis');
|
|
5125
|
-
* const sheets = google.sheets('v4');
|
|
5126
|
-
*
|
|
5127
|
-
* async function main() {
|
|
5128
|
-
* const auth = new google.auth.GoogleAuth({
|
|
5129
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5130
|
-
* scopes: [
|
|
5131
|
-
* 'https://www.googleapis.com/auth/drive',
|
|
5132
|
-
* 'https://www.googleapis.com/auth/drive.file',
|
|
5133
|
-
* 'https://www.googleapis.com/auth/spreadsheets',
|
|
5134
|
-
* ],
|
|
5135
|
-
* });
|
|
5136
|
-
*
|
|
5137
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
5138
|
-
* const authClient = await auth.getClient();
|
|
5139
|
-
* google.options({auth: authClient});
|
|
5140
|
-
*
|
|
5141
|
-
* // Do the magic
|
|
5142
|
-
* const res = await sheets.spreadsheets.getByDataFilter({
|
|
5143
|
-
* // The spreadsheet to request.
|
|
5144
|
-
* spreadsheetId: 'placeholder-value',
|
|
5145
|
-
*
|
|
5146
|
-
* // Request body metadata
|
|
5147
|
-
* requestBody: {
|
|
5148
|
-
* // request body parameters
|
|
5149
|
-
* // {
|
|
5150
|
-
* // "dataFilters": [],
|
|
5151
|
-
* // "includeGridData": false
|
|
5152
|
-
* // }
|
|
5153
|
-
* },
|
|
5154
|
-
* });
|
|
5155
|
-
* console.log(res.data);
|
|
5156
|
-
*
|
|
5157
|
-
* // Example response
|
|
5158
|
-
* // {
|
|
5159
|
-
* // "dataSourceSchedules": [],
|
|
5160
|
-
* // "dataSources": [],
|
|
5161
|
-
* // "developerMetadata": [],
|
|
5162
|
-
* // "namedRanges": [],
|
|
5163
|
-
* // "properties": {},
|
|
5164
|
-
* // "sheets": [],
|
|
5165
|
-
* // "spreadsheetId": "my_spreadsheetId",
|
|
5166
|
-
* // "spreadsheetUrl": "my_spreadsheetUrl"
|
|
5167
|
-
* // }
|
|
5168
|
-
* }
|
|
5169
|
-
*
|
|
5170
|
-
* main().catch(e => {
|
|
5171
|
-
* console.error(e);
|
|
5172
|
-
* throw e;
|
|
5173
|
-
* });
|
|
5174
|
-
*
|
|
5175
|
-
* ```
|
|
5176
4931
|
*
|
|
5177
4932
|
* @param params - Parameters for request
|
|
5178
4933
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5231,58 +4986,6 @@ export declare namespace sheets_v4 {
|
|
|
5231
4986
|
constructor(context: APIRequestContext);
|
|
5232
4987
|
/**
|
|
5233
4988
|
* Returns the developer metadata with the specified ID. The caller must specify the spreadsheet ID and the developer metadata's unique metadataId.
|
|
5234
|
-
* @example
|
|
5235
|
-
* ```js
|
|
5236
|
-
* // Before running the sample:
|
|
5237
|
-
* // - Enable the API at:
|
|
5238
|
-
* // https://console.developers.google.com/apis/api/sheets.googleapis.com
|
|
5239
|
-
* // - Login into gcloud by running:
|
|
5240
|
-
* // `$ gcloud auth application-default login`
|
|
5241
|
-
* // - Install the npm module by running:
|
|
5242
|
-
* // `$ npm install googleapis`
|
|
5243
|
-
*
|
|
5244
|
-
* const {google} = require('googleapis');
|
|
5245
|
-
* const sheets = google.sheets('v4');
|
|
5246
|
-
*
|
|
5247
|
-
* async function main() {
|
|
5248
|
-
* const auth = new google.auth.GoogleAuth({
|
|
5249
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5250
|
-
* scopes: [
|
|
5251
|
-
* 'https://www.googleapis.com/auth/drive',
|
|
5252
|
-
* 'https://www.googleapis.com/auth/drive.file',
|
|
5253
|
-
* 'https://www.googleapis.com/auth/spreadsheets',
|
|
5254
|
-
* ],
|
|
5255
|
-
* });
|
|
5256
|
-
*
|
|
5257
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
5258
|
-
* const authClient = await auth.getClient();
|
|
5259
|
-
* google.options({auth: authClient});
|
|
5260
|
-
*
|
|
5261
|
-
* // Do the magic
|
|
5262
|
-
* const res = await sheets.spreadsheets.developerMetadata.get({
|
|
5263
|
-
* // The ID of the developer metadata to retrieve.
|
|
5264
|
-
* metadataId: 'placeholder-value',
|
|
5265
|
-
* // The ID of the spreadsheet to retrieve metadata from.
|
|
5266
|
-
* spreadsheetId: 'placeholder-value',
|
|
5267
|
-
* });
|
|
5268
|
-
* console.log(res.data);
|
|
5269
|
-
*
|
|
5270
|
-
* // Example response
|
|
5271
|
-
* // {
|
|
5272
|
-
* // "location": {},
|
|
5273
|
-
* // "metadataId": 0,
|
|
5274
|
-
* // "metadataKey": "my_metadataKey",
|
|
5275
|
-
* // "metadataValue": "my_metadataValue",
|
|
5276
|
-
* // "visibility": "my_visibility"
|
|
5277
|
-
* // }
|
|
5278
|
-
* }
|
|
5279
|
-
*
|
|
5280
|
-
* main().catch(e => {
|
|
5281
|
-
* console.error(e);
|
|
5282
|
-
* throw e;
|
|
5283
|
-
* });
|
|
5284
|
-
*
|
|
5285
|
-
* ```
|
|
5286
4989
|
*
|
|
5287
4990
|
* @param params - Parameters for request
|
|
5288
4991
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5297,60 +5000,6 @@ export declare namespace sheets_v4 {
|
|
|
5297
5000
|
get(callback: BodyResponseCallback<Schema$DeveloperMetadata>): void;
|
|
5298
5001
|
/**
|
|
5299
5002
|
* Returns all developer metadata matching the specified DataFilter. If the provided DataFilter represents a DeveloperMetadataLookup object, this will return all DeveloperMetadata entries selected by it. If the DataFilter represents a location in a spreadsheet, this will return all developer metadata associated with locations intersecting that region.
|
|
5300
|
-
* @example
|
|
5301
|
-
* ```js
|
|
5302
|
-
* // Before running the sample:
|
|
5303
|
-
* // - Enable the API at:
|
|
5304
|
-
* // https://console.developers.google.com/apis/api/sheets.googleapis.com
|
|
5305
|
-
* // - Login into gcloud by running:
|
|
5306
|
-
* // `$ gcloud auth application-default login`
|
|
5307
|
-
* // - Install the npm module by running:
|
|
5308
|
-
* // `$ npm install googleapis`
|
|
5309
|
-
*
|
|
5310
|
-
* const {google} = require('googleapis');
|
|
5311
|
-
* const sheets = google.sheets('v4');
|
|
5312
|
-
*
|
|
5313
|
-
* async function main() {
|
|
5314
|
-
* const auth = new google.auth.GoogleAuth({
|
|
5315
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5316
|
-
* scopes: [
|
|
5317
|
-
* 'https://www.googleapis.com/auth/drive',
|
|
5318
|
-
* 'https://www.googleapis.com/auth/drive.file',
|
|
5319
|
-
* 'https://www.googleapis.com/auth/spreadsheets',
|
|
5320
|
-
* ],
|
|
5321
|
-
* });
|
|
5322
|
-
*
|
|
5323
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
5324
|
-
* const authClient = await auth.getClient();
|
|
5325
|
-
* google.options({auth: authClient});
|
|
5326
|
-
*
|
|
5327
|
-
* // Do the magic
|
|
5328
|
-
* const res = await sheets.spreadsheets.developerMetadata.search({
|
|
5329
|
-
* // The ID of the spreadsheet to retrieve metadata from.
|
|
5330
|
-
* spreadsheetId: 'placeholder-value',
|
|
5331
|
-
*
|
|
5332
|
-
* // Request body metadata
|
|
5333
|
-
* requestBody: {
|
|
5334
|
-
* // request body parameters
|
|
5335
|
-
* // {
|
|
5336
|
-
* // "dataFilters": []
|
|
5337
|
-
* // }
|
|
5338
|
-
* },
|
|
5339
|
-
* });
|
|
5340
|
-
* console.log(res.data);
|
|
5341
|
-
*
|
|
5342
|
-
* // Example response
|
|
5343
|
-
* // {
|
|
5344
|
-
* // "matchedDeveloperMetadata": []
|
|
5345
|
-
* // }
|
|
5346
|
-
* }
|
|
5347
|
-
*
|
|
5348
|
-
* main().catch(e => {
|
|
5349
|
-
* console.error(e);
|
|
5350
|
-
* throw e;
|
|
5351
|
-
* });
|
|
5352
|
-
*
|
|
5353
|
-
* ```
|
|
5354
5003
|
*
|
|
5355
5004
|
* @param params - Parameters for request
|
|
5356
5005
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5389,71 +5038,6 @@ export declare namespace sheets_v4 {
|
|
|
5389
5038
|
constructor(context: APIRequestContext);
|
|
5390
5039
|
/**
|
|
5391
5040
|
* Copies a single sheet from a spreadsheet to another spreadsheet. Returns the properties of the newly created sheet.
|
|
5392
|
-
* @example
|
|
5393
|
-
* ```js
|
|
5394
|
-
* // Before running the sample:
|
|
5395
|
-
* // - Enable the API at:
|
|
5396
|
-
* // https://console.developers.google.com/apis/api/sheets.googleapis.com
|
|
5397
|
-
* // - Login into gcloud by running:
|
|
5398
|
-
* // `$ gcloud auth application-default login`
|
|
5399
|
-
* // - Install the npm module by running:
|
|
5400
|
-
* // `$ npm install googleapis`
|
|
5401
|
-
*
|
|
5402
|
-
* const {google} = require('googleapis');
|
|
5403
|
-
* const sheets = google.sheets('v4');
|
|
5404
|
-
*
|
|
5405
|
-
* async function main() {
|
|
5406
|
-
* const auth = new google.auth.GoogleAuth({
|
|
5407
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5408
|
-
* scopes: [
|
|
5409
|
-
* 'https://www.googleapis.com/auth/drive',
|
|
5410
|
-
* 'https://www.googleapis.com/auth/drive.file',
|
|
5411
|
-
* 'https://www.googleapis.com/auth/spreadsheets',
|
|
5412
|
-
* ],
|
|
5413
|
-
* });
|
|
5414
|
-
*
|
|
5415
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
5416
|
-
* const authClient = await auth.getClient();
|
|
5417
|
-
* google.options({auth: authClient});
|
|
5418
|
-
*
|
|
5419
|
-
* // Do the magic
|
|
5420
|
-
* const res = await sheets.spreadsheets.sheets.copyTo({
|
|
5421
|
-
* // The ID of the sheet to copy.
|
|
5422
|
-
* sheetId: 'placeholder-value',
|
|
5423
|
-
* // The ID of the spreadsheet containing the sheet to copy.
|
|
5424
|
-
* spreadsheetId: 'placeholder-value',
|
|
5425
|
-
*
|
|
5426
|
-
* // Request body metadata
|
|
5427
|
-
* requestBody: {
|
|
5428
|
-
* // request body parameters
|
|
5429
|
-
* // {
|
|
5430
|
-
* // "destinationSpreadsheetId": "my_destinationSpreadsheetId"
|
|
5431
|
-
* // }
|
|
5432
|
-
* },
|
|
5433
|
-
* });
|
|
5434
|
-
* console.log(res.data);
|
|
5435
|
-
*
|
|
5436
|
-
* // Example response
|
|
5437
|
-
* // {
|
|
5438
|
-
* // "dataSourceSheetProperties": {},
|
|
5439
|
-
* // "gridProperties": {},
|
|
5440
|
-
* // "hidden": false,
|
|
5441
|
-
* // "index": 0,
|
|
5442
|
-
* // "rightToLeft": false,
|
|
5443
|
-
* // "sheetId": 0,
|
|
5444
|
-
* // "sheetType": "my_sheetType",
|
|
5445
|
-
* // "tabColor": {},
|
|
5446
|
-
* // "tabColorStyle": {},
|
|
5447
|
-
* // "title": "my_title"
|
|
5448
|
-
* // }
|
|
5449
|
-
* }
|
|
5450
|
-
*
|
|
5451
|
-
* main().catch(e => {
|
|
5452
|
-
* console.error(e);
|
|
5453
|
-
* throw e;
|
|
5454
|
-
* });
|
|
5455
|
-
*
|
|
5456
|
-
* ```
|
|
5457
5041
|
*
|
|
5458
5042
|
* @param params - Parameters for request
|
|
5459
5043
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5486,76 +5070,6 @@ export declare namespace sheets_v4 {
|
|
|
5486
5070
|
constructor(context: APIRequestContext);
|
|
5487
5071
|
/**
|
|
5488
5072
|
* Appends values to a spreadsheet. The input range is used to search for existing data and find a "table" within that range. Values will be appended to the next row of the table, starting with the first column of the table. See the [guide](/sheets/api/guides/values#appending_values) and [sample code](/sheets/api/samples/writing#append_values) for specific details of how tables are detected and data is appended. The caller must specify the spreadsheet ID, range, and a valueInputOption. The `valueInputOption` only controls how the input data will be added to the sheet (column-wise or row-wise), it does not influence what cell the data starts being written to.
|
|
5489
|
-
* @example
|
|
5490
|
-
* ```js
|
|
5491
|
-
* // Before running the sample:
|
|
5492
|
-
* // - Enable the API at:
|
|
5493
|
-
* // https://console.developers.google.com/apis/api/sheets.googleapis.com
|
|
5494
|
-
* // - Login into gcloud by running:
|
|
5495
|
-
* // `$ gcloud auth application-default login`
|
|
5496
|
-
* // - Install the npm module by running:
|
|
5497
|
-
* // `$ npm install googleapis`
|
|
5498
|
-
*
|
|
5499
|
-
* const {google} = require('googleapis');
|
|
5500
|
-
* const sheets = google.sheets('v4');
|
|
5501
|
-
*
|
|
5502
|
-
* async function main() {
|
|
5503
|
-
* const auth = new google.auth.GoogleAuth({
|
|
5504
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5505
|
-
* scopes: [
|
|
5506
|
-
* 'https://www.googleapis.com/auth/drive',
|
|
5507
|
-
* 'https://www.googleapis.com/auth/drive.file',
|
|
5508
|
-
* 'https://www.googleapis.com/auth/spreadsheets',
|
|
5509
|
-
* ],
|
|
5510
|
-
* });
|
|
5511
|
-
*
|
|
5512
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
5513
|
-
* const authClient = await auth.getClient();
|
|
5514
|
-
* google.options({auth: authClient});
|
|
5515
|
-
*
|
|
5516
|
-
* // Do the magic
|
|
5517
|
-
* const res = await sheets.spreadsheets.values.append({
|
|
5518
|
-
* // Determines if the update response should include the values of the cells that were appended. By default, responses do not include the updated values.
|
|
5519
|
-
* includeValuesInResponse: 'placeholder-value',
|
|
5520
|
-
* // How the input data should be inserted.
|
|
5521
|
-
* insertDataOption: 'placeholder-value',
|
|
5522
|
-
* // The [A1 notation](/sheets/api/guides/concepts#cell) of a range to search for a logical table of data. Values are appended after the last row of the table.
|
|
5523
|
-
* range: 'placeholder-value',
|
|
5524
|
-
* // Determines how dates, times, and durations in the response should be rendered. This is ignored if response_value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.
|
|
5525
|
-
* responseDateTimeRenderOption: 'placeholder-value',
|
|
5526
|
-
* // Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE.
|
|
5527
|
-
* responseValueRenderOption: 'placeholder-value',
|
|
5528
|
-
* // The ID of the spreadsheet to update.
|
|
5529
|
-
* spreadsheetId: 'placeholder-value',
|
|
5530
|
-
* // How the input data should be interpreted.
|
|
5531
|
-
* valueInputOption: 'placeholder-value',
|
|
5532
|
-
*
|
|
5533
|
-
* // Request body metadata
|
|
5534
|
-
* requestBody: {
|
|
5535
|
-
* // request body parameters
|
|
5536
|
-
* // {
|
|
5537
|
-
* // "majorDimension": "my_majorDimension",
|
|
5538
|
-
* // "range": "my_range",
|
|
5539
|
-
* // "values": []
|
|
5540
|
-
* // }
|
|
5541
|
-
* },
|
|
5542
|
-
* });
|
|
5543
|
-
* console.log(res.data);
|
|
5544
|
-
*
|
|
5545
|
-
* // Example response
|
|
5546
|
-
* // {
|
|
5547
|
-
* // "spreadsheetId": "my_spreadsheetId",
|
|
5548
|
-
* // "tableRange": "my_tableRange",
|
|
5549
|
-
* // "updates": {}
|
|
5550
|
-
* // }
|
|
5551
|
-
* }
|
|
5552
|
-
*
|
|
5553
|
-
* main().catch(e => {
|
|
5554
|
-
* console.error(e);
|
|
5555
|
-
* throw e;
|
|
5556
|
-
* });
|
|
5557
|
-
*
|
|
5558
|
-
* ```
|
|
5559
5073
|
*
|
|
5560
5074
|
* @param params - Parameters for request
|
|
5561
5075
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5570,61 +5084,6 @@ export declare namespace sheets_v4 {
|
|
|
5570
5084
|
append(callback: BodyResponseCallback<Schema$AppendValuesResponse>): void;
|
|
5571
5085
|
/**
|
|
5572
5086
|
* Clears one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more ranges. Only values are cleared -- all other properties of the cell (such as formatting and data validation) are kept.
|
|
5573
|
-
* @example
|
|
5574
|
-
* ```js
|
|
5575
|
-
* // Before running the sample:
|
|
5576
|
-
* // - Enable the API at:
|
|
5577
|
-
* // https://console.developers.google.com/apis/api/sheets.googleapis.com
|
|
5578
|
-
* // - Login into gcloud by running:
|
|
5579
|
-
* // `$ gcloud auth application-default login`
|
|
5580
|
-
* // - Install the npm module by running:
|
|
5581
|
-
* // `$ npm install googleapis`
|
|
5582
|
-
*
|
|
5583
|
-
* const {google} = require('googleapis');
|
|
5584
|
-
* const sheets = google.sheets('v4');
|
|
5585
|
-
*
|
|
5586
|
-
* async function main() {
|
|
5587
|
-
* const auth = new google.auth.GoogleAuth({
|
|
5588
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5589
|
-
* scopes: [
|
|
5590
|
-
* 'https://www.googleapis.com/auth/drive',
|
|
5591
|
-
* 'https://www.googleapis.com/auth/drive.file',
|
|
5592
|
-
* 'https://www.googleapis.com/auth/spreadsheets',
|
|
5593
|
-
* ],
|
|
5594
|
-
* });
|
|
5595
|
-
*
|
|
5596
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
5597
|
-
* const authClient = await auth.getClient();
|
|
5598
|
-
* google.options({auth: authClient});
|
|
5599
|
-
*
|
|
5600
|
-
* // Do the magic
|
|
5601
|
-
* const res = await sheets.spreadsheets.values.batchClear({
|
|
5602
|
-
* // The ID of the spreadsheet to update.
|
|
5603
|
-
* spreadsheetId: 'placeholder-value',
|
|
5604
|
-
*
|
|
5605
|
-
* // Request body metadata
|
|
5606
|
-
* requestBody: {
|
|
5607
|
-
* // request body parameters
|
|
5608
|
-
* // {
|
|
5609
|
-
* // "ranges": []
|
|
5610
|
-
* // }
|
|
5611
|
-
* },
|
|
5612
|
-
* });
|
|
5613
|
-
* console.log(res.data);
|
|
5614
|
-
*
|
|
5615
|
-
* // Example response
|
|
5616
|
-
* // {
|
|
5617
|
-
* // "clearedRanges": [],
|
|
5618
|
-
* // "spreadsheetId": "my_spreadsheetId"
|
|
5619
|
-
* // }
|
|
5620
|
-
* }
|
|
5621
|
-
*
|
|
5622
|
-
* main().catch(e => {
|
|
5623
|
-
* console.error(e);
|
|
5624
|
-
* throw e;
|
|
5625
|
-
* });
|
|
5626
|
-
*
|
|
5627
|
-
* ```
|
|
5628
5087
|
*
|
|
5629
5088
|
* @param params - Parameters for request
|
|
5630
5089
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5639,61 +5098,6 @@ export declare namespace sheets_v4 {
|
|
|
5639
5098
|
batchClear(callback: BodyResponseCallback<Schema$BatchClearValuesResponse>): void;
|
|
5640
5099
|
/**
|
|
5641
5100
|
* Clears one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more DataFilters. Ranges matching any of the specified data filters will be cleared. Only values are cleared -- all other properties of the cell (such as formatting, data validation, etc..) are kept.
|
|
5642
|
-
* @example
|
|
5643
|
-
* ```js
|
|
5644
|
-
* // Before running the sample:
|
|
5645
|
-
* // - Enable the API at:
|
|
5646
|
-
* // https://console.developers.google.com/apis/api/sheets.googleapis.com
|
|
5647
|
-
* // - Login into gcloud by running:
|
|
5648
|
-
* // `$ gcloud auth application-default login`
|
|
5649
|
-
* // - Install the npm module by running:
|
|
5650
|
-
* // `$ npm install googleapis`
|
|
5651
|
-
*
|
|
5652
|
-
* const {google} = require('googleapis');
|
|
5653
|
-
* const sheets = google.sheets('v4');
|
|
5654
|
-
*
|
|
5655
|
-
* async function main() {
|
|
5656
|
-
* const auth = new google.auth.GoogleAuth({
|
|
5657
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5658
|
-
* scopes: [
|
|
5659
|
-
* 'https://www.googleapis.com/auth/drive',
|
|
5660
|
-
* 'https://www.googleapis.com/auth/drive.file',
|
|
5661
|
-
* 'https://www.googleapis.com/auth/spreadsheets',
|
|
5662
|
-
* ],
|
|
5663
|
-
* });
|
|
5664
|
-
*
|
|
5665
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
5666
|
-
* const authClient = await auth.getClient();
|
|
5667
|
-
* google.options({auth: authClient});
|
|
5668
|
-
*
|
|
5669
|
-
* // Do the magic
|
|
5670
|
-
* const res = await sheets.spreadsheets.values.batchClearByDataFilter({
|
|
5671
|
-
* // The ID of the spreadsheet to update.
|
|
5672
|
-
* spreadsheetId: 'placeholder-value',
|
|
5673
|
-
*
|
|
5674
|
-
* // Request body metadata
|
|
5675
|
-
* requestBody: {
|
|
5676
|
-
* // request body parameters
|
|
5677
|
-
* // {
|
|
5678
|
-
* // "dataFilters": []
|
|
5679
|
-
* // }
|
|
5680
|
-
* },
|
|
5681
|
-
* });
|
|
5682
|
-
* console.log(res.data);
|
|
5683
|
-
*
|
|
5684
|
-
* // Example response
|
|
5685
|
-
* // {
|
|
5686
|
-
* // "clearedRanges": [],
|
|
5687
|
-
* // "spreadsheetId": "my_spreadsheetId"
|
|
5688
|
-
* // }
|
|
5689
|
-
* }
|
|
5690
|
-
*
|
|
5691
|
-
* main().catch(e => {
|
|
5692
|
-
* console.error(e);
|
|
5693
|
-
* throw e;
|
|
5694
|
-
* });
|
|
5695
|
-
*
|
|
5696
|
-
* ```
|
|
5697
5101
|
*
|
|
5698
5102
|
* @param params - Parameters for request
|
|
5699
5103
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5708,63 +5112,6 @@ export declare namespace sheets_v4 {
|
|
|
5708
5112
|
batchClearByDataFilter(callback: BodyResponseCallback<Schema$BatchClearValuesByDataFilterResponse>): void;
|
|
5709
5113
|
/**
|
|
5710
5114
|
* Returns one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more ranges.
|
|
5711
|
-
* @example
|
|
5712
|
-
* ```js
|
|
5713
|
-
* // Before running the sample:
|
|
5714
|
-
* // - Enable the API at:
|
|
5715
|
-
* // https://console.developers.google.com/apis/api/sheets.googleapis.com
|
|
5716
|
-
* // - Login into gcloud by running:
|
|
5717
|
-
* // `$ gcloud auth application-default login`
|
|
5718
|
-
* // - Install the npm module by running:
|
|
5719
|
-
* // `$ npm install googleapis`
|
|
5720
|
-
*
|
|
5721
|
-
* const {google} = require('googleapis');
|
|
5722
|
-
* const sheets = google.sheets('v4');
|
|
5723
|
-
*
|
|
5724
|
-
* async function main() {
|
|
5725
|
-
* const auth = new google.auth.GoogleAuth({
|
|
5726
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5727
|
-
* scopes: [
|
|
5728
|
-
* 'https://www.googleapis.com/auth/drive',
|
|
5729
|
-
* 'https://www.googleapis.com/auth/drive.file',
|
|
5730
|
-
* 'https://www.googleapis.com/auth/drive.readonly',
|
|
5731
|
-
* 'https://www.googleapis.com/auth/spreadsheets',
|
|
5732
|
-
* 'https://www.googleapis.com/auth/spreadsheets.readonly',
|
|
5733
|
-
* ],
|
|
5734
|
-
* });
|
|
5735
|
-
*
|
|
5736
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
5737
|
-
* const authClient = await auth.getClient();
|
|
5738
|
-
* google.options({auth: authClient});
|
|
5739
|
-
*
|
|
5740
|
-
* // Do the magic
|
|
5741
|
-
* const res = await sheets.spreadsheets.values.batchGet({
|
|
5742
|
-
* // How dates, times, and durations should be represented in the output. This is ignored if value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.
|
|
5743
|
-
* dateTimeRenderOption: 'placeholder-value',
|
|
5744
|
-
* // The major dimension that results should use. For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then requesting `ranges=["A1:B2"],majorDimension=ROWS` returns `[[1,2],[3,4]]`, whereas requesting `ranges=["A1:B2"],majorDimension=COLUMNS` returns `[[1,3],[2,4]]`.
|
|
5745
|
-
* majorDimension: 'placeholder-value',
|
|
5746
|
-
* // The [A1 notation or R1C1 notation](/sheets/api/guides/concepts#cell) of the range to retrieve values from.
|
|
5747
|
-
* ranges: 'placeholder-value',
|
|
5748
|
-
* // The ID of the spreadsheet to retrieve data from.
|
|
5749
|
-
* spreadsheetId: 'placeholder-value',
|
|
5750
|
-
* // How values should be represented in the output. The default render option is ValueRenderOption.FORMATTED_VALUE.
|
|
5751
|
-
* valueRenderOption: 'placeholder-value',
|
|
5752
|
-
* });
|
|
5753
|
-
* console.log(res.data);
|
|
5754
|
-
*
|
|
5755
|
-
* // Example response
|
|
5756
|
-
* // {
|
|
5757
|
-
* // "spreadsheetId": "my_spreadsheetId",
|
|
5758
|
-
* // "valueRanges": []
|
|
5759
|
-
* // }
|
|
5760
|
-
* }
|
|
5761
|
-
*
|
|
5762
|
-
* main().catch(e => {
|
|
5763
|
-
* console.error(e);
|
|
5764
|
-
* throw e;
|
|
5765
|
-
* });
|
|
5766
|
-
*
|
|
5767
|
-
* ```
|
|
5768
5115
|
*
|
|
5769
5116
|
* @param params - Parameters for request
|
|
5770
5117
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5779,64 +5126,6 @@ export declare namespace sheets_v4 {
|
|
|
5779
5126
|
batchGet(callback: BodyResponseCallback<Schema$BatchGetValuesResponse>): void;
|
|
5780
5127
|
/**
|
|
5781
5128
|
* Returns one or more ranges of values that match the specified data filters. The caller must specify the spreadsheet ID and one or more DataFilters. Ranges that match any of the data filters in the request will be returned.
|
|
5782
|
-
* @example
|
|
5783
|
-
* ```js
|
|
5784
|
-
* // Before running the sample:
|
|
5785
|
-
* // - Enable the API at:
|
|
5786
|
-
* // https://console.developers.google.com/apis/api/sheets.googleapis.com
|
|
5787
|
-
* // - Login into gcloud by running:
|
|
5788
|
-
* // `$ gcloud auth application-default login`
|
|
5789
|
-
* // - Install the npm module by running:
|
|
5790
|
-
* // `$ npm install googleapis`
|
|
5791
|
-
*
|
|
5792
|
-
* const {google} = require('googleapis');
|
|
5793
|
-
* const sheets = google.sheets('v4');
|
|
5794
|
-
*
|
|
5795
|
-
* async function main() {
|
|
5796
|
-
* const auth = new google.auth.GoogleAuth({
|
|
5797
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5798
|
-
* scopes: [
|
|
5799
|
-
* 'https://www.googleapis.com/auth/drive',
|
|
5800
|
-
* 'https://www.googleapis.com/auth/drive.file',
|
|
5801
|
-
* 'https://www.googleapis.com/auth/spreadsheets',
|
|
5802
|
-
* ],
|
|
5803
|
-
* });
|
|
5804
|
-
*
|
|
5805
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
5806
|
-
* const authClient = await auth.getClient();
|
|
5807
|
-
* google.options({auth: authClient});
|
|
5808
|
-
*
|
|
5809
|
-
* // Do the magic
|
|
5810
|
-
* const res = await sheets.spreadsheets.values.batchGetByDataFilter({
|
|
5811
|
-
* // The ID of the spreadsheet to retrieve data from.
|
|
5812
|
-
* spreadsheetId: 'placeholder-value',
|
|
5813
|
-
*
|
|
5814
|
-
* // Request body metadata
|
|
5815
|
-
* requestBody: {
|
|
5816
|
-
* // request body parameters
|
|
5817
|
-
* // {
|
|
5818
|
-
* // "dataFilters": [],
|
|
5819
|
-
* // "dateTimeRenderOption": "my_dateTimeRenderOption",
|
|
5820
|
-
* // "majorDimension": "my_majorDimension",
|
|
5821
|
-
* // "valueRenderOption": "my_valueRenderOption"
|
|
5822
|
-
* // }
|
|
5823
|
-
* },
|
|
5824
|
-
* });
|
|
5825
|
-
* console.log(res.data);
|
|
5826
|
-
*
|
|
5827
|
-
* // Example response
|
|
5828
|
-
* // {
|
|
5829
|
-
* // "spreadsheetId": "my_spreadsheetId",
|
|
5830
|
-
* // "valueRanges": []
|
|
5831
|
-
* // }
|
|
5832
|
-
* }
|
|
5833
|
-
*
|
|
5834
|
-
* main().catch(e => {
|
|
5835
|
-
* console.error(e);
|
|
5836
|
-
* throw e;
|
|
5837
|
-
* });
|
|
5838
|
-
*
|
|
5839
|
-
* ```
|
|
5840
5129
|
*
|
|
5841
5130
|
* @param params - Parameters for request
|
|
5842
5131
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5851,69 +5140,6 @@ export declare namespace sheets_v4 {
|
|
|
5851
5140
|
batchGetByDataFilter(callback: BodyResponseCallback<Schema$BatchGetValuesByDataFilterResponse>): void;
|
|
5852
5141
|
/**
|
|
5853
5142
|
* Sets values in one or more ranges of a spreadsheet. The caller must specify the spreadsheet ID, a valueInputOption, and one or more ValueRanges.
|
|
5854
|
-
* @example
|
|
5855
|
-
* ```js
|
|
5856
|
-
* // Before running the sample:
|
|
5857
|
-
* // - Enable the API at:
|
|
5858
|
-
* // https://console.developers.google.com/apis/api/sheets.googleapis.com
|
|
5859
|
-
* // - Login into gcloud by running:
|
|
5860
|
-
* // `$ gcloud auth application-default login`
|
|
5861
|
-
* // - Install the npm module by running:
|
|
5862
|
-
* // `$ npm install googleapis`
|
|
5863
|
-
*
|
|
5864
|
-
* const {google} = require('googleapis');
|
|
5865
|
-
* const sheets = google.sheets('v4');
|
|
5866
|
-
*
|
|
5867
|
-
* async function main() {
|
|
5868
|
-
* const auth = new google.auth.GoogleAuth({
|
|
5869
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5870
|
-
* scopes: [
|
|
5871
|
-
* 'https://www.googleapis.com/auth/drive',
|
|
5872
|
-
* 'https://www.googleapis.com/auth/drive.file',
|
|
5873
|
-
* 'https://www.googleapis.com/auth/spreadsheets',
|
|
5874
|
-
* ],
|
|
5875
|
-
* });
|
|
5876
|
-
*
|
|
5877
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
5878
|
-
* const authClient = await auth.getClient();
|
|
5879
|
-
* google.options({auth: authClient});
|
|
5880
|
-
*
|
|
5881
|
-
* // Do the magic
|
|
5882
|
-
* const res = await sheets.spreadsheets.values.batchUpdate({
|
|
5883
|
-
* // The ID of the spreadsheet to update.
|
|
5884
|
-
* spreadsheetId: 'placeholder-value',
|
|
5885
|
-
*
|
|
5886
|
-
* // Request body metadata
|
|
5887
|
-
* requestBody: {
|
|
5888
|
-
* // request body parameters
|
|
5889
|
-
* // {
|
|
5890
|
-
* // "data": [],
|
|
5891
|
-
* // "includeValuesInResponse": false,
|
|
5892
|
-
* // "responseDateTimeRenderOption": "my_responseDateTimeRenderOption",
|
|
5893
|
-
* // "responseValueRenderOption": "my_responseValueRenderOption",
|
|
5894
|
-
* // "valueInputOption": "my_valueInputOption"
|
|
5895
|
-
* // }
|
|
5896
|
-
* },
|
|
5897
|
-
* });
|
|
5898
|
-
* console.log(res.data);
|
|
5899
|
-
*
|
|
5900
|
-
* // Example response
|
|
5901
|
-
* // {
|
|
5902
|
-
* // "responses": [],
|
|
5903
|
-
* // "spreadsheetId": "my_spreadsheetId",
|
|
5904
|
-
* // "totalUpdatedCells": 0,
|
|
5905
|
-
* // "totalUpdatedColumns": 0,
|
|
5906
|
-
* // "totalUpdatedRows": 0,
|
|
5907
|
-
* // "totalUpdatedSheets": 0
|
|
5908
|
-
* // }
|
|
5909
|
-
* }
|
|
5910
|
-
*
|
|
5911
|
-
* main().catch(e => {
|
|
5912
|
-
* console.error(e);
|
|
5913
|
-
* throw e;
|
|
5914
|
-
* });
|
|
5915
|
-
*
|
|
5916
|
-
* ```
|
|
5917
5143
|
*
|
|
5918
5144
|
* @param params - Parameters for request
|
|
5919
5145
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5928,69 +5154,6 @@ export declare namespace sheets_v4 {
|
|
|
5928
5154
|
batchUpdate(callback: BodyResponseCallback<Schema$BatchUpdateValuesResponse>): void;
|
|
5929
5155
|
/**
|
|
5930
5156
|
* Sets values in one or more ranges of a spreadsheet. The caller must specify the spreadsheet ID, a valueInputOption, and one or more DataFilterValueRanges.
|
|
5931
|
-
* @example
|
|
5932
|
-
* ```js
|
|
5933
|
-
* // Before running the sample:
|
|
5934
|
-
* // - Enable the API at:
|
|
5935
|
-
* // https://console.developers.google.com/apis/api/sheets.googleapis.com
|
|
5936
|
-
* // - Login into gcloud by running:
|
|
5937
|
-
* // `$ gcloud auth application-default login`
|
|
5938
|
-
* // - Install the npm module by running:
|
|
5939
|
-
* // `$ npm install googleapis`
|
|
5940
|
-
*
|
|
5941
|
-
* const {google} = require('googleapis');
|
|
5942
|
-
* const sheets = google.sheets('v4');
|
|
5943
|
-
*
|
|
5944
|
-
* async function main() {
|
|
5945
|
-
* const auth = new google.auth.GoogleAuth({
|
|
5946
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5947
|
-
* scopes: [
|
|
5948
|
-
* 'https://www.googleapis.com/auth/drive',
|
|
5949
|
-
* 'https://www.googleapis.com/auth/drive.file',
|
|
5950
|
-
* 'https://www.googleapis.com/auth/spreadsheets',
|
|
5951
|
-
* ],
|
|
5952
|
-
* });
|
|
5953
|
-
*
|
|
5954
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
5955
|
-
* const authClient = await auth.getClient();
|
|
5956
|
-
* google.options({auth: authClient});
|
|
5957
|
-
*
|
|
5958
|
-
* // Do the magic
|
|
5959
|
-
* const res = await sheets.spreadsheets.values.batchUpdateByDataFilter({
|
|
5960
|
-
* // The ID of the spreadsheet to update.
|
|
5961
|
-
* spreadsheetId: 'placeholder-value',
|
|
5962
|
-
*
|
|
5963
|
-
* // Request body metadata
|
|
5964
|
-
* requestBody: {
|
|
5965
|
-
* // request body parameters
|
|
5966
|
-
* // {
|
|
5967
|
-
* // "data": [],
|
|
5968
|
-
* // "includeValuesInResponse": false,
|
|
5969
|
-
* // "responseDateTimeRenderOption": "my_responseDateTimeRenderOption",
|
|
5970
|
-
* // "responseValueRenderOption": "my_responseValueRenderOption",
|
|
5971
|
-
* // "valueInputOption": "my_valueInputOption"
|
|
5972
|
-
* // }
|
|
5973
|
-
* },
|
|
5974
|
-
* });
|
|
5975
|
-
* console.log(res.data);
|
|
5976
|
-
*
|
|
5977
|
-
* // Example response
|
|
5978
|
-
* // {
|
|
5979
|
-
* // "responses": [],
|
|
5980
|
-
* // "spreadsheetId": "my_spreadsheetId",
|
|
5981
|
-
* // "totalUpdatedCells": 0,
|
|
5982
|
-
* // "totalUpdatedColumns": 0,
|
|
5983
|
-
* // "totalUpdatedRows": 0,
|
|
5984
|
-
* // "totalUpdatedSheets": 0
|
|
5985
|
-
* // }
|
|
5986
|
-
* }
|
|
5987
|
-
*
|
|
5988
|
-
* main().catch(e => {
|
|
5989
|
-
* console.error(e);
|
|
5990
|
-
* throw e;
|
|
5991
|
-
* });
|
|
5992
|
-
*
|
|
5993
|
-
* ```
|
|
5994
5157
|
*
|
|
5995
5158
|
* @param params - Parameters for request
|
|
5996
5159
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6005,61 +5168,6 @@ export declare namespace sheets_v4 {
|
|
|
6005
5168
|
batchUpdateByDataFilter(callback: BodyResponseCallback<Schema$BatchUpdateValuesByDataFilterResponse>): void;
|
|
6006
5169
|
/**
|
|
6007
5170
|
* Clears values from a spreadsheet. The caller must specify the spreadsheet ID and range. Only values are cleared -- all other properties of the cell (such as formatting, data validation, etc..) are kept.
|
|
6008
|
-
* @example
|
|
6009
|
-
* ```js
|
|
6010
|
-
* // Before running the sample:
|
|
6011
|
-
* // - Enable the API at:
|
|
6012
|
-
* // https://console.developers.google.com/apis/api/sheets.googleapis.com
|
|
6013
|
-
* // - Login into gcloud by running:
|
|
6014
|
-
* // `$ gcloud auth application-default login`
|
|
6015
|
-
* // - Install the npm module by running:
|
|
6016
|
-
* // `$ npm install googleapis`
|
|
6017
|
-
*
|
|
6018
|
-
* const {google} = require('googleapis');
|
|
6019
|
-
* const sheets = google.sheets('v4');
|
|
6020
|
-
*
|
|
6021
|
-
* async function main() {
|
|
6022
|
-
* const auth = new google.auth.GoogleAuth({
|
|
6023
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6024
|
-
* scopes: [
|
|
6025
|
-
* 'https://www.googleapis.com/auth/drive',
|
|
6026
|
-
* 'https://www.googleapis.com/auth/drive.file',
|
|
6027
|
-
* 'https://www.googleapis.com/auth/spreadsheets',
|
|
6028
|
-
* ],
|
|
6029
|
-
* });
|
|
6030
|
-
*
|
|
6031
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
6032
|
-
* const authClient = await auth.getClient();
|
|
6033
|
-
* google.options({auth: authClient});
|
|
6034
|
-
*
|
|
6035
|
-
* // Do the magic
|
|
6036
|
-
* const res = await sheets.spreadsheets.values.clear({
|
|
6037
|
-
* // The [A1 notation or R1C1 notation](/sheets/api/guides/concepts#cell) of the values to clear.
|
|
6038
|
-
* range: 'placeholder-value',
|
|
6039
|
-
* // The ID of the spreadsheet to update.
|
|
6040
|
-
* spreadsheetId: 'placeholder-value',
|
|
6041
|
-
*
|
|
6042
|
-
* // Request body metadata
|
|
6043
|
-
* requestBody: {
|
|
6044
|
-
* // request body parameters
|
|
6045
|
-
* // {}
|
|
6046
|
-
* },
|
|
6047
|
-
* });
|
|
6048
|
-
* console.log(res.data);
|
|
6049
|
-
*
|
|
6050
|
-
* // Example response
|
|
6051
|
-
* // {
|
|
6052
|
-
* // "clearedRange": "my_clearedRange",
|
|
6053
|
-
* // "spreadsheetId": "my_spreadsheetId"
|
|
6054
|
-
* // }
|
|
6055
|
-
* }
|
|
6056
|
-
*
|
|
6057
|
-
* main().catch(e => {
|
|
6058
|
-
* console.error(e);
|
|
6059
|
-
* throw e;
|
|
6060
|
-
* });
|
|
6061
|
-
*
|
|
6062
|
-
* ```
|
|
6063
5171
|
*
|
|
6064
5172
|
* @param params - Parameters for request
|
|
6065
5173
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6074,64 +5182,6 @@ export declare namespace sheets_v4 {
|
|
|
6074
5182
|
clear(callback: BodyResponseCallback<Schema$ClearValuesResponse>): void;
|
|
6075
5183
|
/**
|
|
6076
5184
|
* Returns a range of values from a spreadsheet. The caller must specify the spreadsheet ID and a range.
|
|
6077
|
-
* @example
|
|
6078
|
-
* ```js
|
|
6079
|
-
* // Before running the sample:
|
|
6080
|
-
* // - Enable the API at:
|
|
6081
|
-
* // https://console.developers.google.com/apis/api/sheets.googleapis.com
|
|
6082
|
-
* // - Login into gcloud by running:
|
|
6083
|
-
* // `$ gcloud auth application-default login`
|
|
6084
|
-
* // - Install the npm module by running:
|
|
6085
|
-
* // `$ npm install googleapis`
|
|
6086
|
-
*
|
|
6087
|
-
* const {google} = require('googleapis');
|
|
6088
|
-
* const sheets = google.sheets('v4');
|
|
6089
|
-
*
|
|
6090
|
-
* async function main() {
|
|
6091
|
-
* const auth = new google.auth.GoogleAuth({
|
|
6092
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6093
|
-
* scopes: [
|
|
6094
|
-
* 'https://www.googleapis.com/auth/drive',
|
|
6095
|
-
* 'https://www.googleapis.com/auth/drive.file',
|
|
6096
|
-
* 'https://www.googleapis.com/auth/drive.readonly',
|
|
6097
|
-
* 'https://www.googleapis.com/auth/spreadsheets',
|
|
6098
|
-
* 'https://www.googleapis.com/auth/spreadsheets.readonly',
|
|
6099
|
-
* ],
|
|
6100
|
-
* });
|
|
6101
|
-
*
|
|
6102
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
6103
|
-
* const authClient = await auth.getClient();
|
|
6104
|
-
* google.options({auth: authClient});
|
|
6105
|
-
*
|
|
6106
|
-
* // Do the magic
|
|
6107
|
-
* const res = await sheets.spreadsheets.values.get({
|
|
6108
|
-
* // How dates, times, and durations should be represented in the output. This is ignored if value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.
|
|
6109
|
-
* dateTimeRenderOption: 'placeholder-value',
|
|
6110
|
-
* // The major dimension that results should use. For example, if the spreadsheet data in Sheet1 is: `A1=1,B1=2,A2=3,B2=4`, then requesting `range=Sheet1!A1:B2?majorDimension=ROWS` returns `[[1,2],[3,4]]`, whereas requesting `range=Sheet1!A1:B2?majorDimension=COLUMNS` returns `[[1,3],[2,4]]`.
|
|
6111
|
-
* majorDimension: 'placeholder-value',
|
|
6112
|
-
* // The [A1 notation or R1C1 notation](/sheets/api/guides/concepts#cell) of the range to retrieve values from.
|
|
6113
|
-
* range: 'placeholder-value',
|
|
6114
|
-
* // The ID of the spreadsheet to retrieve data from.
|
|
6115
|
-
* spreadsheetId: 'placeholder-value',
|
|
6116
|
-
* // How values should be represented in the output. The default render option is FORMATTED_VALUE.
|
|
6117
|
-
* valueRenderOption: 'placeholder-value',
|
|
6118
|
-
* });
|
|
6119
|
-
* console.log(res.data);
|
|
6120
|
-
*
|
|
6121
|
-
* // Example response
|
|
6122
|
-
* // {
|
|
6123
|
-
* // "majorDimension": "my_majorDimension",
|
|
6124
|
-
* // "range": "my_range",
|
|
6125
|
-
* // "values": []
|
|
6126
|
-
* // }
|
|
6127
|
-
* }
|
|
6128
|
-
*
|
|
6129
|
-
* main().catch(e => {
|
|
6130
|
-
* console.error(e);
|
|
6131
|
-
* throw e;
|
|
6132
|
-
* });
|
|
6133
|
-
*
|
|
6134
|
-
* ```
|
|
6135
5185
|
*
|
|
6136
5186
|
* @param params - Parameters for request
|
|
6137
5187
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6146,77 +5196,6 @@ export declare namespace sheets_v4 {
|
|
|
6146
5196
|
get(callback: BodyResponseCallback<Schema$ValueRange>): void;
|
|
6147
5197
|
/**
|
|
6148
5198
|
* Sets values in a range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a valueInputOption.
|
|
6149
|
-
* @example
|
|
6150
|
-
* ```js
|
|
6151
|
-
* // Before running the sample:
|
|
6152
|
-
* // - Enable the API at:
|
|
6153
|
-
* // https://console.developers.google.com/apis/api/sheets.googleapis.com
|
|
6154
|
-
* // - Login into gcloud by running:
|
|
6155
|
-
* // `$ gcloud auth application-default login`
|
|
6156
|
-
* // - Install the npm module by running:
|
|
6157
|
-
* // `$ npm install googleapis`
|
|
6158
|
-
*
|
|
6159
|
-
* const {google} = require('googleapis');
|
|
6160
|
-
* const sheets = google.sheets('v4');
|
|
6161
|
-
*
|
|
6162
|
-
* async function main() {
|
|
6163
|
-
* const auth = new google.auth.GoogleAuth({
|
|
6164
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6165
|
-
* scopes: [
|
|
6166
|
-
* 'https://www.googleapis.com/auth/drive',
|
|
6167
|
-
* 'https://www.googleapis.com/auth/drive.file',
|
|
6168
|
-
* 'https://www.googleapis.com/auth/spreadsheets',
|
|
6169
|
-
* ],
|
|
6170
|
-
* });
|
|
6171
|
-
*
|
|
6172
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
6173
|
-
* const authClient = await auth.getClient();
|
|
6174
|
-
* google.options({auth: authClient});
|
|
6175
|
-
*
|
|
6176
|
-
* // Do the magic
|
|
6177
|
-
* const res = await sheets.spreadsheets.values.update({
|
|
6178
|
-
* // Determines if the update response should include the values of the cells that were updated. By default, responses do not include the updated values. If the range to write was larger than the range actually written, the response includes all values in the requested range (excluding trailing empty rows and columns).
|
|
6179
|
-
* includeValuesInResponse: 'placeholder-value',
|
|
6180
|
-
* // The [A1 notation](/sheets/api/guides/concepts#cell) of the values to update.
|
|
6181
|
-
* range: 'placeholder-value',
|
|
6182
|
-
* // Determines how dates, times, and durations in the response should be rendered. This is ignored if response_value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.
|
|
6183
|
-
* responseDateTimeRenderOption: 'placeholder-value',
|
|
6184
|
-
* // Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE.
|
|
6185
|
-
* responseValueRenderOption: 'placeholder-value',
|
|
6186
|
-
* // The ID of the spreadsheet to update.
|
|
6187
|
-
* spreadsheetId: 'placeholder-value',
|
|
6188
|
-
* // How the input data should be interpreted.
|
|
6189
|
-
* valueInputOption: 'placeholder-value',
|
|
6190
|
-
*
|
|
6191
|
-
* // Request body metadata
|
|
6192
|
-
* requestBody: {
|
|
6193
|
-
* // request body parameters
|
|
6194
|
-
* // {
|
|
6195
|
-
* // "majorDimension": "my_majorDimension",
|
|
6196
|
-
* // "range": "my_range",
|
|
6197
|
-
* // "values": []
|
|
6198
|
-
* // }
|
|
6199
|
-
* },
|
|
6200
|
-
* });
|
|
6201
|
-
* console.log(res.data);
|
|
6202
|
-
*
|
|
6203
|
-
* // Example response
|
|
6204
|
-
* // {
|
|
6205
|
-
* // "spreadsheetId": "my_spreadsheetId",
|
|
6206
|
-
* // "updatedCells": 0,
|
|
6207
|
-
* // "updatedColumns": 0,
|
|
6208
|
-
* // "updatedData": {},
|
|
6209
|
-
* // "updatedRange": "my_updatedRange",
|
|
6210
|
-
* // "updatedRows": 0
|
|
6211
|
-
* // }
|
|
6212
|
-
* }
|
|
6213
|
-
*
|
|
6214
|
-
* main().catch(e => {
|
|
6215
|
-
* console.error(e);
|
|
6216
|
-
* throw e;
|
|
6217
|
-
* });
|
|
6218
|
-
*
|
|
6219
|
-
* ```
|
|
6220
5199
|
*
|
|
6221
5200
|
* @param params - Parameters for request
|
|
6222
5201
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|