google-api-client 0.9.22 → 0.9.23

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.
@@ -46,36 +46,6 @@ module Google
46
46
  super('https://sheets.googleapis.com/', '')
47
47
  end
48
48
 
49
- # Creates a spreadsheet, returning the newly created spreadsheet.
50
- # @param [Google::Apis::SheetsV4::Spreadsheet] spreadsheet_object
51
- # @param [String] quota_user
52
- # Available to use for quota purposes for server-side applications. Can be any
53
- # arbitrary string assigned to a user, but should not exceed 40 characters.
54
- # @param [String] fields
55
- # Selector specifying which fields to include in a partial response.
56
- # @param [Google::Apis::RequestOptions] options
57
- # Request-specific options
58
- #
59
- # @yield [result, err] Result & error if block supplied
60
- # @yieldparam result [Google::Apis::SheetsV4::Spreadsheet] parsed result object
61
- # @yieldparam err [StandardError] error object if request failed
62
- #
63
- # @return [Google::Apis::SheetsV4::Spreadsheet]
64
- #
65
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
66
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
67
- # @raise [Google::Apis::AuthorizationError] Authorization is required
68
- def create_spreadsheet(spreadsheet_object = nil, quota_user: nil, fields: nil, options: nil, &block)
69
- command = make_simple_command(:post, 'v4/spreadsheets', options)
70
- command.request_representation = Google::Apis::SheetsV4::Spreadsheet::Representation
71
- command.request_object = spreadsheet_object
72
- command.response_representation = Google::Apis::SheetsV4::Spreadsheet::Representation
73
- command.response_class = Google::Apis::SheetsV4::Spreadsheet
74
- command.query['quotaUser'] = quota_user unless quota_user.nil?
75
- command.query['fields'] = fields unless fields.nil?
76
- execute_or_queue_command(command, &block)
77
- end
78
-
79
49
  # Returns the spreadsheet at the given ID.
80
50
  # The caller must specify the spreadsheet ID.
81
51
  # By default, data within grids will not be returned.
@@ -99,11 +69,11 @@ module Google
99
69
  # @param [Boolean] include_grid_data
100
70
  # True if grid data should be returned.
101
71
  # This parameter is ignored if a field mask was set in the request.
72
+ # @param [String] fields
73
+ # Selector specifying which fields to include in a partial response.
102
74
  # @param [String] quota_user
103
75
  # Available to use for quota purposes for server-side applications. Can be any
104
76
  # arbitrary string assigned to a user, but should not exceed 40 characters.
105
- # @param [String] fields
106
- # Selector specifying which fields to include in a partial response.
107
77
  # @param [Google::Apis::RequestOptions] options
108
78
  # Request-specific options
109
79
  #
@@ -116,15 +86,45 @@ module Google
116
86
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
117
87
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
118
88
  # @raise [Google::Apis::AuthorizationError] Authorization is required
119
- def get_spreadsheet(spreadsheet_id, ranges: nil, include_grid_data: nil, quota_user: nil, fields: nil, options: nil, &block)
89
+ def get_spreadsheet(spreadsheet_id, ranges: nil, include_grid_data: nil, fields: nil, quota_user: nil, options: nil, &block)
120
90
  command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}', options)
121
91
  command.response_representation = Google::Apis::SheetsV4::Spreadsheet::Representation
122
92
  command.response_class = Google::Apis::SheetsV4::Spreadsheet
123
93
  command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
124
94
  command.query['ranges'] = ranges unless ranges.nil?
125
95
  command.query['includeGridData'] = include_grid_data unless include_grid_data.nil?
96
+ command.query['fields'] = fields unless fields.nil?
126
97
  command.query['quotaUser'] = quota_user unless quota_user.nil?
