Skip to content

Commit 930639b

Browse files
algolia-botmillotp
andcommitted
chore: generated code for commit 586e13a. [skip ci]
Co-authored-by: Pierre Millot <[email protected]>
1 parent 586e13a commit 930639b

File tree

619 files changed

+26182
-17639
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

619 files changed

+26182
-17639
lines changed

clients/algoliasearch-client-ruby/Gemfile.lock

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ PATH
99
GEM
1010
remote: https://rubygems.org/
1111
specs:
12-
ast (2.4.2)
1312
connection_pool (2.4.1)
1413
faraday (2.9.0)
1514
faraday-net_http (>= 2.0, < 3.2)
@@ -18,38 +17,11 @@ GEM
1817
faraday-net_http_persistent (2.1.0)
1918
faraday (~> 2.5)
2019
net-http-persistent (~> 4.0)
21-
json (2.7.2)
22-
language_server-protocol (3.17.0.3)
2320
net-http (0.4.1)
2421
uri
2522
net-http-persistent (4.0.2)
2623
connection_pool (~> 2.2)
27-
parallel (1.24.0)
28-
parser (3.3.1.0)
29-
ast (~> 2.4.1)
30-
racc
31-
racc (1.7.3)
32-
rainbow (3.1.1)
3324
rake (13.2.1)
34-
regexp_parser (2.9.1)
35-
rexml (3.2.8)
36-
strscan (>= 3.0.9)
37-
rubocop (1.63.5)
38-
json (~> 2.3)
39-
language_server-protocol (>= 3.17.0)
40-
parallel (~> 1.10)
41-
parser (>= 3.3.0.2)
42-
rainbow (>= 2.2.2, < 4.0)
43-
regexp_parser (>= 1.8, < 3.0)
44-
rexml (>= 3.2.5, < 4.0)
45-
rubocop-ast (>= 1.31.1, < 2.0)
46-
ruby-progressbar (~> 1.7)
47-
unicode-display_width (>= 2.4.0, < 3.0)
48-
rubocop-ast (1.31.3)
49-
parser (>= 3.3.1.0)
50-
ruby-progressbar (1.13.0)
51-
strscan (3.1.0)
52-
unicode-display_width (2.5.0)
5325
uri (0.13.0)
5426

5527
PLATFORMS
@@ -60,7 +32,6 @@ DEPENDENCIES
6032
algolia!
6133
bundler
6234
rake
63-
rubocop
6435

6536
BUNDLED WITH
6637
2.4.10

clients/algoliasearch-client-ruby/lib/algolia.rb

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
# Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
44

55
# Common files
6-
require 'algolia/api_client'
7-
require 'algolia/api_error'
8-
require 'algolia/error'
9-
require 'algolia/version'
10-
require 'algolia/configuration'
11-
require 'algolia/user_agent'
12-
require 'algolia/logger_helper'
13-
require 'algolia/transport/http/http_requester'
14-
require 'algolia/transport/http/response'
15-
require 'algolia/transport/echo_requester'
16-
require 'algolia/transport/call_type'
17-
require 'algolia/transport/retry_outcome_type'
18-
require 'algolia/transport/stateful_host'
19-
require 'algolia/transport/retry_strategy'
20-
require 'algolia/transport/request_options'
21-
require 'algolia/transport/transport'
6+
require "algolia/api_client"
7+
require "algolia/api_error"
8+
require "algolia/error"
9+
require "algolia/version"
10+
require "algolia/configuration"
11+
require "algolia/user_agent"
12+
require "algolia/logger_helper"
13+
require "algolia/transport/http/http_requester"
14+
require "algolia/transport/http/response"
15+
require "algolia/transport/echo_requester"
16+
require "algolia/transport/call_type"
17+
require "algolia/transport/retry_outcome_type"
18+
require "algolia/transport/stateful_host"
19+
require "algolia/transport/retry_strategy"
20+
require "algolia/transport/request_options"
21+
require "algolia/transport/transport"
2222

