generated/google/apis/sheets_v4/service.rb in google-api-client-0.9.18 vs generated/google/apis/sheets_v4/service.rb in google-api-client-0.9.19
- old
+ new
@@ -174,101 +174,130 @@
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
- # 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/guides/values#appending_values)
- # and
- # [sample code](/sheets/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.
+ # 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.
# @param [String] spreadsheet_id
# The ID of the spreadsheet to update.
# @param [String] range
- # The A1 notation of a range to search for a logical table of data.
- # Values will be appended after the last row of the table.
- # @param [Google::Apis::SheetsV4::ValueRange] value_range_object
- # @param [String] value_input_option
- # How the input data should be interpreted.
- # @param [String] insert_data_option
- # How the input data should be inserted.
+ # The A1 notation of the values to clear.
+ # @param [Google::Apis::SheetsV4::ClearValuesRequest] clear_values_request_object
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
- # @yieldparam result [Google::Apis::SheetsV4::AppendValuesResponse] parsed result object
+ # @yieldparam result [Google::Apis::SheetsV4::ClearValuesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
- # @return [Google::Apis::SheetsV4::AppendValuesResponse]
+ # @return [Google::Apis::SheetsV4::ClearValuesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
- def append_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, value_input_option: nil, insert_data_option: nil, quota_user: nil, fields: nil, options: nil, &block)
- command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values/{range}:append', options)
- command.request_representation = Google::Apis::SheetsV4::ValueRange::Representation
- command.request_object = value_range_object
- command.response_representation = Google::Apis::SheetsV4::AppendValuesResponse::Representation
- command.response_class = Google::Apis::SheetsV4::AppendValuesResponse
+ def clear_values(spreadsheet_id, range, clear_values_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
+ command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values/{range}:clear', options)
+ command.request_representation = Google::Apis::SheetsV4::ClearValuesRequest::Representation
+ command.request_object = clear_values_request_object
+ command.response_representation = Google::Apis::SheetsV4::ClearValuesResponse::Representation
+ command.response_class = Google::Apis::SheetsV4::ClearValuesResponse
command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
command.params['range'] = range unless range.nil?
- command.query['valueInputOption'] = value_input_option unless value_input_option.nil?
- command.query['insertDataOption'] = insert_data_option unless insert_data_option.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
- # Sets values in a range of a spreadsheet.
- # The caller must specify the spreadsheet ID, range, and
- # a valueInputOption.
+ # Returns one or more ranges of values from a spreadsheet.
+ # The caller must specify the spreadsheet ID and one or more ranges.
# @param [String] spreadsheet_id
+ # The ID of the spreadsheet to retrieve data from.
+ # @param [Array<String>, String] ranges
+ # The A1 notation of the values to retrieve.
+ # @param [String] value_render_option
+ # How values should be represented in the output.
+ # @param [String] date_time_render_option
+ # How dates, times, and durations should be represented in the output.
+ # This is ignored if value_render_option is
+ # FORMATTED_VALUE.
+ # @param [String] major_dimension
+ # The major dimension that results should use.
+ # For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
+ # then requesting `range=A1:B2,majorDimension=ROWS` will return
+ # `[[1,2],[3,4]]`,
+ # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
+ # `[[1,3],[2,4]]`.
+ # @param [String] quota_user
+ # Available to use for quota purposes for server-side applications. Can be any
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
+ # @param [String] fields
+ # Selector specifying which fields to include in a partial response.
+ # @param [Google::Apis::RequestOptions] options
+ # Request-specific options
+ #
+ # @yield [result, err] Result & error if block supplied
+ # @yieldparam result [Google::Apis::SheetsV4::BatchGetValuesResponse] parsed result object
+ # @yieldparam err [StandardError] error object if request failed
+ #
+ # @return [Google::Apis::SheetsV4::BatchGetValuesResponse]
+ #
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
+ 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)
+ command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}/values:batchGet', options)
+ command.response_representation = Google::Apis::SheetsV4::BatchGetValuesResponse::Representation
+ command.response_class = Google::Apis::SheetsV4::BatchGetValuesResponse
+ command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
+ command.query['ranges'] = ranges unless ranges.nil?
+ command.query['valueRenderOption'] = value_render_option unless value_render_option.nil?
+ command.query['dateTimeRenderOption'] = date_time_render_option unless date_time_render_option.nil?
+ command.query['majorDimension'] = major_dimension unless major_dimension.nil?
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
+ command.query['fields'] = fields unless fields.nil?
+ execute_or_queue_command(command, &block)
+ end
+
+ # Sets values in one or more ranges of a spreadsheet.
+ # The caller must specify the spreadsheet ID,
+ # a valueInputOption, and one or more
+ # ValueRanges.
+ # @param [String] spreadsheet_id
# The ID of the spreadsheet to update.
- # @param [String] range
- # The A1 notation of the values to update.
- # @param [Google::Apis::SheetsV4::ValueRange] value_range_object
- # @param [String] value_input_option
- # How the input data should be interpreted.
+ # @param [Google::Apis::SheetsV4::BatchUpdateValuesRequest] batch_update_values_request_object
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
- # @yieldparam result [Google::Apis::SheetsV4::UpdateValuesResponse] parsed result object
+ # @yieldparam result [Google::Apis::SheetsV4::BatchUpdateValuesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
- # @return [Google::Apis::SheetsV4::UpdateValuesResponse]
+ # @return [Google::Apis::SheetsV4::BatchUpdateValuesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
- def update_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, value_input_option: nil, quota_user: nil, fields: nil, options: nil, &block)
- command = make_simple_command(:put, 'v4/spreadsheets/{spreadsheetId}/values/{range}', options)
- command.request_representation = Google::Apis::SheetsV4::ValueRange::Representation
- command.request_object = value_range_object
- command.response_representation = Google::Apis::SheetsV4::UpdateValuesResponse::Representation
- command.response_class = Google::Apis::SheetsV4::UpdateValuesResponse
+ def batch_update_values(spreadsheet_id, batch_update_values_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
+ command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchUpdate', options)
+ command.request_representation = Google::Apis::SheetsV4::BatchUpdateValuesRequest::Representation
+ command.request_object = batch_update_values_request_object
+ command.response_representation = Google::Apis::SheetsV4::BatchUpdateValuesResponse::Representation
+ command.response_class = Google::Apis::SheetsV4::BatchUpdateValuesResponse
command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
- command.params['range'] = range unless range.nil?
- command.query['valueInputOption'] = value_input_option unless value_input_option.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
@@ -320,89 +349,135 @@
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
- # Returns one or more ranges of values from a spreadsheet.
- # The caller must specify the spreadsheet ID and one or more ranges.
+ # 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/guides/values#appending_values)
+ # and
+ # [sample code](/sheets/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.
# @param [String] spreadsheet_id
- # The ID of the spreadsheet to retrieve data from.
- # @param [Array<String>, String] ranges
- # The A1 notation of the values to retrieve.
- # @param [String] value_render_option
- # How values should be represented in the output.
- # @param [String] date_time_render_option
- # How dates, times, and durations should be represented in the output.
- # This is ignored if value_render_option is
- # FORMATTED_VALUE.
- # @param [String] major_dimension
- # The major dimension that results should use.
- # For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
- # then requesting `range=A1:B2,majorDimension=ROWS` will return
- # `[[1,2],[3,4]]`,
- # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return
- # `[[1,3],[2,4]]`.
+ # The ID of the spreadsheet to update.
+ # @param [String] range
+ # The A1 notation of a range to search for a logical table of data.
+ # Values will be appended after the last row of the table.
+ # @param [Google::Apis::SheetsV4::ValueRange] value_range_object
+ # @param [String] value_input_option
+ # How the input data should be interpreted.
+ # @param [String] insert_data_option
+ # How the input data should be inserted.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
- # @yieldparam result [Google::Apis::SheetsV4::BatchGetValuesResponse] parsed result object
+ # @yieldparam result [Google::Apis::SheetsV4::AppendValuesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
- # @return [Google::Apis::SheetsV4::BatchGetValuesResponse]
+ # @return [Google::Apis::SheetsV4::AppendValuesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
- 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)
- command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}/values:batchGet', options)
- command.response_representation = Google::Apis::SheetsV4::BatchGetValuesResponse::Representation
- command.response_class = Google::Apis::SheetsV4::BatchGetValuesResponse
+ def append_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, value_input_option: nil, insert_data_option: nil, quota_user: nil, fields: nil, options: nil, &block)
+ command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values/{range}:append', options)
+ command.request_representation = Google::Apis::SheetsV4::ValueRange::Representation
+ command.request_object = value_range_object
+ command.response_representation = Google::Apis::SheetsV4::AppendValuesResponse::Representation
+ command.response_class = Google::Apis::SheetsV4::AppendValuesResponse
command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
- command.query['ranges'] = ranges unless ranges.nil?
- command.query['valueRenderOption'] = value_render_option unless value_render_option.nil?
- command.query['dateTimeRenderOption'] = date_time_render_option unless date_time_render_option.nil?
- command.query['majorDimension'] = major_dimension unless major_dimension.nil?
+ command.params['range'] = range unless range.nil?
+ command.query['valueInputOption'] = value_input_option unless value_input_option.nil?
+ command.query['insertDataOption'] = insert_data_option unless insert_data_option.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end
- # Sets values in one or more ranges of a spreadsheet.
- # The caller must specify the spreadsheet ID,
- # a valueInputOption, and one or more
- # ValueRanges.
+ # Sets values in a range of a spreadsheet.
+ # The caller must specify the spreadsheet ID, range, and
+ # a valueInputOption.
# @param [String] spreadsheet_id
# The ID of the spreadsheet to update.
- # @param [Google::Apis::SheetsV4::BatchUpdateValuesRequest] batch_update_values_request_object
+ # @param [String] range
+ # The A1 notation of the values to update.
+ # @param [Google::Apis::SheetsV4::ValueRange] value_range_object
+ # @param [String] value_input_option
+ # How the input data should be interpreted.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
- # @yieldparam result [Google::Apis::SheetsV4::BatchUpdateValuesResponse] parsed result object
+ # @yieldparam result [Google::Apis::SheetsV4::UpdateValuesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
- # @return [Google::Apis::SheetsV4::BatchUpdateValuesResponse]
+ # @return [Google::Apis::SheetsV4::UpdateValuesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
- def batch_update_values(spreadsheet_id, batch_update_values_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
- command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchUpdate', options)
- command.request_representation = Google::Apis::SheetsV4::BatchUpdateValuesRequest::Representation
- command.request_object = batch_update_values_request_object
- command.response_representation = Google::Apis::SheetsV4::BatchUpdateValuesResponse::Representation
- command.response_class = Google::Apis::SheetsV4::BatchUpdateValuesResponse
+ def update_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, value_input_option: nil, quota_user: nil, fields: nil, options: nil, &block)
+ command = make_simple_command(:put, 'v4/spreadsheets/{spreadsheetId}/values/{range}', options)
+ command.request_representation = Google::Apis::SheetsV4::ValueRange::Representation
+ command.request_object = value_range_object
+ command.response_representation = Google::Apis::SheetsV4::UpdateValuesResponse::Representation
+ command.response_class = Google::Apis::SheetsV4::UpdateValuesResponse
+ command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
+ command.params['range'] = range unless range.nil?
+ command.query['valueInputOption'] = value_input_option unless value_input_option.nil?
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
+ command.query['fields'] = fields unless fields.nil?
+ execute_or_queue_command(command, &block)
+ end
+
+ # 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, data validation, etc..) are kept.
+ # @param [String] spreadsheet_id
+ # The ID of the spreadsheet to update.
+ # @param [Google::Apis::SheetsV4::BatchClearValuesRequest] batch_clear_values_request_object
+ # @param [String] quota_user
+ # Available to use for quota purposes for server-side applications. Can be any
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
+ # @param [String] fields
+ # Selector specifying which fields to include in a partial response.
+ # @param [Google::Apis::RequestOptions] options
+ # Request-specific options
+ #
+ # @yield [result, err] Result & error if block supplied
+ # @yieldparam result [Google::Apis::SheetsV4::BatchClearValuesResponse] parsed result object
+ # @yieldparam err [StandardError] error object if request failed
+ #
+ # @return [Google::Apis::SheetsV4::BatchClearValuesResponse]
+ #
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
+ def batch_clear_values(spreadsheet_id, batch_clear_values_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
+ command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchClear', options)
+ command.request_representation = Google::Apis::SheetsV4::BatchClearValuesRequest::Representation
+ command.request_object = batch_clear_values_request_object
+ command.response_representation = Google::Apis::SheetsV4::BatchClearValuesResponse::Representation
+ command.response_class = Google::Apis::SheetsV4::BatchClearValuesResponse
command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['fields'] = fields unless fields.nil?
execute_or_queue_command(command, &block)
end