98
+ execute_or_queue_command(command, &block)
99
+ end
100
+
101
+ # Creates a spreadsheet, returning the newly created spreadsheet.
102
+ # @param [Google::Apis::SheetsV4::Spreadsheet] spreadsheet_object
103
+ # @param [String] fields
104
+ # Selector specifying which fields to include in a partial response.
105
+ # @param [String] quota_user
106
+ # Available to use for quota purposes for server-side applications. Can be any
107
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
108
+ # @param [Google::Apis::RequestOptions] options
109
+ # Request-specific options
110
+ #
111
+ # @yield [result, err] Result & error if block supplied
112
+ # @yieldparam result [Google::Apis::SheetsV4::Spreadsheet] parsed result object
113
+ # @yieldparam err [StandardError] error object if request failed
114
+ #
115
+ # @return [Google::Apis::SheetsV4::Spreadsheet]
116
+ #
117
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
118
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
119
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
120
+ def create_spreadsheet(spreadsheet_object = nil, fields: nil, quota_user: nil, options: nil, &block)
121
+ command = make_simple_command(:post, 'v4/spreadsheets', options)
122
+ command.request_representation = Google::Apis::SheetsV4::Spreadsheet::Representation
123
+ command.request_object = spreadsheet_object
124
+ command.response_representation = Google::Apis::SheetsV4::Spreadsheet::Representation
125
+ command.response_class = Google::Apis::SheetsV4::Spreadsheet
127
126
  command.query['fields'] = fields unless fields.nil?
127
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
128
128
  execute_or_queue_command(command, &block)
129
129
  end
130
130
 
@@ -147,11 +147,11 @@ module Google
147
147
  # @param [String] spreadsheet_id
148
148
  # The spreadsheet to apply the updates to.
149
149
  # @param [Google::Apis::SheetsV4::BatchUpdateSpreadsheetRequest] batch_update_spreadsheet_request_object
150
+ # @param [String] fields
151
+ # Selector specifying which fields to include in a partial response.
150
152
  # @param [String] quota_user
151
153
  # Available to use for quota purposes for server-side applications. Can be any
152
154
  # arbitrary string assigned to a user, but should not exceed 40 characters.
153
- # @param [String] fields
154
- # Selector specifying which fields to include in a partial response.
155
155
  # @param [Google::Apis::RequestOptions] options
156
156
  # Request-specific options
157
157
  #
@@ -164,54 +164,52 @@ module Google
164
164
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
165
165
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
166
166
  # @raise [Google::Apis::AuthorizationError] Authorization is required