2323
# Models
2424
Dir["#{File.dirname(__FILE__)}/algolia/models/**/*.rb"].sort.each { |file| require file }

clients/algoliasearch-client-ruby/lib/algolia/api/abtesting_client.rb

Lines changed: 52 additions & 37 deletions
Large diffs are not rendered by default.

clients/algoliasearch-client-ruby/lib/algolia/api/analytics_client.rb

Lines changed: 415 additions & 116 deletions
Large diffs are not rendered by default.

clients/algoliasearch-client-ruby/lib/algolia/api/ingestion_client.rb

Lines changed: 462 additions & 182 deletions
Large diffs are not rendered by default.

clients/algoliasearch-client-ruby/lib/algolia/api/insights_client.rb

Lines changed: 45 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,33 @@ class InsightsClient
55
attr_accessor :api_client
66

77
def initialize(config = nil)
8-
raise '`config` is missing.' if config.nil?
9-
raise '`app_id` is missing.' if config.app_id.nil? || config.app_id == ''
10-
raise '`api_key` is missing.' if config.api_key.nil? || config.api_key == ''
8+
raise "`config` is missing." if config.nil?
9+
raise "`app_id` is missing." if config.app_id.nil? || config.app_id == ""
10+
raise "`api_key` is missing." if config.api_key.nil? || config.api_key == ""
1111

1212
@api_client = Algolia::ApiClient.new(config)
1313
end
1414

1515
def self.create(app_id, api_key, region = nil, opts = {})
1616
hosts = []
17-
regions = ['de', 'us']
17+
regions = ["de", "us"]
1818

1919
if region.is_a?(Hash) && (opts.nil? || opts.empty?)
2020
opts = region
2121
region = nil
2222
end
2323

24-
raise "`region` must be one of the following: #{regions.join(', ')}" if !region.nil? && (!region.is_a?(String) || !regions.include?(region))
24+
if !region.nil? && (!region.is_a?(String) || !regions.include?(region))
25+
raise "`region` must be one of the following: #{regions.join(", ")}"
26+
end
2527

26-
hosts << Transport::StatefulHost.new(region.nil? ? 'insights.algolia.io' : 'insights.{region}.algolia.io'.sub!('{region}', region), accept: CallType::READ | CallType::WRITE)
28+
hosts <<
29+
Transport::StatefulHost.new(
30+
region.nil? ? "insights.algolia.io" : "insights.{region}.algolia.io".sub!("{region}", region),
31+
accept: CallType::READ | CallType::WRITE
32+
)
2733

28-
config = Algolia::Configuration.new(app_id, api_key, hosts, 'Insights', opts)
34+
config = Algolia::Configuration.new(app_id, api_key, hosts, "Insights", opts)
2935
create_with_config(config)
3036
end
3137

@@ -45,7 +51,7 @@ def custom_delete_with_http_info(path, parameters = nil, request_options = {})
4551
raise ArgumentError, "Parameter `path` is required when calling `custom_delete`."
4652
end
4753

48-
path = '/{path}'.sub('{' + 'path' + '}', path.to_s)
54+
path = "/{path}".sub("{" + "path" + "}", path.to_s)
4955
query_params = {}
5056
query_params = query_params.merge(parameters) unless parameters.nil?
5157
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -55,7 +61,7 @@ def custom_delete_with_http_info(path, parameters = nil, request_options = {})
5561
post_body = request_options[:debug_body]
5662

