generated/google/apis/sheets_v4/service.rb in google-api-client-0.10.0 vs generated/google/apis/sheets_v4/service.rb in google-api-client-0.10.1

- old
+ new

@@ -31,19 +31,19 @@ # service = Sheets::SheetsService.new # # @see https://developers.google.com/sheets/ class SheetsService < Google::Apis::Core::BaseService # @return [String] - # API key. Your API key identifies your project and provides you with API access, - # quota, and reports. Required unless you provide an OAuth 2.0 token. - attr_accessor :key - - # @return [String] # 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. attr_accessor :quota_user + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + def initialize super('https://sheets.googleapis.com/', '') end # Returns the spreadsheet at the given ID. @@ -180,25 +180,25 @@ # The caller must specify the spreadsheet ID and a range. # @param [String] spreadsheet_id # The ID of the spreadsheet to retrieve data from. # @param [String] range # The A1 notation of the values to retrieve. + # @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] value_render_option # How values should be represented in the output. # The default render option is ValueRenderOption.FORMATTED_VALUE. # @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. # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. - # @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. @@ -212,19 +212,19 @@ # @return [Google::Apis::SheetsV4::ValueRange] # # @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 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) + def get_spreadsheet_values(spreadsheet_id, range, major_dimension: nil, value_render_option: nil, date_time_render_option: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}/values/{range}', options) command.response_representation = Google::Apis::SheetsV4::ValueRange::Representation command.response_class = Google::Apis::SheetsV4::ValueRange command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? command.params['range'] = range unless range.nil? + command.query['majorDimension'] = major_dimension unless major_dimension.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 @@ -234,27 +234,27 @@ # @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 [Boolean] include_values_in_response - # 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 than the range actually written, - # the response will include all values in the requested range (excluding - # trailing empty rows and columns). # @param [String] response_value_render_option # Determines how values in the response should be rendered. # The default render option is ValueRenderOption.FORMATTED_VALUE. # @param [String] value_input_option # How the input data should be interpreted. # @param [String] response_date_time_render_option # 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 [DateTimeRenderOption.SERIAL_NUMBER]. + # @param [Boolean] include_values_in_response + # 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 than the range actually written, + # the response will include all values in the requested range (excluding + # trailing empty rows and columns). # @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. @@ -268,22 +268,22 @@ # @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 update_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, include_values_in_response: nil, response_value_render_option: nil, value_input_option: nil, response_date_time_render_option: nil, quota_user: nil, fields: nil, options: nil, &block) + 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) 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['includeValuesInResponse'] = include_values_in_response unless include_values_in_response.nil? command.query['responseValueRenderOption'] = response_value_render_option unless response_value_render_option.nil? command.query['valueInputOption'] = value_input_option unless value_input_option.nil? command.query['responseDateTimeRenderOption'] = response_date_time_render_option unless response_date_time_render_option.nil? + command.query['includeValuesInResponse'] = include_values_in_response unless include_values_in_response.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -416,13 +416,13 @@ # 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) + # [guide](/sheets/api/guides/values#appending_values) # and - # [sample code](/sheets/samples/writing#append_values) + # [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 @@ -431,14 +431,10 @@ # 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 [Boolean] include_values_in_response - # Determines if the update response should include the values - # of the cells that were appended. By default, responses - # do not include the updated values. # @param [String] response_value_render_option # Determines how values in the response should be rendered. # The default render option is ValueRenderOption.FORMATTED_VALUE. # @param [String] insert_data_option # How the input data should be inserted. @@ -447,10 +443,14 @@ # @param [String] response_date_time_render_option # 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 [DateTimeRenderOption.SERIAL_NUMBER]. + # @param [Boolean] include_values_in_response + # Determines if the update response should include the values + # of the cells that were appended. By default, responses + # do not include the updated values. # @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. @@ -464,23 +464,23 @@ # @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 append_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, include_values_in_response: nil, response_value_render_option: nil, insert_data_option: nil, value_input_option: nil, response_date_time_render_option: nil, quota_user: nil, fields: nil, options: nil, &block) + def append_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, response_value_render_option: nil, insert_data_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) 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.params['range'] = range unless range.nil? - command.query['includeValuesInResponse'] = include_values_in_response unless include_values_in_response.nil? command.query['responseValueRenderOption'] = response_value_render_option unless response_value_render_option.nil? command.query['insertDataOption'] = insert_data_option unless insert_data_option.nil? command.query['valueInputOption'] = value_input_option unless value_input_option.nil? command.query['responseDateTimeRenderOption'] = response_date_time_render_option unless response_date_time_render_option.nil? + command.query['includeValuesInResponse'] = include_values_in_response unless include_values_in_response.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -558,11 +558,11 @@ end protected def apply_command_defaults(command) - command.query['key'] = key unless key.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['key'] = key unless key.nil? end end end end end