167
- def batch_update_spreadsheet(spreadsheet_id, batch_update_spreadsheet_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
167
+ def batch_update_spreadsheet(spreadsheet_id, batch_update_spreadsheet_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
168
168
  command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}:batchUpdate', options)
169
169
  command.request_representation = Google::Apis::SheetsV4::BatchUpdateSpreadsheetRequest::Representation
170
170
  command.request_object = batch_update_spreadsheet_request_object
171
171
  command.response_representation = Google::Apis::SheetsV4::BatchUpdateSpreadsheetResponse::Representation
172
172
  command.response_class = Google::Apis::SheetsV4::BatchUpdateSpreadsheetResponse
173
173
  command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
174
- command.query['quotaUser'] = quota_user unless quota_user.nil?
175
174
  command.query['fields'] = fields unless fields.nil?
175
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
176
176
  execute_or_queue_command(command, &block)
177
177
  end
178
178
 
179
- # Clears values from a spreadsheet.
180
- # The caller must specify the spreadsheet ID and range.
181
- # Only values are cleared -- all other properties of the cell (such as
182
- # formatting, data validation, etc..) are kept.
179
+ # Copies a single sheet from a spreadsheet to another spreadsheet.
180
+ # Returns the properties of the newly created sheet.
183
181
  # @param [String] spreadsheet_id
184
- # The ID of the spreadsheet to update.
185
- # @param [String] range
186
- # The A1 notation of the values to clear.
187
- # @param [Google::Apis::SheetsV4::ClearValuesRequest] clear_values_request_object
182
+ # The ID of the spreadsheet containing the sheet to copy.
183
+ # @param [Fixnum] sheet_id
184
+ # The ID of the sheet to copy.
185
+ # @param [Google::Apis::SheetsV4::CopySheetToAnotherSpreadsheetRequest] copy_sheet_to_another_spreadsheet_request_object
186
+ # @param [String] fields
187
+ # Selector specifying which fields to include in a partial response.
188
188
  # @param [String] quota_user
189
189
  # Available to use for quota purposes for server-side applications. Can be any
190
190
  # arbitrary string assigned to a user, but should not exceed 40 characters.
191
- # @param [String] fields
192
- # Selector specifying which fields to include in a partial response.
193
191
  # @param [Google::Apis::RequestOptions] options
194
192
  # Request-specific options
195
193
  #
196
194
  # @yield [result, err] Result & error if block supplied
197
- # @yieldparam result [Google::Apis::SheetsV4::ClearValuesResponse] parsed result object
195
+ # @yieldparam result [Google::Apis::SheetsV4::SheetProperties] parsed result object
198
196
  # @yieldparam err [StandardError] error object if request failed
199
197
  #
200
- # @return [Google::Apis::SheetsV4::ClearValuesResponse]
198
+ # @return [Google::Apis::SheetsV4::SheetProperties]
201
199
  #
202
200
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
203
201
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
204
202
  # @raise [Google::Apis::AuthorizationError] Authorization is required
205
- def clear_values(spreadsheet_id, range, clear_values_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
206
- command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values/{range}:clear', options)
207
- command.request_representation = Google::Apis::SheetsV4::ClearValuesRequest::Representation
208
- command.request_object = clear_values_request_object
209
- command.response_representation = Google::Apis::SheetsV4::ClearValuesResponse::Representation
210
- command.response_class = Google::Apis::SheetsV4::ClearValuesResponse
203
+ def copy_spreadsheet(spreadsheet_id, sheet_id, copy_sheet_to_another_spreadsheet_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
204
+ command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo', options)
205
+ command.request_representation = Google::Apis::SheetsV4::CopySheetToAnotherSpreadsheetRequest::Representation
206
+ command.request_object = copy_sheet_to_another_spreadsheet_request_object
207
+ command.response_representation = Google::Apis::SheetsV4::SheetProperties::Representation
208
+ command.response_class = Google::Apis::SheetsV4::SheetProperties
211
209
  command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
212
- command.params['range'] = range unless range.nil?
213
- command.query['quotaUser'] = quota_user unless quota_user.nil?
210
+ command.params['sheetId'] = sheet_id unless sheet_id.nil?
214
211
  command.query['fields'] = fields unless fields.nil?
212
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
215
213
  execute_or_queue_command(command, &block)
216
214
  end
217
215
 
@@ -219,8 +217,6 @@ module Google
219
217
  # The caller must specify the spreadsheet ID and one or more ranges.
220
218
  # @param [String] spreadsheet_id
221
219
  # The ID of the spreadsheet to retrieve data from.
222
- # @param [Array<String>, String] ranges
223
- # The A1 notation of the values to retrieve.
224
220
  # @param [String] value_render_option
225
221
  # How values should be represented in the output.
226
222
  # The default render option is ValueRenderOption.FORMATTED_VALUE.
@@ -229,6 +225,8 @@ module Google
229
225
  # This is ignored if value_render_option is
230
226
  # FORMATTED_VALUE.
231
227
  # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].
228
+ # @param [Array<String>, String] ranges
229
+ # The A1 notation of the values to retrieve.
232
230
  # @param [String] major_dimension
233
231
  # The major dimension that results should use.
234
232
  # For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
@@ -236,11 +234,11 @@ module Google
236
234
  # `[[1,2],[3,4]]`,
237
235
  # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
238
236
  # `[[1,3],[2,4]]`.
237
+ # @param [String] fields
238
+ # Selector specifying which fields to include in a partial response.
239
239
  # @param [String] quota_user
240
240
  # Available to use for quota purposes for server-side applications. Can be any
241
241
  # arbitrary string assigned to a user, but should not exceed 40 characters.
242
- # @param [String] fields
243
- # Selector specifying which fields to include in a partial response.
244
242
  # @param [Google::Apis::RequestOptions] options
245
243
  # Request-specific options
246
244
  #
@@ -253,105 +251,56 @@ module Google
253
251
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
254
252
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
255
253
  # @raise [Google::Apis::AuthorizationError] Authorization is required
256
- def batch_get_spreadsheet_values(spreadsheet_id, ranges: nil, value_render_option: nil, date_time_render_option: nil, major_dimension: nil, quota_user: nil, fields: nil, options: nil, &block)
254
+ def batch_get_spreadsheet_values(spreadsheet_id, value_render_option: nil, date_time_render_option: nil, ranges: nil, major_dimension: nil, fields: nil, quota_user: nil, options: nil, &block)
257
255
  command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}/values:batchGet', options)
258
256
  command.response_representation = Google::Apis::SheetsV4::BatchGetValuesResponse::Representation
259
257
  command.response_class = Google::Apis::SheetsV4::BatchGetValuesResponse
260
258
  command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
261
- command.query['ranges'] = ranges unless ranges.nil?
262
259
  command.query['valueRenderOption'] = value_render_option unless value_render_option.nil?
263
260
  command.query['dateTimeRenderOption'] = date_time_render_option unless date_time_render_option.nil?
261
+ command.query['ranges'] = ranges unless ranges.nil?
264
262
  command.query['majorDimension'] = major_dimension unless major_dimension.nil?
265
- command.query['quotaUser'] = quota_user unless quota_user.nil?
266
263
  command.query['fields'] = fields unless fields.nil?
264
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
267
265
  execute_or_queue_command(command, &block)
268
266
  end
269
267
 
270
- # Sets values in one or more ranges of a spreadsheet.
271
- # The caller must specify the spreadsheet ID,
272
- # a valueInputOption, and one or more
273
- # ValueRanges.
268
+ # Clears values from a spreadsheet.
269
+ # The caller must specify the spreadsheet ID and range.
270
+ # Only values are cleared -- all other properties of the cell (such as
271
+ # formatting, data validation, etc..) are kept.
274
272
  # @param [String] spreadsheet_id
275
273
  # The ID of the spreadsheet to update.
276
- # @param [Google::Apis::SheetsV4::BatchUpdateValuesRequest] batch_update_values_request_object
277
- # @param [String] quota_user
278
- # Available to use for quota purposes for server-side applications. Can be any
279
- # arbitrary string assigned to a user, but should not exceed 40 characters.
274
+ # @param [String] range
275
+ # The A1 notation of the values to clear.
276
+ # @param [Google::Apis::SheetsV4::ClearValuesRequest] clear_values_request_object
280
277
  # @param [String] fields
281
278
  # Selector specifying which fields to include in a partial response.
282
- # @param [Google::Apis::RequestOptions] options
283
- # Request-specific options
284
- #
285
- # @yield [result, err] Result & error if block supplied
286
- # @yieldparam result [Google::Apis::SheetsV4::BatchUpdateValuesResponse] parsed result object
287
- # @yieldparam err [StandardError] error object if request failed
288
- #
289
- # @return [Google::Apis::SheetsV4::BatchUpdateValuesResponse]
290
- #
291
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
292
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
293
- # @raise [Google::Apis::AuthorizationError] Authorization is required
294
- def batch_update_values(spreadsheet_id, batch_update_values_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
295
- command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchUpdate', options)
296
- command.request_representation = Google::Apis::SheetsV4::BatchUpdateValuesRequest::Representation
297
- command.request_object = batch_update_values_request_object
298
- command.response_representation = Google::Apis::SheetsV4::BatchUpdateValuesResponse::Representation
299
- command.response_class = Google::Apis::SheetsV4::BatchUpdateValuesResponse
300
- command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
301
- command.query['quotaUser'] = quota_user unless quota_user.nil?
302
- command.query['fields'] = fields unless fields.nil?
303
- execute_or_queue_command(command, &block)
304
- end
305
-
306
- # Returns a range of values from a spreadsheet.
307
- # The caller must specify the spreadsheet ID and a range.
308
- # @param [String] spreadsheet_id
309
- # The ID of the spreadsheet to retrieve data from.
310
- # @param [String] range
311
- # The A1 notation of the values to retrieve.
312
- # @param [String] value_render_option
313
- # How values should be represented in the output.
314
- # The default render option is ValueRenderOption.FORMATTED_VALUE.
315
- # @param [String] date_time_render_option
316
- # How dates, times, and durations should be represented in the output.
317
- # This is ignored if value_render_option is
318
- # FORMATTED_VALUE.
319
- # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].
320
- # @param [String] major_dimension
321
- # The major dimension that results should use.
322
- # For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
323
- # then requesting `range=A1:B2,majorDimension=ROWS` will return
324
- # `[[1,2],[3,4]]`,
325
- # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
326
- # `[[1,3],[2,4]]`.
327
279
  # @param [String] quota_user
328
280
  # Available to use for quota purposes for server-side applications. Can be any
329
281
  # arbitrary string assigned to a user, but should not exceed 40 characters.
330
- # @param [String] fields
331
- # Selector specifying which fields to include in a partial response.
332
282
  # @param [Google::Apis::RequestOptions] options
333
283
  # Request-specific options
334
284
  #
335
285
  # @yield [result, err] Result & error if block supplied
336
- # @yieldparam result [Google::Apis::SheetsV4::ValueRange] parsed result object
286
+ # @yieldparam result [Google::Apis::SheetsV4::ClearValuesResponse] parsed result object
337
287
  # @yieldparam err [StandardError] error object if request failed
338
288
  #
339
- # @return [Google::Apis::SheetsV4::ValueRange]
289
+ # @return [Google::Apis::SheetsV4::ClearValuesResponse]
340
290
  #
341
291
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
342
292
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
343
293
  # @raise [Google::Apis::AuthorizationError] Authorization is required
344
- def get_spreadsheet_values(spreadsheet_id, range, value_render_option: nil, date_time_render_option: nil, major_dimension: nil, quota_user: nil, fields: nil, options: nil, &block)
345
- command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}/values/{range}', options)
346
- command.response_representation = Google::Apis::SheetsV4::ValueRange::Representation
347
- command.response_class = Google::Apis::SheetsV4::ValueRange
294
+ def clear_values(spreadsheet_id, range, clear_values_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
295
+ command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values/{range}:clear', options)
296
+ command.request_representation = Google::Apis::SheetsV4::ClearValuesRequest::Representation
297
+ command.request_object = clear_values_request_object
298
+ command.response_representation = Google::Apis::SheetsV4::ClearValuesResponse::Representation
299
+ command.response_class = Google::Apis::SheetsV4::ClearValuesResponse
348
300
  command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
349
301
  command.params['range'] = range unless range.nil?
350
- command.query['valueRenderOption'] = value_render_option unless value_render_option.nil?
351
- command.query['dateTimeRenderOption'] = date_time_render_option unless date_time_render_option.nil?
352
- command.query['majorDimension'] = major_dimension unless major_dimension.nil?
353
- command.query['quotaUser'] = quota_user unless quota_user.nil?
354
302
  command.query['fields'] = fields unless fields.nil?
303
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
355
304
  execute_or_queue_command(command, &block)
356
305
  end
357
306
 
@@ -374,9 +323,6 @@ module Google
374
323
  # The A1 notation of a range to search for a logical table of data.
375
324
  # Values will be appended after the last row of the table.
376
325
  # @param [Google::Apis::SheetsV4::ValueRange] value_range_object
377
- # @param [String] response_value_render_option
378
- # Determines how values in the response should be rendered.
379
- # The default render option is ValueRenderOption.FORMATTED_VALUE.
380
326
  # @param [String] value_input_option
381
327
  # How the input data should be interpreted.
382
328
  # @param [String] response_date_time_render_option
@@ -388,13 +334,16 @@ module Google
388
334
  # Determines if the update response should include the values
389
335
  # of the cells that were appended. By default, responses
390
336
  # do not include the updated values.
337
+ # @param [String] response_value_render_option
338
+ # Determines how values in the response should be rendered.
339
+ # The default render option is ValueRenderOption.FORMATTED_VALUE.
391
340
  # @param [String] insert_data_option
392
341
  # How the input data should be inserted.
342
+ # @param [String] fields
343
+ # Selector specifying which fields to include in a partial response.
393
344
  # @param [String] quota_user
394
345
  # Available to use for quota purposes for server-side applications. Can be any
395
346
  # arbitrary string assigned to a user, but should not exceed 40 characters.
396
- # @param [String] fields
397
- # Selector specifying which fields to include in a partial response.
398
347
  # @param [Google::Apis::RequestOptions] options
399
348
  # Request-specific options
400
349
  #
@@ -407,7 +356,7 @@ module Google
407
356
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
408
357
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
409
358
  # @raise [Google::Apis::AuthorizationError] Authorization is required
410
- def append_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, response_value_render_option: nil, value_input_option: nil, response_date_time_render_option: nil, include_values_in_response: nil, insert_data_option: nil, quota_user: nil, fields: nil, options: nil, &block)
359
+ def append_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, value_input_option: nil, response_date_time_render_option: nil, include_values_in_response: nil, response_value_render_option: nil, insert_data_option: nil, fields: nil, quota_user: nil, options: nil, &block)
411
360
  command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values/{range}:append', options)
412
361
  command.request_representation = Google::Apis::SheetsV4::ValueRange::Representation
413
362
  command.request_object = value_range_object
@@ -415,13 +364,101 @@ module Google
415
364
  command.response_class = Google::Apis::SheetsV4::AppendValuesResponse
416
365
  command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
417
366
  command.params['range'] = range unless range.nil?
418
- command.query['responseValueRenderOption'] = response_value_render_option unless response_value_render_option.nil?
419
367
  command.query['valueInputOption'] = value_input_option unless value_input_option.nil?
420
368
  command.query['responseDateTimeRenderOption'] = response_date_time_render_option unless response_date_time_render_option.nil?
421
369
  command.query['includeValuesInResponse'] = include_values_in_response unless include_values_in_response.nil?
370
+ command.query['responseValueRenderOption'] = response_value_render_option unless response_value_render_option.nil?
422
371
  command.query['insertDataOption'] = insert_data_option unless insert_data_option.nil?
372
+ command.query['fields'] = fields unless fields.nil?
373
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
374
+ execute_or_queue_command(command, &block)
375
+ end
376
+
377
+ # Clears one or more ranges of values from a spreadsheet.
378
+ # The caller must specify the spreadsheet ID and one or more ranges.
379
+ # Only values are cleared -- all other properties of the cell (such as
380
+ # formatting, data validation, etc..) are kept.
381
+ # @param [String] spreadsheet_id
382
+ # The ID of the spreadsheet to update.
383
+ # @param [Google::Apis::SheetsV4::BatchClearValuesRequest] batch_clear_values_request_object
384
+ # @param [String] fields
385
+ # Selector specifying which fields to include in a partial response.
386
+ # @param [String] quota_user
387
+ # Available to use for quota purposes for server-side applications. Can be any
388
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
389
+ # @param [Google::Apis::RequestOptions] options
390
+ # Request-specific options
391
+ #
392
+ # @yield [result, err] Result & error if block supplied
393
+ # @yieldparam result [Google::Apis::SheetsV4::BatchClearValuesResponse] parsed result object
394
+ # @yieldparam err [StandardError] error object if request failed
395
+ #
396
+ # @return [Google::Apis::SheetsV4::BatchClearValuesResponse]
397
+ #
398
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
399
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
400
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
401
+ def batch_clear_values(spreadsheet_id, batch_clear_values_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
402
+ command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchClear', options)
403
+ command.request_representation = Google::Apis::SheetsV4::BatchClearValuesRequest::Representation
404
+ command.request_object = batch_clear_values_request_object
405
+ command.response_representation = Google::Apis::SheetsV4::BatchClearValuesResponse::Representation
406
+ command.response_class = Google::Apis::SheetsV4::BatchClearValuesResponse
407
+ command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
408
+ command.query['fields'] = fields unless fields.nil?
423
409
  command.query['quotaUser'] = quota_user unless quota_user.nil?
410
+ execute_or_queue_command(command, &block)
411
+ end
412
+
413
+ # Returns a range of values from a spreadsheet.
414
+ # The caller must specify the spreadsheet ID and a range.
415
+ # @param [String] spreadsheet_id
416
+ # The ID of the spreadsheet to retrieve data from.
417
+ # @param [String] range
418
+ # The A1 notation of the values to retrieve.
419
+ # @param [String] value_render_option
420
+ # How values should be represented in the output.
421
+ # The default render option is ValueRenderOption.FORMATTED_VALUE.
422
+ # @param [String] date_time_render_option
423
+ # How dates, times, and durations should be represented in the output.
424
+ # This is ignored if value_render_option is
425
+ # FORMATTED_VALUE.
426
+ # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].
427
+ # @param [String] major_dimension
428
+ # The major dimension that results should use.
429
+ # For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
430
+ # then requesting `range=A1:B2,majorDimension=ROWS` will return
431
+ # `[[1,2],[3,4]]`,
432
+ # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
433
+ # `[[1,3],[2,4]]`.
434
+ # @param [String] fields
435
+ # Selector specifying which fields to include in a partial response.
436
+ # @param [String] quota_user
437
+ # Available to use for quota purposes for server-side applications. Can be any
438
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
439
+ # @param [Google::Apis::RequestOptions] options
440
+ # Request-specific options
441
+ #
442
+ # @yield [result, err] Result & error if block supplied
443
+ # @yieldparam result [Google::Apis::SheetsV4::ValueRange] parsed result object
444
+ # @yieldparam err [StandardError] error object if request failed
445
+ #
446
+ # @return [Google::Apis::SheetsV4::ValueRange]
447
+ #
448
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
449
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
450
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
451
+ def get_spreadsheet_values(spreadsheet_id, range, value_render_option: nil, date_time_render_option: nil, major_dimension: nil, fields: nil, quota_user: nil, options: nil, &block)
452
+ command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}/values/{range}', options)
453
+ command.response_representation = Google::Apis::SheetsV4::ValueRange::Representation
454
+ command.response_class = Google::Apis::SheetsV4::ValueRange
455
+ command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
456
+ command.params['range'] = range unless range.nil?
457
+ command.query['valueRenderOption'] = value_render_option unless value_render_option.nil?
458
+ command.query['dateTimeRenderOption'] = date_time_render_option unless date_time_render_option.nil?
459
+ command.query['majorDimension'] = major_dimension unless major_dimension.nil?
424
460
  command.query['fields'] = fields unless fields.nil?
461
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
425
462
  execute_or_queue_command(command, &block)
426
463
  end
427
464
 
@@ -433,9 +470,6 @@ module Google
433
470
  # @param [String] range
434
471
  # The A1 notation of the values to update.
435
472
  # @param [Google::Apis::SheetsV4::ValueRange] value_range_object
436
- # @param [String] response_value_render_option
437
- # Determines how values in the response should be rendered.
438
- # The default render option is ValueRenderOption.FORMATTED_VALUE.
439
473
  # @param [String] value_input_option
440
474
  # How the input data should be interpreted.
441
475
  # @param [String] response_date_time_render_option
@@ -450,11 +484,14 @@ module Google
450
484
  # If the range to write was larger than than the range actually written,
451
485
  # the response will include all values in the requested range (excluding
452
486
  # trailing empty rows and columns).
487
+ # @param [String] response_value_render_option
488
+ # Determines how values in the response should be rendered.
489
+ # The default render option is ValueRenderOption.FORMATTED_VALUE.
490
+ # @param [String] fields
491
+ # Selector specifying which fields to include in a partial response.
453
492
  # @param [String] quota_user
454
493
  # Available to use for quota purposes for server-side applications. Can be any
455
494
  # arbitrary string assigned to a user, but should not exceed 40 characters.
456
- # @param [String] fields
457
- # Selector specifying which fields to include in a partial response.
458
495
  # @param [Google::Apis::RequestOptions] options
459
496
  # Request-specific options
460
497
  #
@@ -467,7 +504,7 @@ module Google
467
504
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
468
505
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
469
506
  # @raise [Google::Apis::AuthorizationError] Authorization is required
470
- def update_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, response_value_render_option: nil, value_input_option: nil, response_date_time_render_option: nil, include_values_in_response: nil, quota_user: nil, fields: nil, options: nil, &block)
507
+ def update_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, value_input_option: nil, response_date_time_render_option: nil, include_values_in_response: nil, response_value_render_option: nil, fields: nil, quota_user: nil, options: nil, &block)
471
508
  command = make_simple_command(:put, 'v4/spreadsheets/{spreadsheetId}/values/{range}', options)
