algolia 3.2.4 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/issue.yml +1 -1
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +1 -1
- data/lib/algolia/api/abtesting_client.rb +8 -0
- data/lib/algolia/api/analytics_client.rb +8 -0
- data/lib/algolia/api/ingestion_client.rb +8 -0
- data/lib/algolia/api/insights_client.rb +8 -0
- data/lib/algolia/api/monitoring_client.rb +8 -0
- data/lib/algolia/api/personalization_client.rb +8 -0
- data/lib/algolia/api/query_suggestions_client.rb +8 -0
- data/lib/algolia/api/recommend_client.rb +8 -0
- data/lib/algolia/api/search_client.rb +20 -0
- data/lib/algolia/api/usage_client.rb +8 -0
- data/lib/algolia/api_client.rb +4 -0
- data/lib/algolia/configuration.rb +5 -0
- data/lib/algolia/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1a84f43853e0a3c466d7971914aa53e83f0e810f5c1ca1679d7b6d18e3424f9
|
4
|
+
data.tar.gz: 682e034e5401f005d65bd0bdc5585787069759dae9a58f579c343346c6992387
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd10a9f1f46127786c68a0de24ff0d016c15647b9cfbb94a627905eb7702dd59130a18e2ccfdfdf95b4f363eff555bc0e28836a47fb6d9df9449e1de0728733a
|
7
|
+
data.tar.gz: 5b32ece4710592b5a28f87031de3eaae1e1c11e5449e13a79882b90268fd7f6c3fcf4588d57c0a4f301edf96c3887f1d0ddcba3b382b663098117e0f223460a2
|
data/.github/workflows/issue.yml
CHANGED
@@ -31,7 +31,7 @@ jobs:
|
|
31
31
|
},
|
32
32
|
body: JSON.stringify({
|
33
33
|
fields: {
|
34
|
-
description: `Issue created by ${context.actor} at
|
34
|
+
description: `Issue created by ${context.actor} at ${context.payload.issue.html_url} \n\n${body}`,
|
35
35
|
issuetype: {
|
36
36
|
id: '10001'
|
37
37
|
},
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## [3.3.0](https://github.com/algolia/algoliasearch-client-ruby/compare/3.2.4...3.3.0)
|
2
|
+
|
3
|
+
- [2c65a8d11](https://github.com/algolia/api-clients-automation/commit/2c65a8d11) feat(clients): helper to switch API key in use ([#3616](https://github.com/algolia/api-clients-automation/pull/3616)) by [@Fluf22](https://github.com/Fluf22/)
|
4
|
+
- [f126366dc](https://github.com/algolia/api-clients-automation/commit/f126366dc) fix(specs): note on Analytics API server ([#3650](https://github.com/algolia/api-clients-automation/pull/3650)) by [@kai687](https://github.com/kai687/)
|
5
|
+
- [3d02b3164](https://github.com/algolia/api-clients-automation/commit/3d02b3164) feat(clients): add helper to check if an index exists ([#3646](https://github.com/algolia/api-clients-automation/pull/3646)) by [@millotp](https://github.com/millotp/)
|
6
|
+
- [a36746d65](https://github.com/algolia/api-clients-automation/commit/a36746d65) fix(specs): note on insights API server ([#3649](https://github.com/algolia/api-clients-automation/pull/3649)) by [@kai687](https://github.com/kai687/)
|
7
|
+
- [1f53716c6](https://github.com/algolia/api-clients-automation/commit/1f53716c6) fix(specs): don't extend $ref objects ([#3623](https://github.com/algolia/api-clients-automation/pull/3623)) by [@kai687](https://github.com/kai687/)
|
8
|
+
|
1
9
|
## [3.2.4](https://github.com/algolia/algoliasearch-client-ruby/compare/3.2.3...3.2.4)
|
2
10
|
|
3
11
|
- [a9405b168](https://github.com/algolia/api-clients-automation/commit/a9405b168) fix(specs): usage api ([#3624](https://github.com/algolia/api-clients-automation/pull/3624)) by [@kai687](https://github.com/kai687/)
|
data/Gemfile.lock
CHANGED
@@ -39,6 +39,14 @@ module Algolia
|
|
39
39
|
new(config)
|
40
40
|
end
|
41
41
|
|
42
|
+
# Helper method to switch the API key used to authenticate the requests.
|
43
|
+
#
|
44
|
+
# @param api_key [String] the new API key to use.
|
45
|
+
# @return [void]
|
46
|
+
def set_client_api_key(api_key)
|
47
|
+
@api_client.set_client_api_key(api_key)
|
48
|
+
end
|
49
|
+
|
42
50
|
# Creates a new A/B test.
|
43
51
|
#
|
44
52
|
# Required API Key ACLs:
|
@@ -39,6 +39,14 @@ module Algolia
|
|
39
39
|
new(config)
|
40
40
|
end
|
41
41
|
|
42
|
+
# Helper method to switch the API key used to authenticate the requests.
|
43
|
+
#
|
44
|
+
# @param api_key [String] the new API key to use.
|
45
|
+
# @return [void]
|
46
|
+
def set_client_api_key(api_key)
|
47
|
+
@api_client.set_client_api_key(api_key)
|
48
|
+
end
|
49
|
+
|
42
50
|
# This method allow you to send requests to the Algolia REST API.
|
43
51
|
|
44
52
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
@@ -39,6 +39,14 @@ module Algolia
|
|
39
39
|
new(config)
|
40
40
|
end
|
41
41
|
|
42
|
+
# Helper method to switch the API key used to authenticate the requests.
|
43
|
+
#
|
44
|
+
# @param api_key [String] the new API key to use.
|
45
|
+
# @return [void]
|
46
|
+
def set_client_api_key(api_key)
|
47
|
+
@api_client.set_client_api_key(api_key)
|
48
|
+
end
|
49
|
+
|
42
50
|
# Creates a new authentication resource.
|
43
51
|
#
|
44
52
|
# Required API Key ACLs:
|
@@ -39,6 +39,14 @@ module Algolia
|
|
39
39
|
new(config)
|
40
40
|
end
|
41
41
|
|
42
|
+
# Helper method to switch the API key used to authenticate the requests.
|
43
|
+
#
|
44
|
+
# @param api_key [String] the new API key to use.
|
45
|
+
# @return [void]
|
46
|
+
def set_client_api_key(api_key)
|
47
|
+
@api_client.set_client_api_key(api_key)
|
48
|
+
end
|
49
|
+
|
42
50
|
# This method allow you to send requests to the Algolia REST API.
|
43
51
|
|
44
52
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
@@ -24,6 +24,14 @@ module Algolia
|
|
24
24
|
new(config)
|
25
25
|
end
|
26
26
|
|
27
|
+
# Helper method to switch the API key used to authenticate the requests.
|
28
|
+
#
|
29
|
+
# @param api_key [String] the new API key to use.
|
30
|
+
# @return [void]
|
31
|
+
def set_client_api_key(api_key)
|
32
|
+
@api_client.set_client_api_key(api_key)
|
33
|
+
end
|
34
|
+
|
27
35
|
# This method allow you to send requests to the Algolia REST API.
|
28
36
|
|
29
37
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
@@ -39,6 +39,14 @@ module Algolia
|
|
39
39
|
new(config)
|
40
40
|
end
|
41
41
|
|
42
|
+
# Helper method to switch the API key used to authenticate the requests.
|
43
|
+
#
|
44
|
+
# @param api_key [String] the new API key to use.
|
45
|
+
# @return [void]
|
46
|
+
def set_client_api_key(api_key)
|
47
|
+
@api_client.set_client_api_key(api_key)
|
48
|
+
end
|
49
|
+
|
42
50
|
# This method allow you to send requests to the Algolia REST API.
|
43
51
|
|
44
52
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
@@ -39,6 +39,14 @@ module Algolia
|
|
39
39
|
new(config)
|
40
40
|
end
|
41
41
|
|
42
|
+
# Helper method to switch the API key used to authenticate the requests.
|
43
|
+
#
|
44
|
+
# @param api_key [String] the new API key to use.
|
45
|
+
# @return [void]
|
46
|
+
def set_client_api_key(api_key)
|
47
|
+
@api_client.set_client_api_key(api_key)
|
48
|
+
end
|
49
|
+
|
42
50
|
# Creates a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.
|
43
51
|
#
|
44
52
|
# Required API Key ACLs:
|
@@ -32,6 +32,14 @@ module Algolia
|
|
32
32
|
new(config)
|
33
33
|
end
|
34
34
|
|
35
|
+
# Helper method to switch the API key used to authenticate the requests.
|
36
|
+
#
|
37
|
+
# @param api_key [String] the new API key to use.
|
38
|
+
# @return [void]
|
39
|
+
def set_client_api_key(api_key)
|
40
|
+
@api_client.set_client_api_key(api_key)
|
41
|
+
end
|
42
|
+
|
35
43
|
# This method allow you to send requests to the Algolia REST API.
|
36
44
|
|
37
45
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
@@ -35,6 +35,14 @@ module Algolia
|
|
35
35
|
new(config)
|
36
36
|
end
|
37
37
|
|
38
|
+
# Helper method to switch the API key used to authenticate the requests.
|
39
|
+
#
|
40
|
+
# @param api_key [String] the new API key to use.
|
41
|
+
# @return [void]
|
42
|
+
def set_client_api_key(api_key)
|
43
|
+
@api_client.set_client_api_key(api_key)
|
44
|
+
end
|
45
|
+
|
38
46
|
# Creates a new API key with specific permissions and restrictions.
|
39
47
|
#
|
40
48
|
# Required API Key ACLs:
|
@@ -3532,5 +3540,17 @@ module Algolia
|
|
3532
3540
|
move_operation_response: move_operation_response
|
3533
3541
|
)
|
3534
3542
|
end
|
3543
|
+
|
3544
|
+
def index_exists?(index_name)
|
3545
|
+
begin
|
3546
|
+
get_settings(index_name)
|
3547
|
+
rescue AlgoliaHttpError => e
|
3548
|
+
return false if e.code == 404
|
3549
|
+
|
3550
|
+
raise e
|
3551
|
+
end
|
3552
|
+
|
3553
|
+
true
|
3554
|
+
end
|
3535
3555
|
end
|
3536
3556
|
end
|
@@ -24,6 +24,14 @@ module Algolia
|
|
24
24
|
new(config)
|
25
25
|
end
|
26
26
|
|
27
|
+
# Helper method to switch the API key used to authenticate the requests.
|
28
|
+
#
|
29
|
+
# @param api_key [String] the new API key to use.
|
30
|
+
# @return [void]
|
31
|
+
def set_client_api_key(api_key)
|
32
|
+
@api_client.set_client_api_key(api_key)
|
33
|
+
end
|
34
|
+
|
27
35
|
# This method allow you to send requests to the Algolia REST API.
|
28
36
|
|
29
37
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
data/lib/algolia/api_client.rb
CHANGED
@@ -44,6 +44,11 @@ module Algolia
|
|
44
44
|
yield(self) if block_given?
|
45
45
|
end
|
46
46
|
|
47
|
+
def set_client_api_key(api_key)
|
48
|
+
@api_key = api_key
|
49
|
+
@header_params["X-Algolia-API-Key"] = api_key
|
50
|
+
end
|
51
|
+
|
47
52
|
# The default Configuration object.
|
48
53
|
def self.default
|
49
54
|
@@default ||= Configuration.new
|
data/lib/algolia/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: algolia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- https://alg.li/support
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|