algolia 3.0.0.beta.1 → 3.0.0.beta.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/Gemfile.lock +9 -7
- data/algolia.gemspec +1 -2
- data/lib/algolia/api/search_client.rb +67 -2
- data/lib/algolia/api_error.rb +2 -2
- data/lib/algolia/models/abtesting/error_base.rb +2 -6
- data/lib/algolia/models/analytics/error_base.rb +2 -6
- data/lib/algolia/models/ingestion/error_base.rb +2 -6
- data/lib/algolia/models/insights/error_base.rb +2 -6
- data/lib/algolia/models/monitoring/error_base.rb +2 -6
- data/lib/algolia/models/personalization/error_base.rb +2 -6
- data/lib/algolia/models/query-suggestions/error_base.rb +2 -6
- data/lib/algolia/models/recommend/base_search_response.rb +2 -6
- data/lib/algolia/models/recommend/error_base.rb +2 -6
- data/lib/algolia/models/recommend/facet_filters.rb +1 -1
- data/lib/algolia/models/recommend/fallback_params.rb +1 -3
- data/lib/algolia/models/recommend/numeric_filters.rb +1 -1
- data/lib/algolia/models/recommend/optional_filters.rb +1 -1
- data/lib/algolia/models/recommend/ranking_info.rb +0 -6
- data/lib/algolia/models/recommend/re_ranking_apply_filter.rb +1 -1
- data/lib/algolia/models/recommend/recommend_hit.rb +2 -6
- data/lib/algolia/models/recommend/search_params.rb +1 -3
- data/lib/algolia/models/recommend/search_params_object.rb +1 -3
- data/lib/algolia/models/recommend/tag_filters.rb +1 -1
- data/lib/algolia/models/search/base_search_response.rb +2 -6
- data/lib/algolia/models/search/browse_params_object.rb +1 -3
- data/lib/algolia/models/search/consequence_params.rb +1 -3
- data/lib/algolia/models/search/dictionary_entry.rb +2 -6
- data/lib/algolia/models/search/error_base.rb +2 -6
- data/lib/algolia/models/search/facet_filters.rb +1 -1
- data/lib/algolia/models/search/hit.rb +2 -6
- data/lib/algolia/models/search/index_settings.rb +1 -3
- data/lib/algolia/models/search/numeric_filters.rb +1 -1
- data/lib/algolia/models/search/optional_filters.rb +1 -1
- data/lib/algolia/models/search/ranking_info.rb +0 -6
- data/lib/algolia/models/search/re_ranking_apply_filter.rb +1 -1
- data/lib/algolia/models/search/replace_all_objects_response.rb +223 -0
- data/lib/algolia/models/search/search_for_facet_values_response.rb +1 -1
- data/lib/algolia/models/search/search_for_facets.rb +1 -3
- data/lib/algolia/models/search/search_for_hits.rb +1 -3
- data/lib/algolia/models/search/search_hits.rb +2 -6
- data/lib/algolia/models/search/search_params_object.rb +1 -3
- data/lib/algolia/models/search/search_response.rb +2 -6
- data/lib/algolia/models/search/search_synonyms_response.rb +2 -6
- data/lib/algolia/models/search/tag_filters.rb +1 -1
- data/lib/algolia/models/usage/error_base.rb +2 -6
- data/lib/algolia/version.rb +1 -1
- metadata +5 -7
- data/lib/algolia/models/recommend/mixed_search_filters.rb +0 -96
- data/lib/algolia/models/search/mixed_search_filters.rb +0 -96
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55b1f581a3ca4f6ef59d05989130f89559c010f4e114c749a4b9dc523bf45fa6
|
4
|
+
data.tar.gz: 8b6e80f68129c52f05c2ce91f05a93c4436831f4c3ea450be2351ad6e5c964a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 698e012f76df7596ceec8b4200bc77f4e4b889b535a9f015b1b69ad9d780c1a53cb4750ad4a4670908dc931152bdd869f80d961c4c305364cbf9ee8bac8549c2
|
7
|
+
data.tar.gz: 98c728722f3b2fdc67162b2b4cd6695dac5c1e22d5f5f6c35114ae5c7e3243d64cd43b7bc3a733b751a9acfe5f59f6fa37f228322184a107b2599df4f9ba2951
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
## [3.0.0.beta.3](https://github.com/algolia/algoliasearch-client-ruby/compare/3.0.0.beta.2...3.0.0.beta.3)
|
2
|
+
|
3
|
+
- [072c38b9a](https://github.com/algolia/api-clients-automation/commit/072c38b9a) fix(clients): remove unused models from lite clients ([#3159](https://github.com/algolia/api-clients-automation/pull/3159)) by [@shortcuts](https://github.com/shortcuts/)
|
4
|
+
- [c7f5de9d4](https://github.com/algolia/api-clients-automation/commit/c7f5de9d4) feat(clients): add waitForAppTask helper ([#3158](https://github.com/algolia/api-clients-automation/pull/3158)) by [@millotp](https://github.com/millotp/)
|
5
|
+
- [3a97fad1f](https://github.com/algolia/api-clients-automation/commit/3a97fad1f) fix(clients): chunked batch helper ([#3154](https://github.com/algolia/api-clients-automation/pull/3154)) by [@shortcuts](https://github.com/shortcuts/)
|
6
|
+
- [c251dc87e](https://github.com/algolia/api-clients-automation/commit/c251dc87e) fix(specs): rankingInfo required properties ([#3157](https://github.com/algolia/api-clients-automation/pull/3157)) by [@millotp](https://github.com/millotp/)
|
7
|
+
- [fd5a312fb](https://github.com/algolia/api-clients-automation/commit/fd5a312fb) feat(specs): add getAppTask endpoint to search ([#3156](https://github.com/algolia/api-clients-automation/pull/3156)) by [@millotp](https://github.com/millotp/)
|
8
|
+
- [cdc866549](https://github.com/algolia/api-clients-automation/commit/cdc866549) fix(specs): dont mention index api keys ([#3117](https://github.com/algolia/api-clients-automation/pull/3117)) by [@kai687](https://github.com/kai687/)
|
9
|
+
|
10
|
+
## [3.0.0.beta.2](https://github.com/algolia/algoliasearch-client-ruby/compare/3.0.0.beta.1...3.0.0.beta.2)
|
11
|
+
|
12
|
+
- [2b70d9ea5](https://github.com/algolia/api-clients-automation/commit/2b70d9ea5) fix(specs): exhaustiveFacetsCount is not deprecated for sffv ([#3089](https://github.com/algolia/api-clients-automation/pull/3089)) by [@kai687](https://github.com/kai687/)
|
13
|
+
- [1250c2b3c](https://github.com/algolia/api-clients-automation/commit/1250c2b3c) fix(specs): simplify filter types ([#3042](https://github.com/algolia/api-clients-automation/pull/3042)) by [@millotp](https://github.com/millotp/)
|
14
|
+
|
1
15
|
## [3.0.0.beta.1](https://github.com/algolia/algoliasearch-client-ruby/compare/3.0.0.beta.0...3.0.0.beta.1)
|
2
16
|
|
3
17
|
- [b621988bc](https://github.com/algolia/api-clients-automation/commit/b621988bc) feat(specs): promote @kai687 to code owner ([#3014](https://github.com/algolia/api-clients-automation/pull/3014)) by [@Fluf22](https://github.com/Fluf22/)
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
algolia (3.0.0.beta.
|
4
|
+
algolia (3.0.0.beta.3)
|
5
5
|
faraday (>= 1.0.1, < 3.0)
|
6
6
|
faraday-net_http_persistent (>= 0.15, < 3)
|
7
7
|
net-http-persistent
|
@@ -25,15 +25,16 @@ GEM
|
|
25
25
|
net-http-persistent (4.0.2)
|
26
26
|
connection_pool (~> 2.2)
|
27
27
|
parallel (1.24.0)
|
28
|
-
parser (3.3.0
|
28
|
+
parser (3.3.1.0)
|
29
29
|
ast (~> 2.4.1)
|
30
30
|
racc
|
31
31
|
racc (1.7.3)
|
32
32
|
rainbow (3.1.1)
|
33
33
|
rake (13.2.1)
|
34
|
-
regexp_parser (2.9.
|
35
|
-
rexml (3.2.
|
36
|
-
|
34
|
+
regexp_parser (2.9.1)
|
35
|
+
rexml (3.2.8)
|
36
|
+
strscan (>= 3.0.9)
|
37
|
+
rubocop (1.63.5)
|
37
38
|
json (~> 2.3)
|
38
39
|
language_server-protocol (>= 3.17.0)
|
39
40
|
parallel (~> 1.10)
|
@@ -44,9 +45,10 @@ GEM
|
|
44
45
|
rubocop-ast (>= 1.31.1, < 2.0)
|
45
46
|
ruby-progressbar (~> 1.7)
|
46
47
|
unicode-display_width (>= 2.4.0, < 3.0)
|
47
|
-
rubocop-ast (1.31.
|
48
|
-
parser (>= 3.3.0
|
48
|
+
rubocop-ast (1.31.3)
|
49
|
+
parser (>= 3.3.1.0)
|
49
50
|
ruby-progressbar (1.13.0)
|
51
|
+
strscan (3.1.0)
|
50
52
|
unicode-display_width (2.5.0)
|
51
53
|
uri (0.13.0)
|
52
54
|
|
data/algolia.gemspec
CHANGED
@@ -8,8 +8,7 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.name = 'algolia'
|
9
9
|
s.version = Algolia::VERSION
|
10
10
|
s.platform = Gem::Platform::RUBY
|
11
|
-
s.authors = ['
|
12
|
-
s.email = ['support@algolia.com']
|
11
|
+
s.authors = ['https://alg.li/support']
|
13
12
|
s.homepage = 'https://github.com/algolia/algoliasearch-client-ruby'
|
14
13
|
s.summary = 'A simple Ruby client for the algolia.com REST API'
|
15
14
|
s.description = 'A simple Ruby client for the algolia.com REST API'
|
@@ -1125,6 +1125,50 @@ module Algolia
|
|
1125
1125
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetApiKeyResponse')
|
1126
1126
|
end
|
1127
1127
|
|
1128
|
+
# Checks the status of a given application task.
|
1129
|
+
#
|
1130
|
+
# Required API Key ACLs:
|
1131
|
+
# - editSettings
|
1132
|
+
# @param task_id [Integer] Unique task identifier. (required)
|
1133
|
+
# @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)
|
1134
|
+
# @return [Http::Response] the response
|
1135
|
+
def get_app_task_with_http_info(task_id, request_options = {})
|
1136
|
+
# verify the required parameter 'task_id' is set
|
1137
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
1138
|
+
raise ArgumentError, "Parameter `task_id` is required when calling `get_app_task`."
|
1139
|
+
end
|
1140
|
+
|
1141
|
+
path = '/1/task/{taskID}'.sub('{' + 'taskID' + '}', Transport.encode_uri(task_id.to_s))
|
1142
|
+
query_params = {}
|
1143
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
1144
|
+
header_params = {}
|
1145
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
1146
|
+
|
1147
|
+
post_body = request_options[:debug_body]
|
1148
|
+
|
1149
|
+
new_options = request_options.merge(
|
1150
|
+
:operation => :'SearchClient.get_app_task',
|
1151
|
+
:header_params => header_params,
|
1152
|
+
:query_params => query_params,
|
1153
|
+
:body => post_body,
|
1154
|
+
:use_read_transporter => false
|
1155
|
+
)
|
1156
|
+
|
1157
|
+
@api_client.call_api(:GET, path, new_options)
|
1158
|
+
end
|
1159
|
+
|
1160
|
+
# Checks the status of a given application task.
|
1161
|
+
#
|
1162
|
+
# Required API Key ACLs:
|
1163
|
+
# - editSettings
|
1164
|
+
# @param task_id [Integer] Unique task identifier. (required)
|
1165
|
+
# @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)
|
1166
|
+
# @return [GetTaskResponse]
|
1167
|
+
def get_app_task(task_id, request_options = {})
|
1168
|
+
response = get_app_task_with_http_info(task_id, request_options)
|
1169
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetTaskResponse')
|
1170
|
+
end
|
1171
|
+
|
1128
1172
|
# Lists supported languages with their supported dictionary types and number of custom entries.
|
1129
1173
|
#
|
1130
1174
|
# Required API Key ACLs:
|
@@ -1918,7 +1962,7 @@ module Algolia
|
|
1918
1962
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::MultipleBatchResponse')
|
1919
1963
|
end
|
1920
1964
|
|
1921
|
-
# Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for
|
1965
|
+
# Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn't exist yet, it'll be created. **Copy** - Copying a source index that doesn't exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can't copy the `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn't exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).
|
1922
1966
|
#
|
1923
1967
|
# Required API Key ACLs:
|
1924
1968
|
# - addObject
|
@@ -1955,7 +1999,7 @@ module Algolia
|
|
1955
1999
|
@api_client.call_api(:POST, path, new_options)
|
1956
2000
|
end
|
1957
2001
|
|
1958
|
-
# Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for
|
2002
|
+
# Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn't exist yet, it'll be created. **Copy** - Copying a source index that doesn't exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can't copy the `enableReRanking`, `mode`, and `replicas` settings. - You can't copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn't exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).
|
1959
2003
|
#
|
1960
2004
|
# Required API Key ACLs:
|
1961
2005
|
# - addObject
|
@@ -2945,6 +2989,27 @@ module Algolia
|
|
2945
2989
|
raise ApiError, "The maximum number of retries exceeded. (#{max_retries})"
|
2946
2990
|
end
|
2947
2991
|
|
2992
|
+
# Helper: Wait for an application-level task to be published (completed) for a given `task_id`.
|
2993
|
+
#
|
2994
|
+
# @param task_id [Integer] the `task_id` returned in the method response. (required)
|
2995
|
+
# @param max_retries [Integer] the maximum number of retries. (optional, default to 50)
|
2996
|
+
# @param timeout [Proc] the function to decide how long to wait between retries. (optional)
|
2997
|
+
# @param request_options [Hash] the requestOptions to send along with the query, they will be forwarded to the `get_task` method.
|
2998
|
+
# @return [Http::Response] the last get_task response
|
2999
|
+
def wait_for_app_task(task_id, max_retries = 50, timeout = ->(retry_count) { [retry_count * 200, 5000].min }, request_options = {})
|
3000
|
+
retries = 0
|
3001
|
+
while retries < max_retries
|
3002
|
+
res = get_app_task(task_id, request_options)
|
3003
|
+
if res.status == 'published'
|
3004
|
+
return res
|
3005
|
+
end
|
3006
|
+
|
3007
|
+
retries += 1
|
3008
|
+
sleep(timeout.call(retries) / 1000.0)
|
3009
|
+
end
|
3010
|
+
raise ApiError, "The maximum number of retries exceeded. (#{max_retries})"
|
3011
|
+
end
|
3012
|
+
|
2948
3013
|
# Helper: Wait for an API key to be added, updated or deleted based on a given `operation`.
|
2949
3014
|
#
|
2950
3015
|
# @param operation [String] the `operation` that was done on a `key`.
|
data/lib/algolia/api_error.rb
CHANGED
@@ -14,14 +14,14 @@ module Algolia
|
|
14
14
|
if arg.key?(:message) || arg.key?('message')
|
15
15
|
super(arg[:message] || arg['message'])
|
16
16
|
else
|
17
|
-
super
|
17
|
+
super
|
18
18
|
end
|
19
19
|
|
20
20
|
arg.each do |k, v|
|
21
21
|
instance_variable_set "@#{k}", v
|
22
22
|
end
|
23
23
|
else
|
24
|
-
super
|
24
|
+
super
|
25
25
|
@message = arg
|
26
26
|
end
|
27
27
|
end
|
@@ -94,12 +94,8 @@ module Algolia
|
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
97
|
-
#
|
98
|
-
|
99
|
-
@additional_properties.each_pair do |k, v|
|
100
|
-
transformed_hash[k.to_sym] = v
|
101
|
-
end
|
102
|
-
end
|
97
|
+
# add extra attribute to transformed_hash
|
98
|
+
transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
|
103
99
|
new(transformed_hash)
|
104
100
|
end
|
105
101
|
|
@@ -94,12 +94,8 @@ module Algolia
|
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
97
|
-
#
|
98
|
-
|
99
|
-
@additional_properties.each_pair do |k, v|
|
100
|
-
transformed_hash[k.to_sym] = v
|
101
|
-
end
|
102
|
-
end
|
97
|
+
# add extra attribute to transformed_hash
|
98
|
+
transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
|
103
99
|
new(transformed_hash)
|
104
100
|
end
|
105
101
|
|
@@ -94,12 +94,8 @@ module Algolia
|
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
97
|
-
#
|
98
|
-
|
99
|
-
@additional_properties.each_pair do |k, v|
|
100
|
-
transformed_hash[k.to_sym] = v
|
101
|
-
end
|
102
|
-
end
|
97
|
+
# add extra attribute to transformed_hash
|
98
|
+
transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
|
103
99
|
new(transformed_hash)
|
104
100
|
end
|
105
101
|
|
@@ -94,12 +94,8 @@ module Algolia
|
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
97
|
-
#
|
98
|
-
|
99
|
-
@additional_properties.each_pair do |k, v|
|
100
|
-
transformed_hash[k.to_sym] = v
|
101
|
-
end
|
102
|
-
end
|
97
|
+
# add extra attribute to transformed_hash
|
98
|
+
transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
|
103
99
|
new(transformed_hash)
|
104
100
|
end
|
105
101
|
|
@@ -94,12 +94,8 @@ module Algolia
|
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
97
|
-
#
|
98
|
-
|
99
|
-
@additional_properties.each_pair do |k, v|
|
100
|
-
transformed_hash[k.to_sym] = v
|
101
|
-
end
|
102
|
-
end
|
97
|
+
# add extra attribute to transformed_hash
|
98
|
+
transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
|
103
99
|
new(transformed_hash)
|
104
100
|
end
|
105
101
|
|
@@ -94,12 +94,8 @@ module Algolia
|
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
97
|
-
#
|
98
|
-
|
99
|
-
@additional_properties.each_pair do |k, v|
|
100
|
-
transformed_hash[k.to_sym] = v
|
101
|
-
end
|
102
|
-
end
|
97
|
+
# add extra attribute to transformed_hash
|
98
|
+
transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
|
103
99
|
new(transformed_hash)
|
104
100
|
end
|
105
101
|
|
@@ -94,12 +94,8 @@ module Algolia
|
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
97
|
-
#
|
98
|
-
|
99
|
-
@additional_properties.each_pair do |k, v|
|
100
|
-
transformed_hash[k.to_sym] = v
|
101
|
-
end
|
102
|
-
end
|
97
|
+
# add extra attribute to transformed_hash
|
98
|
+
transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
|
103
99
|
new(transformed_hash)
|
104
100
|
end
|
105
101
|
|
@@ -439,12 +439,8 @@ module Algolia
|
|
439
439
|
end
|
440
440
|
end
|
441
441
|
|
442
|
-
#
|
443
|
-
|
444
|
-
@additional_properties.each_pair do |k, v|
|
445
|
-
transformed_hash[k.to_sym] = v
|
446
|
-
end
|
447
|
-
end
|
442
|
+
# add extra attribute to transformed_hash
|
443
|
+
transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
|
448
444
|
new(transformed_hash)
|
449
445
|
end
|
450
446
|
|
@@ -94,12 +94,8 @@ module Algolia
|
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
97
|
-
#
|
98
|
-
|
99
|
-
@additional_properties.each_pair do |k, v|
|
100
|
-
transformed_hash[k.to_sym] = v
|
101
|
-
end
|
102
|
-
end
|
97
|
+
# add extra attribute to transformed_hash
|
98
|
+
transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
|
103
99
|
new(transformed_hash)
|
104
100
|
end
|
105
101
|
|
@@ -111,8 +111,6 @@ module Algolia
|
|
111
111
|
|
112
112
|
if attributes.key?(:filters)
|
113
113
|
self.filters = attributes[:filters]
|
114
|
-
else
|
115
|
-
self.filters = nil
|
116
114
|
end
|
117
115
|
|
118
116
|
if attributes.key?(:first_matched_word)
|
@@ -153,8 +151,6 @@ module Algolia
|
|
153
151
|
|
154
152
|
if attributes.key?(:promoted)
|
155
153
|
self.promoted = attributes[:promoted]
|
156
|
-
else
|
157
|
-
self.promoted = nil
|
158
154
|
end
|
159
155
|
|
160
156
|
if attributes.key?(:proximity_distance)
|
@@ -169,8 +165,6 @@ module Algolia
|
|
169
165
|
|
170
166
|
if attributes.key?(:words)
|
171
167
|
self.words = attributes[:words]
|
172
|
-
else
|
173
|
-
self.words = nil
|
174
168
|
end
|
175
169
|
|
176
170
|
if attributes.key?(:promoted_by_re_ranking)
|
@@ -169,12 +169,8 @@ module Algolia
|
|
169
169
|
end
|
170
170
|
end
|
171
171
|
|
172
|
-
#
|
173
|
-
|
174
|
-
@additional_properties.each_pair do |k, v|
|
175
|
-
transformed_hash[k.to_sym] = v
|
176
|
-
end
|
177
|
-
end
|
172
|
+
# add extra attribute to transformed_hash
|
173
|
+
transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
|
178
174
|
new(transformed_hash)
|
179
175
|
end
|
180
176
|
|
@@ -439,12 +439,8 @@ module Algolia
|
|
439
439
|
end
|
440
440
|
end
|
441
441
|
|
442
|
-
#
|
443
|
-
|
444
|
-
@additional_properties.each_pair do |k, v|
|
445
|
-
transformed_hash[k.to_sym] = v
|
446
|
-
end
|
447
|
-
end
|
442
|
+
# add extra attribute to transformed_hash
|
443
|
+
transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
|
448
444
|
new(transformed_hash)
|
449
445
|
end
|
450
446
|
|
@@ -173,12 +173,8 @@ module Algolia
|
|
173
173
|
end
|
174
174
|
end
|
175
175
|
|
176
|
-
#
|
177
|
-
|
178
|
-
@additional_properties.each_pair do |k, v|
|
179
|
-
transformed_hash[k.to_sym] = v
|
180
|
-
end
|
181
|
-
end
|
176
|
+
# add extra attribute to transformed_hash
|
177
|
+
transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
|
182
178
|
new(transformed_hash)
|
183
179
|
end
|
184
180
|
|
@@ -94,12 +94,8 @@ module Algolia
|
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
97
|
-
#
|
98
|
-
|
99
|
-
@additional_properties.each_pair do |k, v|
|
100
|
-
transformed_hash[k.to_sym] = v
|
101
|
-
end
|
102
|
-
end
|
97
|
+
# add extra attribute to transformed_hash
|
98
|
+
transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
|
103
99
|
new(transformed_hash)
|
104
100
|
end
|
105
101
|
|
@@ -139,12 +139,8 @@ module Algolia
|
|
139
139
|
end
|
140
140
|
end
|
141
141
|
|
142
|
-
#
|
143
|
-
|
144
|
-
@additional_properties.each_pair do |k, v|
|
145
|
-
transformed_hash[k.to_sym] = v
|
146
|
-
end
|
147
|
-
end
|
142
|
+
# add extra attribute to transformed_hash
|
143
|
+
transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
|
148
144
|
new(transformed_hash)
|
149
145
|
end
|
150
146
|
|
@@ -111,8 +111,6 @@ module Algolia
|
|
111
111
|
|
112
112
|
if attributes.key?(:filters)
|
113
113
|
self.filters = attributes[:filters]
|
114
|
-
else
|
115
|
-
self.filters = nil
|
116
114
|
end
|
117
115
|
|
118
116
|
if attributes.key?(:first_matched_word)
|
@@ -153,8 +151,6 @@ module Algolia
|
|
153
151
|
|
154
152
|
if attributes.key?(:promoted)
|
155
153
|
self.promoted = attributes[:promoted]
|
156
|
-
else
|
157
|
-
self.promoted = nil
|
158
154
|
end
|
159
155
|
|
160
156
|
if attributes.key?(:proximity_distance)
|
@@ -169,8 +165,6 @@ module Algolia
|
|
169
165
|
|
170
166
|
if attributes.key?(:words)
|
171
167
|
self.words = attributes[:words]
|
172
|
-
else
|
173
|
-
self.words = nil
|
174
168
|
end
|
175
169
|
|
176
170
|
if attributes.key?(:promoted_by_re_ranking)
|