472
509
  command.request_representation = Google::Apis::SheetsV4::ValueRange::Representation
473
510
  command.request_object = value_range_object
@@ -475,85 +512,48 @@ module Google
475
512
  command.response_class = Google::Apis::SheetsV4::UpdateValuesResponse
476
513
  command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
477
514
  command.params['range'] = range unless range.nil?
478
- command.query['responseValueRenderOption'] = response_value_render_option unless response_value_render_option.nil?
479
515
  command.query['valueInputOption'] = value_input_option unless value_input_option.nil?
480
516
  command.query['responseDateTimeRenderOption'] = response_date_time_render_option unless response_date_time_render_option.nil?
481
517
  command.query['includeValuesInResponse'] = include_values_in_response unless include_values_in_response.nil?
482
- command.query['quotaUser'] = quota_user unless quota_user.nil?
518
+ command.query['responseValueRenderOption'] = response_value_render_option unless response_value_render_option.nil?
483
519
  command.query['fields'] = fields unless fields.nil?
520
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
484
521
  execute_or_queue_command(command, &block)
485
522
  end
486
523
 
487
- # Clears one or more ranges of values from a spreadsheet.
488
- # The caller must specify the spreadsheet ID and one or more ranges.
489
- # Only values are cleared -- all other properties of the cell (such as
490
- # formatting, data validation, etc..) are kept.
524
+ # Sets values in one or more ranges of a spreadsheet.
525
+ # The caller must specify the spreadsheet ID,
526
+ # a valueInputOption, and one or more
527
+ # ValueRanges.
491
528
  # @param [String] spreadsheet_id
