google-api-client 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/google-api-client.gemspec +4 -3
- data/lib/google/api_client/client_secrets.rb +1 -1
- data/lib/google/apis/core/download.rb +10 -1
- data/lib/google/apis/core/json_representation.rb +2 -2
- data/lib/google/apis/version.rb +1 -1
- data/samples/cli/.env +4 -0
- data/samples/web/.env +2 -0
- data/samples/web/views/home.erb +0 -1
- metadata +5 -71
- data/api_names_out.yaml +0 -28434
- data/generated/google/apis/sheets_v1.rb +0 -43
- data/generated/google/apis/sheets_v1/classes.rb +0 -4542
- data/generated/google/apis/sheets_v1/representations.rb +0 -1703
- data/generated/google/apis/sheets_v1/service.rb +0 -363
- data/script/generate +0 -105
- data/script/package +0 -8
- data/script/release +0 -15
- data/spec/fixtures/files/api_names.yaml +0 -3
- data/spec/fixtures/files/auth_stored_credentials.json +0 -8
- data/spec/fixtures/files/child/.gitignore +0 -0
- data/spec/fixtures/files/client_secrets.json +0 -1
- data/spec/fixtures/files/invalid.json +0 -1
- data/spec/fixtures/files/test.blah +0 -1
- data/spec/fixtures/files/test.txt +0 -1
- data/spec/fixtures/files/test_api.json +0 -440
- data/spec/google/api_client/auth/storage_spec.rb +0 -120
- data/spec/google/api_client/auth/storages/file_store_spec.rb +0 -39
- data/spec/google/api_client/auth/storages/redis_store_spec.rb +0 -68
- data/spec/google/api_client/client_secrets_spec.rb +0 -389
- data/spec/google/apis/core/api_command_spec.rb +0 -209
- data/spec/google/apis/core/batch_spec.rb +0 -142
- data/spec/google/apis/core/download_spec.rb +0 -103
- data/spec/google/apis/core/hashable_spec.rb +0 -60
- data/spec/google/apis/core/http_command_spec.rb +0 -303
- data/spec/google/apis/core/json_representation_spec.rb +0 -199
- data/spec/google/apis/core/service_spec.rb +0 -313
- data/spec/google/apis/core/upload_spec.rb +0 -300
- data/spec/google/apis/generated_spec.rb +0 -27
- data/spec/google/apis/generator/generator_spec.rb +0 -324
- data/spec/google/apis/logging_spec.rb +0 -100
- data/spec/google/apis/options_spec.rb +0 -40
- data/spec/integration_tests/adsense_spec.rb +0 -29
- data/spec/integration_tests/drive_spec.rb +0 -35
- data/spec/integration_tests/pubsub_spec.rb +0 -48
- data/spec/integration_tests/url_shortener_spec.rb +0 -45
- data/spec/spec_helper.rb +0 -153
- data/spec/spec_helper/load_path_spec.rb +0 -33
@@ -1,363 +0,0 @@
|
|
1
|
-
# Copyright 2015 Google Inc.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
require 'google/apis/core/base_service'
|
16
|
-
require 'google/apis/core/json_representation'
|
17
|
-
require 'google/apis/core/hashable'
|
18
|
-
require 'google/apis/errors'
|
19
|
-
|
20
|
-
module Google
|
21
|
-
module Apis
|
22
|
-
module SheetsV1
|
23
|
-
# Google Sheets API
|
24
|
-
#
|
25
|
-
# An API for reading and modifying Google Sheets.
|
26
|
-
#
|
27
|
-
# @example
|
28
|
-
# require 'google/apis/sheets_v1'
|
29
|
-
#
|
30
|
-
# Sheets = Google::Apis::SheetsV1 # Alias the module
|
31
|
-
# service = Sheets::SheetsService.new
|
32
|
-
#
|
33
|
-
# @see
|
34
|
-
class SheetsService < Google::Apis::Core::BaseService
|
35
|
-
# @return [String]
|
36
|
-
# API key. Your API key identifies your project and provides you with API access,
|
37
|
-
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
38
|
-
attr_accessor :key
|
39
|
-
|
40
|
-
# @return [String]
|
41
|
-
# Available to use for quota purposes for server-side applications. Can be any
|
42
|
-
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
43
|
-
attr_accessor :quota_user
|
44
|
-
|
45
|
-
def initialize
|
46
|
-
super('https://sheets.googleapis.com/', '')
|
47
|
-
end
|
48
|
-
|
49
|
-
# Returns the spreadsheet at the given id.
|
50
|
-
# The caller must specify the spreadsheet ID.
|
51
|
-
# By default, data within grids will not be returned.
|
52
|
-
# You can include grid data one of two ways: specify a field mask listing
|
53
|
-
# your desired fields (using the ?fields URL parameter in HTTP,
|
54
|
-
# or FieldMaskContext.response_mask in the request extensions in an RPC), or
|
55
|
-
# by setting the 'includeGridData' parameter to true. If a field mask is
|
56
|
-
# set, the 'includeGridData' parameter is ignored.
|
57
|
-
# For large spreadsheets, it is recommended to retrieve only the specific
|
58
|
-
# fields of the spreadsheet that you want.
|
59
|
-
# To retrieve only subsets of the spreadsheet, use the ?range URL
|
60
|
-
# parameter. Multiple ranges can be specified. Limiting the range will
|
61
|
-
# return only the portions of the spreadsheet that intersect the requested
|
62
|
-
# ranges. Ranges are specified using A1 notation.
|
63
|
-
# @param [String] spreadsheet_id
|
64
|
-
# The spreadsheet to request.
|
65
|
-
# @param [Array<String>, String] ranges
|
66
|
-
# The ranges to retrieve from the spreadsheet.
|
67
|
-
# @param [Boolean] include_grid_data
|
68
|
-
# True if grid data should be returned.
|
69
|
-
# This parameter is ignored if a field mask was set in the request.
|
70
|
-
# @param [String] quota_user
|
71
|
-
# Available to use for quota purposes for server-side applications. Can be any
|
72
|
-
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
73
|
-
# @param [String] fields
|
74
|
-
# Selector specifying which fields to include in a partial response.
|
75
|
-
# @param [Google::Apis::RequestOptions] options
|
76
|
-
# Request-specific options
|
77
|
-
#
|
78
|
-
# @yield [result, err] Result & error if block supplied
|
79
|
-
# @yieldparam result [Google::Apis::SheetsV1::Spreadsheet] parsed result object
|
80
|
-
# @yieldparam err [StandardError] error object if request failed
|
81
|
-
#
|
82
|
-
# @return [Google::Apis::SheetsV1::Spreadsheet]
|
83
|
-
#
|
84
|
-
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
85
|
-
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
86
|
-
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
87
|
-
def get_spreadsheet(spreadsheet_id, ranges: nil, include_grid_data: nil, quota_user: nil, fields: nil, options: nil, &block)
|
88
|
-
command = make_simple_command(:get, 'v1/spreadsheets/{spreadsheetId}', options)
|
89
|
-
command.response_representation = Google::Apis::SheetsV1::Spreadsheet::Representation
|
90
|
-
command.response_class = Google::Apis::SheetsV1::Spreadsheet
|
91
|
-
command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
|
92
|
-
command.query['ranges'] = ranges unless ranges.nil?
|
93
|
-
command.query['includeGridData'] = include_grid_data unless include_grid_data.nil?
|
94
|
-
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
95
|
-
command.query['fields'] = fields unless fields.nil?
|
96
|
-
execute_or_queue_command(command, &block)
|
97
|
-
end
|
98
|
-
|
99
|
-
# Applies one or more updates to the spreadsheet.
|
100
|
-
# Each request is validated before being applied. If any
|
101
|
-
# request is not valid then the entire request will fail and nothing
|
102
|
-
# will be applied.
|
103
|
-
# Some requests have "replies" to give you some information about how
|
104
|
-
# they applied. The replies will mirror the requests. For example,
|
105
|
-
# if you applied 4 updates and the 3rd one had a reply, then the
|
106
|
-
# response will have 2 empty replies, the actual reply, and another empty
|
107
|
-
# reply, in that order.
|
108
|
-
# Due to the collaborative nature of spreadsheets, it is not guaranteed that
|
109
|
-
# the spreadsheet will reflect exactly your changes after this completes,
|
110
|
-
# however it is guaranteed that all the updates in the request will be
|
111
|
-
# applied atomically. Your changes may be altered with respect to
|
112
|
-
# collaborator changes. If there are no collaborators, the spreadsheet
|
113
|
-
# should reflect your changes.
|
114
|
-
# @param [String] spreadsheet_id
|
115
|
-
# The spreadsheet to apply the updates to.
|
116
|
-
# @param [Google::Apis::SheetsV1::BatchUpdateSpreadsheetRequest] batch_update_spreadsheet_request_object
|
117
|
-
# @param [String] quota_user
|
118
|
-
# Available to use for quota purposes for server-side applications. Can be any
|
119
|
-
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
120
|
-
# @param [String] fields
|
121
|
-
# Selector specifying which fields to include in a partial response.
|
122
|
-
# @param [Google::Apis::RequestOptions] options
|
123
|
-
# Request-specific options
|
124
|
-
#
|
125
|
-
# @yield [result, err] Result & error if block supplied
|
126
|
-
# @yieldparam result [Google::Apis::SheetsV1::BatchUpdateSpreadsheetResponse] parsed result object
|
127
|
-
# @yieldparam err [StandardError] error object if request failed
|
128
|
-
#
|
129
|
-
# @return [Google::Apis::SheetsV1::BatchUpdateSpreadsheetResponse]
|
130
|
-
#
|
131
|
-
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
132
|
-
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
133
|
-
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
134
|
-
def batch_update_spreadsheet(spreadsheet_id, batch_update_spreadsheet_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
135
|
-
command = make_simple_command(:post, 'v1/spreadsheets/{spreadsheetId}:batchUpdate', options)
|
136
|
-
command.request_representation = Google::Apis::SheetsV1::BatchUpdateSpreadsheetRequest::Representation
|
137
|
-
command.request_object = batch_update_spreadsheet_request_object
|
138
|
-
command.response_representation = Google::Apis::SheetsV1::BatchUpdateSpreadsheetResponse::Representation
|
139
|
-
command.response_class = Google::Apis::SheetsV1::BatchUpdateSpreadsheetResponse
|
140
|
-
command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
|
141
|
-
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
142
|
-
command.query['fields'] = fields unless fields.nil?
|
143
|
-
execute_or_queue_command(command, &block)
|
144
|
-
end
|
145
|
-
|
146
|
-
# Sets values in a range of a spreadsheet.
|
147
|
-
# The caller must specify the spreadsheet ID, range, and valueInputOption.
|
148
|
-
# @param [String] spreadsheet_id
|
149
|
-
# The id of the spreadsheet to update.
|
150
|
-
# @param [String] range
|
151
|
-
# The A1 notation of the values to update.
|
152
|
-
# @param [Google::Apis::SheetsV1::ValueRange] value_range_object
|
153
|
-
# @param [String] value_input_option
|
154
|
-
# How the input data should be interpreted.
|
155
|
-
# @param [String] quota_user
|
156
|
-
# Available to use for quota purposes for server-side applications. Can be any
|
157
|
-
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
158
|
-
# @param [String] fields
|
159
|
-
# Selector specifying which fields to include in a partial response.
|
160
|
-
# @param [Google::Apis::RequestOptions] options
|
161
|
-
# Request-specific options
|
162
|
-
#
|
163
|
-
# @yield [result, err] Result & error if block supplied
|
164
|
-
# @yieldparam result [Google::Apis::SheetsV1::Empty] parsed result object
|
165
|
-
# @yieldparam err [StandardError] error object if request failed
|
166
|
-
#
|
167
|
-
# @return [Google::Apis::SheetsV1::Empty]
|
168
|
-
#
|
169
|
-
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
170
|
-
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
171
|
-
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
172
|
-
def update_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, value_input_option: nil, quota_user: nil, fields: nil, options: nil, &block)
|
173
|
-
command = make_simple_command(:put, 'v1/spreadsheets/{spreadsheetId}/values/{range}', options)
|
174
|
-
command.request_representation = Google::Apis::SheetsV1::ValueRange::Representation
|
175
|
-
command.request_object = value_range_object
|
176
|
-
command.response_representation = Google::Apis::SheetsV1::Empty::Representation
|
177
|
-
command.response_class = Google::Apis::SheetsV1::Empty
|
178
|
-
command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
|
179
|
-
command.params['range'] = range unless range.nil?
|
180
|
-
command.query['valueInputOption'] = value_input_option unless value_input_option.nil?
|
181
|
-
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
182
|
-
command.query['fields'] = fields unless fields.nil?
|
183
|
-
execute_or_queue_command(command, &block)
|
184
|
-
end
|
185
|
-
|
186
|
-
# Returns one or more ranges of values from a spreadsheet.
|
187
|
-
# The caller must specify the spreadsheet ID and one or more ranges.
|
188
|
-
# @param [String] spreadsheet_id
|
189
|
-
# The id of the spreadsheet to retrieve data from.
|
190
|
-
# @param [String] date_time_render_option
|
191
|
-
# How dates, times, and durations should be represented in the output.
|
192
|
-
# This is ignored if valueRenderOption is FORMATTED_VALUE.
|
193
|
-
# @param [String] value_render_option
|
194
|
-
# How values should be represented in the output.
|
195
|
-
# @param [Array<String>, String] ranges
|
196
|
-
# The A1 notation of the values to retrieve.
|
197
|
-
# @param [String] major_dimension
|
198
|
-
# The major dimension that results should use.
|
199
|
-
# For example, if the spreadsheet data is: A1=1,B1=2,A2=3,B2=4,
|
200
|
-
# then requesting range=A1:B2,majorDimension=ROWS will return [[1,2],[3,4]],
|
201
|
-
# whereas requesting range=A1:B2,majorDimension=COLUMNS will return
|
202
|
-
# [[1,3],[2,4]].
|
203
|
-
# @param [String] quota_user
|
204
|
-
# Available to use for quota purposes for server-side applications. Can be any
|
205
|
-
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
206
|
-
# @param [String] fields
|
207
|
-
# Selector specifying which fields to include in a partial response.
|
208
|
-
# @param [Google::Apis::RequestOptions] options
|
209
|
-
# Request-specific options
|
210
|
-
#
|
211
|
-
# @yield [result, err] Result & error if block supplied
|
212
|
-
# @yieldparam result [Google::Apis::SheetsV1::BatchGetValuesResponse] parsed result object
|
213
|
-
# @yieldparam err [StandardError] error object if request failed
|
214
|
-
#
|
215
|
-
# @return [Google::Apis::SheetsV1::BatchGetValuesResponse]
|
216
|
-
#
|
217
|
-
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
218
|
-
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
219
|
-
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
220
|
-
def batch_spreadsheet_value_get(spreadsheet_id, date_time_render_option: nil, value_render_option: nil, ranges: nil, major_dimension: nil, quota_user: nil, fields: nil, options: nil, &block)
|
221
|
-
command = make_simple_command(:get, 'v1/spreadsheets/{spreadsheetId}/values:batchGet', options)
|
222
|
-
command.response_representation = Google::Apis::SheetsV1::BatchGetValuesResponse::Representation
|
223
|
-
command.response_class = Google::Apis::SheetsV1::BatchGetValuesResponse
|
224
|
-
command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
|
225
|
-
command.query['dateTimeRenderOption'] = date_time_render_option unless date_time_render_option.nil?
|
226
|
-
command.query['valueRenderOption'] = value_render_option unless value_render_option.nil?
|
227
|
-
command.query['ranges'] = ranges unless ranges.nil?
|
228
|
-
command.query['majorDimension'] = major_dimension unless major_dimension.nil?
|
229
|
-
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
230
|
-
command.query['fields'] = fields unless fields.nil?
|
231
|
-
execute_or_queue_command(command, &block)
|
232
|
-
end
|
233
|
-
|
234
|
-
# Returns a range of values from a spreadsheet.
|
235
|
-
# The caller must specify the spreadsheet ID and a range.
|
236
|
-
# @param [String] spreadsheet_id
|
237
|
-
# The id of the spreadsheet to retrieve data from.
|
238
|
-
# @param [String] range
|
239
|
-
# The A1 notation of the values to retrieve.
|
240
|
-
# @param [String] date_time_render_option
|
241
|
-
# How dates, times, and durations should be represented in the output.
|
242
|
-
# This is ignored if the valueRenderOption option is FORMATTED_VALUE.
|
243
|
-
# @param [String] value_render_option
|
244
|
-
# How values should be represented in the output.
|
245
|
-
# @param [String] major_dimension
|
246
|
-
# The major dimension that results should use.
|
247
|
-
# For example, if the spreadsheet data is: A1=1,B1=2,A2=3,B2=4,
|
248
|
-
# then requesting range=A1:B2,majorDimension=ROWS will return [[1,2],[3,4]],
|
249
|
-
# whereas requesting range=A1:B2,majorDimension=COLUMNS will return
|
250
|
-
# [[1,3],[2,4]].
|
251
|
-
# @param [String] quota_user
|
252
|
-
# Available to use for quota purposes for server-side applications. Can be any
|
253
|
-
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
254
|
-
# @param [String] fields
|
255
|
-
# Selector specifying which fields to include in a partial response.
|
256
|
-
# @param [Google::Apis::RequestOptions] options
|
257
|
-
# Request-specific options
|
258
|
-
#
|
259
|
-
# @yield [result, err] Result & error if block supplied
|
260
|
-
# @yieldparam result [Google::Apis::SheetsV1::ValueRange] parsed result object
|
261
|
-
# @yieldparam err [StandardError] error object if request failed
|
262
|
-
#
|
263
|
-
# @return [Google::Apis::SheetsV1::ValueRange]
|
264
|
-
#
|
265
|
-
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
266
|
-
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
267
|
-
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
268
|
-
def get_spreadsheet_value(spreadsheet_id, range, date_time_render_option: nil, value_render_option: nil, major_dimension: nil, quota_user: nil, fields: nil, options: nil, &block)
|
269
|
-
command = make_simple_command(:get, 'v1/spreadsheets/{spreadsheetId}/values/{range}', options)
|
270
|
-
command.response_representation = Google::Apis::SheetsV1::ValueRange::Representation
|
271
|
-
command.response_class = Google::Apis::SheetsV1::ValueRange
|
272
|
-
command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
|
273
|
-
command.params['range'] = range unless range.nil?
|
274
|
-
command.query['dateTimeRenderOption'] = date_time_render_option unless date_time_render_option.nil?
|
275
|
-
command.query['valueRenderOption'] = value_render_option unless value_render_option.nil?
|
276
|
-
command.query['majorDimension'] = major_dimension unless major_dimension.nil?
|
277
|
-
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
278
|
-
command.query['fields'] = fields unless fields.nil?
|
279
|
-
execute_or_queue_command(command, &block)
|
280
|
-
end
|
281
|
-
|
282
|
-
# Sets values in a range of a spreadsheet.
|
283
|
-
# The caller must specify the spreadsheet ID, valueInputOption, and one
|
284
|
-
# or more ValueRanges.
|
285
|
-
# @param [String] spreadsheet_id
|
286
|
-
# The id of the spreadsheet to update.
|
287
|
-
# @param [Google::Apis::SheetsV1::BatchUpdateValuesRequest] batch_update_values_request_object
|
288
|
-
# @param [String] quota_user
|
289
|
-
# Available to use for quota purposes for server-side applications. Can be any
|
290
|
-
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
291
|
-
# @param [String] fields
|
292
|
-
# Selector specifying which fields to include in a partial response.
|
293
|
-
# @param [Google::Apis::RequestOptions] options
|
294
|
-
# Request-specific options
|
295
|
-
#
|
296
|
-
# @yield [result, err] Result & error if block supplied
|
297
|
-
# @yieldparam result [Google::Apis::SheetsV1::Empty] parsed result object
|
298
|
-
# @yieldparam err [StandardError] error object if request failed
|
299
|
-
#
|
300
|
-
# @return [Google::Apis::SheetsV1::Empty]
|
301
|
-
#
|
302
|
-
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
303
|
-
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
304
|
-
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
305
|
-
def batch_update_values(spreadsheet_id, batch_update_values_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
306
|
-
command = make_simple_command(:post, 'v1/spreadsheets/{spreadsheetId}/values:batchUpdate', options)
|
307
|
-
command.request_representation = Google::Apis::SheetsV1::BatchUpdateValuesRequest::Representation
|
308
|
-
command.request_object = batch_update_values_request_object
|
309
|
-
command.response_representation = Google::Apis::SheetsV1::Empty::Representation
|
310
|
-
command.response_class = Google::Apis::SheetsV1::Empty
|
311
|
-
command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
|
312
|
-
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
313
|
-
command.query['fields'] = fields unless fields.nil?
|
314
|
-
execute_or_queue_command(command, &block)
|
315
|
-
end
|
316
|
-
|
317
|
-
# Copies a single sheet from a spreadsheet to another spreadsheet.
|
318
|
-
# Returns the properties of the newly created sheet.
|
319
|
-
# @param [String] spreadsheet_id
|
320
|
-
# The id of the spreadsheet containing the sheet to copy.
|
321
|
-
# @param [Fixnum] sheet_id
|
322
|
-
# The ID of the sheet to copy.
|
323
|
-
# @param [Google::Apis::SheetsV1::CopySheetToAnotherSpreadsheetRequest] copy_sheet_to_another_spreadsheet_request_object
|
324
|
-
# @param [String] quota_user
|
325
|
-
# Available to use for quota purposes for server-side applications. Can be any
|
326
|
-
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
327
|
-
# @param [String] fields
|
328
|
-
# Selector specifying which fields to include in a partial response.
|
329
|
-
# @param [Google::Apis::RequestOptions] options
|
330
|
-
# Request-specific options
|
331
|
-
#
|
332
|
-
# @yield [result, err] Result & error if block supplied
|
333
|
-
# @yieldparam result [Google::Apis::SheetsV1::SheetProperties] parsed result object
|
334
|
-
# @yieldparam err [StandardError] error object if request failed
|
335
|
-
#
|
336
|
-
# @return [Google::Apis::SheetsV1::SheetProperties]
|
337
|
-
#
|
338
|
-
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
339
|
-
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
340
|
-
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
341
|
-
def copy_spreadsheet_sheet_to(spreadsheet_id, sheet_id, copy_sheet_to_another_spreadsheet_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
342
|
-
command = make_simple_command(:post, 'v1/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo', options)
|
343
|
-
command.request_representation = Google::Apis::SheetsV1::CopySheetToAnotherSpreadsheetRequest::Representation
|
344
|
-
command.request_object = copy_sheet_to_another_spreadsheet_request_object
|
345
|
-
command.response_representation = Google::Apis::SheetsV1::SheetProperties::Representation
|
346
|
-
command.response_class = Google::Apis::SheetsV1::SheetProperties
|
347
|
-
command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
|
348
|
-
command.params['sheetId'] = sheet_id unless sheet_id.nil?
|
349
|
-
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
350
|
-
command.query['fields'] = fields unless fields.nil?
|
351
|
-
execute_or_queue_command(command, &block)
|
352
|
-
end
|
353
|
-
|
354
|
-
protected
|
355
|
-
|
356
|
-
def apply_command_defaults(command)
|
357
|
-
command.query['key'] = key unless key.nil?
|
358
|
-
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
359
|
-
end
|
360
|
-
end
|
361
|
-
end
|
362
|
-
end
|
363
|
-
end
|
data/script/generate
DELETED
@@ -1,105 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
# Usage: script/generate
|
3
|
-
# Update packaged APIs
|
4
|
-
|
5
|
-
DIR=$(dirname $( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ))
|
6
|
-
|
7
|
-
API_IDS=(adexchangebuyer:v1.4 \
|
8
|
-
adexchangeseller:v2.0 \
|
9
|
-
admin:directory_v1 \
|
10
|
-
admin:datatransfer_v1 \
|
11
|
-
admin:reports_v1 \
|
12
|
-
adsense:v1.4 \
|
13
|
-
adsensehost:v4.1 \
|
14
|
-
analytics:v3 \
|
15
|
-
androidenterprise:v1 \
|
16
|
-
androidpublisher:v2 \
|
17
|
-
appengine:v1beta5 \
|
18
|
-
appsactivity:v1 \
|
19
|
-
appstate:v1 \
|
20
|
-
autoscaler:v1beta2 \
|
21
|
-
bigquery:v2 \
|
22
|
-
blogger:v3 \
|
23
|
-
books:v1 \
|
24
|
-
calendar:v3 \
|
25
|
-
civicinfo:v2 \
|
26
|
-
classroom:v1 \
|
27
|
-
cloudbilling:v1 \
|
28
|
-
cloudbuild:v1 \
|
29
|
-
clouddebugger:v2 \
|
30
|
-
cloudlatencytest:v2 \
|
31
|
-
cloudmonitoring:v2beta2 \
|
32
|
-
cloudresourcemanager:v1beta1 \
|
33
|
-
cloudresourcemanager:v1 \
|
34
|
-
cloudtrace:v1 \
|
35
|
-
clouduseraccounts:beta \
|
36
|
-
compute:v1 \
|
37
|
-
compute:beta \
|
38
|
-
container:v1 \
|
39
|
-
content:v2 \
|
40
|
-
coordinate:v1 \
|
41
|
-
customsearch:v1 \
|
42
|
-
dataproc:v1 \
|
43
|
-
datastore:v1beta2 \
|
44
|
-
deploymentmanager:v2 \
|
45
|
-
dfareporting:v2.3 \
|
46
|
-
discovery:v1 \
|
47
|
-
dns:v1 \
|
48
|
-
doubleclickbidmanager:v1 \
|
49
|
-
doubleclicksearch:v2 \
|
50
|
-
drive:v2 \
|
51
|
-
drive:v3 \
|
52
|
-
fitness:v1 \
|
53
|
-
fusiontables:v2 \
|
54
|
-
games:v1 \
|
55
|
-
gamesConfiguration:v1configuration \
|
56
|
-
gamesManagement:v1management \
|
57
|
-
gan:v1beta1 \
|
58
|
-
genomics:v1 \
|
59
|
-
gmail:v1 \
|
60
|
-
groupsmigration:v1 \
|
61
|
-
groupssettings:v1 \
|
62
|
-
iam:v1 \
|
63
|
-
identitytoolkit:v3 \
|
64
|
-
kgsearch:v1 \
|
65
|
-
licensing:v1 \
|
66
|
-
logging:v2beta1 \
|
67
|
-
manager:v1beta2 \
|
68
|
-
mapsengine:v1 \
|
69
|
-
mirror:v1 \
|
70
|
-
oauth2:v2 \
|
71
|
-
pagespeedonline:v2 \
|
72
|
-
partners:v2 \
|
73
|
-
people:v1 \
|
74
|
-
plus:v1 \
|
75
|
-
plusDomains:v1 \
|
76
|
-
prediction:v1.6 \
|
77
|
-
proximitybeacon:v1beta1 \
|
78
|
-
pubsub:v1 \
|
79
|
-
qpxExpress:v1 \
|
80
|
-
replicapool:v1beta2 \
|
81
|
-
replicapoolupdater:v1beta1 \
|
82
|
-
reseller:v1 \
|
83
|
-
resourceviews:v1beta2 \
|
84
|
-
script:v1 \
|
85
|
-
siteVerification:v1 \
|
86
|
-
sqladmin:v1beta4 \
|
87
|
-
storage:v1 \
|
88
|
-
storagetransfer:v1 \
|
89
|
-
tagmanager:v1 \
|
90
|
-
taskqueue:v1beta2 \
|
91
|
-
tasks:v1 \
|
92
|
-
translate:v2 \
|
93
|
-
urlshortener:v1 \
|
94
|
-
vision:v1 \
|
95
|
-
webmasters:v3 \
|
96
|
-
youtube:v3 \
|
97
|
-
youtubeAnalytics:v1 \
|
98
|
-
youtubereporting:v1 \
|
99
|
-
)
|
100
|
-
|
101
|
-
URLS=(https://content.googleapis.com/discovery/v1/apis/youtubePartner/v1/rest \
|
102
|
-
https://content.googleapis.com/discovery/v1/apis/compute/beta/rest \
|
103
|
-
)
|
104
|
-
|
105
|
-
echo 'a' | bundle exec bin/generate-api gen generated --from-discovery=true --names_out=$DIR/api_names_out.yaml --url=${URLS[*]} --id=${API_IDS[*]}
|