lib/algolia/api/query_suggestions_client.rb in algolia-3.0.0.alpha.6 vs lib/algolia/api/query_suggestions_client.rb in algolia-3.0.0.alpha.7
- old
+ new
@@ -31,12 +31,14 @@
def self.create_with_config(config)
new(config)
end
- # Create a configuration.
# Create a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.
+ #
+ # Required API Key ACLs:
+ # - editSettings
# @param query_suggestions_configuration_with_index [QuerySuggestionsConfigurationWithIndex] (required)
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [Http::Response] the response
def create_config_with_http_info(query_suggestions_configuration_with_index, request_options = {})
# verify the required parameter 'query_suggestions_configuration_with_index' is set
@@ -61,22 +63,24 @@
)
@api_client.call_api(:POST, path, new_options)
end
- # Create a configuration.
# Create a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.
+ #
+ # Required API Key ACLs:
+ # - editSettings
# @param query_suggestions_configuration_with_index [QuerySuggestionsConfigurationWithIndex] (required)
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [BaseResponse]
def create_config(query_suggestions_configuration_with_index, request_options = {})
response = create_config_with_http_info(query_suggestions_configuration_with_index, request_options)
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'QuerySuggestions::BaseResponse')
end
- # Send requests to the Algolia REST API.
# This method allow you to send requests to the Algolia REST API.
+
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [Http::Response] the response
def custom_delete_with_http_info(path, parameters = nil, request_options = {})
@@ -103,23 +107,23 @@
)
@api_client.call_api(:DELETE, path, new_options)
end
- # Send requests to the Algolia REST API.
# This method allow you to send requests to the Algolia REST API.
+
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [Object]
def custom_delete(path, parameters = nil, request_options = {})
response = custom_delete_with_http_info(path, parameters, request_options)
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
end
- # Send requests to the Algolia REST API.
# This method allow you to send requests to the Algolia REST API.
+
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [Http::Response] the response
def custom_get_with_http_info(path, parameters = nil, request_options = {})
@@ -146,23 +150,23 @@
)
@api_client.call_api(:GET, path, new_options)
end
- # Send requests to the Algolia REST API.
# This method allow you to send requests to the Algolia REST API.
+
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [Object]
def custom_get(path, parameters = nil, request_options = {})
response = custom_get_with_http_info(path, parameters, request_options)
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
end
- # Send requests to the Algolia REST API.
# This method allow you to send requests to the Algolia REST API.
+
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
# @param body [Object] Parameters to send with the custom request.
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [Http::Response] the response
@@ -190,24 +194,24 @@
)
@api_client.call_api(:POST, path, new_options)
end
- # Send requests to the Algolia REST API.
# This method allow you to send requests to the Algolia REST API.
+
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
# @param body [Object] Parameters to send with the custom request.
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [Object]
def custom_post(path, parameters = nil, body = nil, request_options = {})
response = custom_post_with_http_info(path, parameters, body, request_options)
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
end
- # Send requests to the Algolia REST API.
# This method allow you to send requests to the Algolia REST API.
+
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
# @param body [Object] Parameters to send with the custom request.
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [Http::Response] the response
@@ -235,34 +239,36 @@
)
@api_client.call_api(:PUT, path, new_options)
end
- # Send requests to the Algolia REST API.
# This method allow you to send requests to the Algolia REST API.
+
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
# @param body [Object] Parameters to send with the custom request.
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [Object]
def custom_put(path, parameters = nil, body = nil, request_options = {})
response = custom_put_with_http_info(path, parameters, body, request_options)
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
end
- # Delete a configuration.
# Delete a Query Suggestions configuration. Deleting only removes the configuration and stops updates to the Query Suggestions index. The Query Suggestions index itself is not deleted.
+ #
+ # Required API Key ACLs:
+ # - editSettings
# @param index_name [String] Query Suggestions index name. (required)
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [Http::Response] the response
def delete_config_with_http_info(index_name, request_options = {})
# verify the required parameter 'index_name' is set
if @api_client.config.client_side_validation && index_name.nil?
raise ArgumentError, "Parameter `index_name` is required when calling `delete_config`."
end
- path = '/1/configs/{indexName}'.sub('{' + 'indexName' + '}', @api_client.encode_uri(index_name.to_s))
+ path = '/1/configs/{indexName}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
query_params = {}
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
header_params = {}
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
@@ -277,22 +283,26 @@
)
@api_client.call_api(:DELETE, path, new_options)
end
- # Delete a configuration.
# Delete a Query Suggestions configuration. Deleting only removes the configuration and stops updates to the Query Suggestions index. The Query Suggestions index itself is not deleted.
+ #
+ # Required API Key ACLs:
+ # - editSettings
# @param index_name [String] Query Suggestions index name. (required)
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [BaseResponse]
def delete_config(index_name, request_options = {})
response = delete_config_with_http_info(index_name, request_options)
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'QuerySuggestions::BaseResponse')
end
- # List configurations.
# List all Query Suggestions configurations of your Algolia application.
+ #
+ # Required API Key ACLs:
+ # - settings
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [Http::Response] the response
def get_all_configs_with_http_info(request_options = {})
path = '/1/configs'
query_params = {}
@@ -311,31 +321,35 @@
)
@api_client.call_api(:GET, path, new_options)
end
- # List configurations.
# List all Query Suggestions configurations of your Algolia application.
+ #
+ # Required API Key ACLs:
+ # - settings
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [Array<QuerySuggestionsConfigurationResponse>]
def get_all_configs(request_options = {})
response = get_all_configs_with_http_info(request_options)
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Array<QuerySuggestions::QuerySuggestionsConfigurationResponse>')
end
- # Get a configuration.
# Get a single Query Suggestions configuration.
+ #
+ # Required API Key ACLs:
+ # - settings
# @param index_name [String] Query Suggestions index name. (required)
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [Http::Response] the response
def get_config_with_http_info(index_name, request_options = {})
# verify the required parameter 'index_name' is set
if @api_client.config.client_side_validation && index_name.nil?
raise ArgumentError, "Parameter `index_name` is required when calling `get_config`."
end
- path = '/1/configs/{indexName}'.sub('{' + 'indexName' + '}', @api_client.encode_uri(index_name.to_s))
+ path = '/1/configs/{indexName}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
query_params = {}
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
header_params = {}
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
@@ -350,32 +364,36 @@
)
@api_client.call_api(:GET, path, new_options)
end
- # Get a configuration.
# Get a single Query Suggestions configuration.
+ #
+ # Required API Key ACLs:
+ # - settings
# @param index_name [String] Query Suggestions index name. (required)
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [QuerySuggestionsConfigurationResponse]
def get_config(index_name, request_options = {})
response = get_config_with_http_info(index_name, request_options)
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'QuerySuggestions::QuerySuggestionsConfigurationResponse')
end
- # Get configuration status.
# Report the status of a Query Suggestions index.
+ #
+ # Required API Key ACLs:
+ # - settings
# @param index_name [String] Query Suggestions index name. (required)
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [Http::Response] the response
def get_config_status_with_http_info(index_name, request_options = {})
# verify the required parameter 'index_name' is set
if @api_client.config.client_side_validation && index_name.nil?
raise ArgumentError, "Parameter `index_name` is required when calling `get_config_status`."
end
- path = '/1/configs/{indexName}/status'.sub('{' + 'indexName' + '}', @api_client.encode_uri(index_name.to_s))
+ path = '/1/configs/{indexName}/status'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
query_params = {}
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
header_params = {}
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
@@ -390,32 +408,36 @@
)
@api_client.call_api(:GET, path, new_options)
end
- # Get configuration status.
# Report the status of a Query Suggestions index.
+ #
+ # Required API Key ACLs:
+ # - settings
# @param index_name [String] Query Suggestions index name. (required)
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [GetConfigStatus200Response]
def get_config_status(index_name, request_options = {})
response = get_config_status_with_http_info(index_name, request_options)
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'QuerySuggestions::GetConfigStatus200Response')
end
- # Get logs.
# Get the logs for a single Query Suggestions index.
+ #
+ # Required API Key ACLs:
+ # - settings
# @param index_name [String] Query Suggestions index name. (required)
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [Http::Response] the response
def get_log_file_with_http_info(index_name, request_options = {})
# verify the required parameter 'index_name' is set
if @api_client.config.client_side_validation && index_name.nil?
raise ArgumentError, "Parameter `index_name` is required when calling `get_log_file`."
end
- path = '/1/logs/{indexName}'.sub('{' + 'indexName' + '}', @api_client.encode_uri(index_name.to_s))
+ path = '/1/logs/{indexName}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
query_params = {}
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
header_params = {}
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
@@ -430,22 +452,26 @@
)
@api_client.call_api(:GET, path, new_options)
end
- # Get logs.
# Get the logs for a single Query Suggestions index.
+ #
+ # Required API Key ACLs:
+ # - settings
# @param index_name [String] Query Suggestions index name. (required)
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [GetLogFile200Response]
def get_log_file(index_name, request_options = {})
response = get_log_file_with_http_info(index_name, request_options)
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'QuerySuggestions::GetLogFile200Response')
end
- # Update a configuration.
# Update a QuerySuggestions configuration.
+ #
+ # Required API Key ACLs:
+ # - editSettings
# @param index_name [String] Query Suggestions index name. (required)
# @param query_suggestions_configuration [QuerySuggestionsConfiguration] (required)
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [Http::Response] the response
def update_config_with_http_info(index_name, query_suggestions_configuration, request_options = {})
@@ -456,11 +482,11 @@
# verify the required parameter 'query_suggestions_configuration' is set
if @api_client.config.client_side_validation && query_suggestions_configuration.nil?
raise ArgumentError, "Parameter `query_suggestions_configuration` is required when calling `update_config`."
end
- path = '/1/configs/{indexName}'.sub('{' + 'indexName' + '}', @api_client.encode_uri(index_name.to_s))
+ path = '/1/configs/{indexName}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
query_params = {}
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
header_params = {}
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
@@ -475,11 +501,13 @@
)
@api_client.call_api(:PUT, path, new_options)
end
- # Update a configuration.
# Update a QuerySuggestions configuration.
+ #
+ # Required API Key ACLs:
+ # - editSettings
# @param index_name [String] Query Suggestions index name. (required)
# @param query_suggestions_configuration [QuerySuggestionsConfiguration] (required)
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
# @return [BaseResponse]
def update_config(index_name, query_suggestions_configuration, request_options = {})