492
529
  # The ID of the spreadsheet to update.
493
- # @param [Google::Apis::SheetsV4::BatchClearValuesRequest] batch_clear_values_request_object
494
- # @param [String] quota_user
495
- # Available to use for quota purposes for server-side applications. Can be any
496
- # arbitrary string assigned to a user, but should not exceed 40 characters.
530
+ # @param [Google::Apis::SheetsV4::BatchUpdateValuesRequest] batch_update_values_request_object
497
531
  # @param [String] fields
498
532
  # Selector specifying which fields to include in a partial response.
499
- # @param [Google::Apis::RequestOptions] options
500
- # Request-specific options
501
- #
502
- # @yield [result, err] Result & error if block supplied
503
- # @yieldparam result [Google::Apis::SheetsV4::BatchClearValuesResponse] parsed result object
504
- # @yieldparam err [StandardError] error object if request failed
505
- #
506
- # @return [Google::Apis::SheetsV4::BatchClearValuesResponse]
507
- #
508
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
509
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
510
- # @raise [Google::Apis::AuthorizationError] Authorization is required
511
- def batch_clear_values(spreadsheet_id, batch_clear_values_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
512
- command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchClear', options)
513
- command.request_representation = Google::Apis::SheetsV4::BatchClearValuesRequest::Representation
514
- command.request_object = batch_clear_values_request_object
515
- command.response_representation = Google::Apis::SheetsV4::BatchClearValuesResponse::Representation
516
- command.response_class = Google::Apis::SheetsV4::BatchClearValuesResponse
517
- command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
518
- command.query['quotaUser'] = quota_user unless quota_user.nil?
519
- command.query['fields'] = fields unless fields.nil?
520
- execute_or_queue_command(command, &block)
521
- end
522
-
523
- # Copies a single sheet from a spreadsheet to another spreadsheet.
524
- # Returns the properties of the newly created sheet.
525
- # @param [String] spreadsheet_id
526
- # The ID of the spreadsheet containing the sheet to copy.
527
- # @param [Fixnum] sheet_id
528
- # The ID of the sheet to copy.
529
- # @param [Google::Apis::SheetsV4::CopySheetToAnotherSpreadsheetRequest] copy_sheet_to_another_spreadsheet_request_object
530
533
  # @param [String] quota_user
531
534
  # Available to use for quota purposes for server-side applications. Can be any
532
535
  # arbitrary string assigned to a user, but should not exceed 40 characters.
533
- # @param [String] fields
534
- # Selector specifying which fields to include in a partial response.
535
536
  # @param [Google::Apis::RequestOptions] options
536
537
  # Request-specific options
537
538
  #
538
539
  # @yield [result, err] Result & error if block supplied
539
- # @yieldparam result [Google::Apis::SheetsV4::SheetProperties] parsed result object
540
+ # @yieldparam result [Google::Apis::SheetsV4::BatchUpdateValuesResponse] parsed result object
540
541
  # @yieldparam err [StandardError] error object if request failed
541
542
  #
542
- # @return [Google::Apis::SheetsV4::SheetProperties]
543
+ # @return [Google::Apis::SheetsV4::BatchUpdateValuesResponse]
543
544
  #
544
545
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
545
546
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
546
547
  # @raise [Google::Apis::AuthorizationError] Authorization is required
547
- def copy_spreadsheet(spreadsheet_id, sheet_id, copy_sheet_to_another_spreadsheet_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
548
- command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo', options)
549
- command.request_representation = Google::Apis::SheetsV4::CopySheetToAnotherSpreadsheetRequest::Representation
550
- command.request_object = copy_sheet_to_another_spreadsheet_request_object
551
- command.response_representation = Google::Apis::SheetsV4::SheetProperties::Representation
552
- command.response_class = Google::Apis::SheetsV4::SheetProperties
548
+ def batch_update_values(spreadsheet_id, batch_update_values_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
549
+ command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchUpdate', options)
550
+ command.request_representation = Google::Apis::SheetsV4::BatchUpdateValuesRequest::Representation
551
+ command.request_object = batch_update_values_request_object
552
+ command.response_representation = Google::Apis::SheetsV4::BatchUpdateValuesResponse::Representation
553
+ command.response_class = Google::Apis::SheetsV4::BatchUpdateValuesResponse
553
554
  command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
554
- command.params['sheetId'] = sheet_id unless sheet_id.nil?
555
- command.query['quotaUser'] = quota_user unless quota_user.nil?
556
555
  command.query['fields'] = fields unless fields.nil?
556
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
557
557
  execute_or_queue_command(command, &block)
558
558
  end
559
559