5763
new_options = request_options.merge(
58-
:operation => :'InsightsClient.custom_delete',
64+
:operation => :"InsightsClient.custom_delete",
5965
:header_params => header_params,
6066
:query_params => query_params,
6167
:body => post_body,
@@ -73,7 +79,7 @@ def custom_delete_with_http_info(path, parameters = nil, request_options = {})
7379
# @return [Object]
7480
def custom_delete(path, parameters = nil, request_options = {})
7581
response = custom_delete_with_http_info(path, parameters, request_options)
76-
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
82+
@api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
7783
end
7884

7985
# This method allow you to send requests to the Algolia REST API.
@@ -88,7 +94,7 @@ def custom_get_with_http_info(path, parameters = nil, request_options = {})
8894
raise ArgumentError, "Parameter `path` is required when calling `custom_get`."
8995
end
9096

91-
path = '/{path}'.sub('{' + 'path' + '}', path.to_s)
97+
path = "/{path}".sub("{" + "path" + "}", path.to_s)
9298
query_params = {}
9399
query_params = query_params.merge(parameters) unless parameters.nil?
94100
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -98,7 +104,7 @@ def custom_get_with_http_info(path, parameters = nil, request_options = {})
98104
post_body = request_options[:debug_body]
99105

100106
new_options = request_options.merge(
101-
:operation => :'InsightsClient.custom_get',
107+
:operation => :"InsightsClient.custom_get",
102108
:header_params => header_params,
103109
:query_params => query_params,
104110
:body => post_body,
@@ -116,7 +122,7 @@ def custom_get_with_http_info(path, parameters = nil, request_options = {})
116122
# @return [Object]
117123
def custom_get(path, parameters = nil, request_options = {})
118124
response = custom_get_with_http_info(path, parameters, request_options)
119-
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
125+
@api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
120126
end
121127

122128
# This method allow you to send requests to the Algolia REST API.
@@ -132,7 +138,7 @@ def custom_post_with_http_info(path, parameters = nil, body = nil, request_optio
132138
raise ArgumentError, "Parameter `path` is required when calling `custom_post`."
133139
end
134140

135-
path = '/{path}'.sub('{' + 'path' + '}', path.to_s)
141+
path = "/{path}".sub("{" + "path" + "}", path.to_s)
136142
query_params = {}
137143
query_params = query_params.merge(parameters) unless parameters.nil?
138144
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -142,7 +148,7 @@ def custom_post_with_http_info(path, parameters = nil, body = nil, request_optio
142148
post_body = request_options[:debug_body] || @api_client.object_to_http_body(body)
143149

144150
new_options = request_options.merge(
145-
:operation => :'InsightsClient.custom_post',
151+
:operation => :"InsightsClient.custom_post",
146152
:header_params => header_params,
147153
:query_params => query_params,
148154
:body => post_body,
@@ -161,7 +167,7 @@ def custom_post_with_http_info(path, parameters = nil, body = nil, request_optio
161167
# @return [Object]
162168
def custom_post(path, parameters = nil, body = nil, request_options = {})
163169
response = custom_post_with_http_info(path, parameters, body, request_options)
164-
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
170+
@api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
165171
end
166172

167173
# This method allow you to send requests to the Algolia REST API.
@@ -177,7 +183,7 @@ def custom_put_with_http_info(path, parameters = nil, body = nil, request_option
177183
raise ArgumentError, "Parameter `path` is required when calling `custom_put`."
178184
end
179185

180-
path = '/{path}'.sub('{' + 'path' + '}', path.to_s)
186+
path = "/{path}".sub("{" + "path" + "}", path.to_s)
181187
query_params = {}
182188
query_params = query_params.merge(parameters) unless parameters.nil?
183189
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -187,7 +193,7 @@ def custom_put_with_http_info(path, parameters = nil, body = nil, request_option
187193
post_body = request_options[:debug_body] || @api_client.object_to_http_body(body)
188194

189195
new_options = request_options.merge(
190-
:operation => :'InsightsClient.custom_put',
196+
:operation => :"InsightsClient.custom_put",
191197
:header_params => header_params,
192198
:query_params => query_params,
193199
:body => post_body,
@@ -206,7 +212,7 @@ def custom_put_with_http_info(path, parameters = nil, body = nil, request_option
206212
# @return [Object]
207213
def custom_put(path, parameters = nil, body = nil, request_options = {})
208214
response = custom_put_with_http_info(path, parameters, body, request_options)
209-
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
215+
@api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
210216
end
211217

212218
# Deletes all events related to the specified user token from events metrics and analytics. To delete a personalization user profile, see [Delete a user profile](/specs/personalization#tag/profiles/operation/deleteUserProfile).
@@ -219,20 +225,30 @@ def delete_user_token_with_http_info(user_token, request_options = {})
219225
if @api_client.config.client_side_validation && user_token.nil?
220226
raise ArgumentError, "Parameter `user_token` is required when calling `delete_user_token`."
221227
end
228+
222229
if @api_client.config.client_side_validation && user_token.to_s.length > 129
223-
raise ArgumentError, 'invalid value for "user_token" when calling InsightsClient.delete_user_token, the character length must be smaller than or equal to 129.'
230+
raise(
231+
ArgumentError,
232+
"invalid value for \"user_token\" when calling InsightsClient.delete_user_token, the character length must be smaller than or equal to 129."
233+
)
224234
end
225235

226236
if @api_client.config.client_side_validation && user_token.to_s.length < 1
227-
raise ArgumentError, 'invalid value for "user_token" when calling InsightsClient.delete_user_token, the character length must be great than or equal to 1.'
237+
raise(
238+
ArgumentError,
239+
"invalid value for \"user_token\" when calling InsightsClient.delete_user_token, the character length must be great than or equal to 1."
240+
)
228241
end
229242

230-
pattern = %r{[a-zA-Z0-9_=/+-]{1,129}}
243+
pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
231244
if @api_client.config.client_side_validation && user_token !~ pattern
232-
raise ArgumentError, "invalid value for 'user_token' when calling InsightsClient.delete_user_token, must conform to the pattern #{pattern}."
245+
raise(
246+
ArgumentError,
247+
"invalid value for 'user_token' when calling InsightsClient.delete_user_token, must conform to the pattern #{pattern}."
248+
)
233249
end
234250

235-
path = '/1/usertokens/{userToken}'.sub('{' + 'userToken' + '}', Transport.encode_uri(user_token.to_s))
251+
path = "/1/usertokens/{userToken}".sub("{" + "userToken" + "}", Transport.encode_uri(user_token.to_s))
236252
query_params = {}
237253
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
238254
header_params = {}
@@ -241,7 +257,7 @@ def delete_user_token_with_http_info(user_token, request_options = {})
241257
post_body = request_options[:debug_body]
242258

243259
new_options = request_options.merge(
244-
:operation => :'InsightsClient.delete_user_token',
260+
:operation => :"InsightsClient.delete_user_token",
245261
:header_params => header_params,
246262
:query_params => query_params,
247263
:body => post_body,
@@ -272,7 +288,7 @@ def push_events_with_http_info(insights_events, request_options = {})
272288
raise ArgumentError, "Parameter `insights_events` is required when calling `push_events`."
273289
end
274290

275-
path = '/1/events'
291+
path = "/1/events"
276292
query_params = {}
277293
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
278294
header_params = {}
@@ -281,7 +297,7 @@ def push_events_with_http_info(insights_events, request_options = {})
281297
post_body = request_options[:debug_body] || @api_client.object_to_http_body(insights_events)
282298

283299
new_options = request_options.merge(
284-
:operation => :'InsightsClient.push_events',
300+
:operation => :"InsightsClient.push_events",
285301
:header_params => header_params,
286302
:query_params => query_params,
287303
:body => post_body,
@@ -298,7 +314,8 @@ def push_events_with_http_info(insights_events, request_options = {})
298314
# @return [EventsResponse]
299315
def push_events(insights_events, request_options = {})
300316
response = push_events_with_http_info(insights_events, request_options)
301-
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Insights::EventsResponse')
317+
@api_client.deserialize(response.body, request_options[:debug_return_type] || "Insights::EventsResponse")
302318
end
319+
303320
end
304321
end

0 commit comments

Comments
 (0)