recombee_api_client 3.1.0 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/recombee_api_client.rb +1 -1
- data/lib/recombee_api_client/api/add_search_synonym.rb +72 -0
- data/lib/recombee_api_client/api/delete_all_search_synonyms.rb +47 -0
- data/lib/recombee_api_client/api/delete_search_synonym.rb +50 -0
- data/lib/recombee_api_client/api/list_search_synonyms.rb +59 -0
- data/lib/recombee_api_client/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 993911797068c239b3eb1ed0bff4f115049a3a7c5c25cc10ee2e7606fabaecc5
|
4
|
+
data.tar.gz: 9759c4ad279ea317cbdf0d6b3ac93eee89761010b1d8aded8cdd946f9dc0e793
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a5cccd32d72f4ec654b3ffc9c8f9d0f50e90618b104afc7618e24cf40f0ad9ceaf14b18031d7e8c4ef1ac05027a7857a592e3fc18fded5a7a2f1b27b80f9225
|
7
|
+
data.tar.gz: 8a68e11edd23890854ec6248994d77e4f494fd19b881d798eb7f916b0823b77987695ad0c439594fdadc82c7f229cda3128ce6d3dfecdd17162e38654d1f3200
|
data/lib/recombee_api_client.rb
CHANGED
@@ -18,7 +18,7 @@ module RecombeeApiClient
|
|
18
18
|
include HTTParty
|
19
19
|
|
20
20
|
BATCH_MAX_SIZE = 10000
|
21
|
-
USER_AGENT = {'User-Agent' => 'recombee-ruby-api-client/3.
|
21
|
+
USER_AGENT = {'User-Agent' => 'recombee-ruby-api-client/3.2.0'}
|
22
22
|
|
23
23
|
##
|
24
24
|
# - +account+ -> Name of your account at Recombee
|
@@ -0,0 +1,72 @@
|
|
1
|
+
#
|
2
|
+
# This file is auto-generated, do not edit
|
3
|
+
#
|
4
|
+
|
5
|
+
module RecombeeApiClient
|
6
|
+
require_relative 'request'
|
7
|
+
require_relative '../errors'
|
8
|
+
|
9
|
+
##
|
10
|
+
#Adds a new synonym for the [Search items](https://docs.recombee.com/api.html#search-items).
|
11
|
+
#
|
12
|
+
#When the `term` is used in the search query, the `synonym` is also used for the full-text search.
|
13
|
+
#Unless `oneWay=true`, it works also in the opposite way (`synonym` -> `term`).
|
14
|
+
#
|
15
|
+
#An example of a synonym can be `science fiction` for the term `sci-fi`.
|
16
|
+
#
|
17
|
+
class AddSearchSynonym < ApiRequest
|
18
|
+
attr_reader :term, :synonym, :one_way
|
19
|
+
attr_accessor :timeout
|
20
|
+
attr_accessor :ensure_https
|
21
|
+
|
22
|
+
##
|
23
|
+
# * *Required arguments*
|
24
|
+
# - +term+ -> A word to which the `synonym` is specified.
|
25
|
+
# - +synonym+ -> A word that should be considered equal to the `term` by the full-text search engine.
|
26
|
+
#
|
27
|
+
# * *Optional arguments (given as hash optional)*
|
28
|
+
# - +oneWay+ -> If set to `true`, only `term` -> `synonym` is considered. If set to `false`, also `synonym` -> `term` works.
|
29
|
+
#
|
30
|
+
#Default: `false`.
|
31
|
+
#
|
32
|
+
#
|
33
|
+
def initialize(term, synonym, optional = {})
|
34
|
+
@term = term
|
35
|
+
@synonym = synonym
|
36
|
+
optional = normalize_optional(optional)
|
37
|
+
@one_way = optional['oneWay']
|
38
|
+
@optional = optional
|
39
|
+
@timeout = 10000
|
40
|
+
@ensure_https = false
|
41
|
+
@optional.each do |par, _|
|
42
|
+
fail UnknownOptionalParameter.new(par) unless ["oneWay"].include? par
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# HTTP method
|
47
|
+
def method
|
48
|
+
:post
|
49
|
+
end
|
50
|
+
|
51
|
+
# Values of body parameters as a Hash
|
52
|
+
def body_parameters
|
53
|
+
p = Hash.new
|
54
|
+
p['term'] = @term
|
55
|
+
p['synonym'] = @synonym
|
56
|
+
p['oneWay'] = @optional['oneWay'] if @optional.include? 'oneWay'
|
57
|
+
p
|
58
|
+
end
|
59
|
+
|
60
|
+
# Values of query parameters as a Hash.
|
61
|
+
# name of parameter => value of the parameter
|
62
|
+
def query_parameters
|
63
|
+
params = {}
|
64
|
+
params
|
65
|
+
end
|
66
|
+
|
67
|
+
# Relative path to the endpoint
|
68
|
+
def path
|
69
|
+
"/{databaseId}/synonyms/items/"
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
#
|
2
|
+
# This file is auto-generated, do not edit
|
3
|
+
#
|
4
|
+
|
5
|
+
module RecombeeApiClient
|
6
|
+
require_relative 'request'
|
7
|
+
require_relative '../errors'
|
8
|
+
|
9
|
+
##
|
10
|
+
#Deletes all synonyms defined in the database.
|
11
|
+
#
|
12
|
+
class DeleteAllSearchSynonyms < ApiRequest
|
13
|
+
|
14
|
+
attr_accessor :timeout
|
15
|
+
attr_accessor :ensure_https
|
16
|
+
|
17
|
+
##
|
18
|
+
#
|
19
|
+
def initialize()
|
20
|
+
@timeout = 10000
|
21
|
+
@ensure_https = false
|
22
|
+
end
|
23
|
+
|
24
|
+
# HTTP method
|
25
|
+
def method
|
26
|
+
:delete
|
27
|
+
end
|
28
|
+
|
29
|
+
# Values of body parameters as a Hash
|
30
|
+
def body_parameters
|
31
|
+
p = Hash.new
|
32
|
+
p
|
33
|
+
end
|
34
|
+
|
35
|
+
# Values of query parameters as a Hash.
|
36
|
+
# name of parameter => value of the parameter
|
37
|
+
def query_parameters
|
38
|
+
params = {}
|
39
|
+
params
|
40
|
+
end
|
41
|
+
|
42
|
+
# Relative path to the endpoint
|
43
|
+
def path
|
44
|
+
"/{databaseId}/synonyms/items/"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
#
|
2
|
+
# This file is auto-generated, do not edit
|
3
|
+
#
|
4
|
+
|
5
|
+
module RecombeeApiClient
|
6
|
+
require_relative 'request'
|
7
|
+
require_relative '../errors'
|
8
|
+
|
9
|
+
##
|
10
|
+
#Deletes synonym of given `id` and this synonym is no longer taken into account in the [Search items](https://docs.recombee.com/api.html#search-items).
|
11
|
+
#
|
12
|
+
class DeleteSearchSynonym < ApiRequest
|
13
|
+
attr_reader :id
|
14
|
+
attr_accessor :timeout
|
15
|
+
attr_accessor :ensure_https
|
16
|
+
|
17
|
+
##
|
18
|
+
# * *Required arguments*
|
19
|
+
# - +id+ -> ID of the synonym that should be deleted.
|
20
|
+
#
|
21
|
+
def initialize(id)
|
22
|
+
@id = id
|
23
|
+
@timeout = 10000
|
24
|
+
@ensure_https = false
|
25
|
+
end
|
26
|
+
|
27
|
+
# HTTP method
|
28
|
+
def method
|
29
|
+
:delete
|
30
|
+
end
|
31
|
+
|
32
|
+
# Values of body parameters as a Hash
|
33
|
+
def body_parameters
|
34
|
+
p = Hash.new
|
35
|
+
p
|
36
|
+
end
|
37
|
+
|
38
|
+
# Values of query parameters as a Hash.
|
39
|
+
# name of parameter => value of the parameter
|
40
|
+
def query_parameters
|
41
|
+
params = {}
|
42
|
+
params
|
43
|
+
end
|
44
|
+
|
45
|
+
# Relative path to the endpoint
|
46
|
+
def path
|
47
|
+
"/{databaseId}/synonyms/items/#{@id}"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
#
|
2
|
+
# This file is auto-generated, do not edit
|
3
|
+
#
|
4
|
+
|
5
|
+
module RecombeeApiClient
|
6
|
+
require_relative 'request'
|
7
|
+
require_relative '../errors'
|
8
|
+
|
9
|
+
##
|
10
|
+
#Gives the list of synonyms defined in the database.
|
11
|
+
class ListSearchSynonyms < ApiRequest
|
12
|
+
attr_reader :count, :offset
|
13
|
+
attr_accessor :timeout
|
14
|
+
attr_accessor :ensure_https
|
15
|
+
|
16
|
+
##
|
17
|
+
#
|
18
|
+
# * *Optional arguments (given as hash optional)*
|
19
|
+
# - +count+ -> The number of synonyms to be listed.
|
20
|
+
# - +offset+ -> Specifies the number of synonyms to skip (ordered by `term`).
|
21
|
+
#
|
22
|
+
def initialize(optional = {})
|
23
|
+
optional = normalize_optional(optional)
|
24
|
+
@count = optional['count']
|
25
|
+
@offset = optional['offset']
|
26
|
+
@optional = optional
|
27
|
+
@timeout = 100000
|
28
|
+
@ensure_https = false
|
29
|
+
@optional.each do |par, _|
|
30
|
+
fail UnknownOptionalParameter.new(par) unless ["count","offset"].include? par
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# HTTP method
|
35
|
+
def method
|
36
|
+
:get
|
37
|
+
end
|
38
|
+
|
39
|
+
# Values of body parameters as a Hash
|
40
|
+
def body_parameters
|
41
|
+
p = Hash.new
|
42
|
+
p
|
43
|
+
end
|
44
|
+
|
45
|
+
# Values of query parameters as a Hash.
|
46
|
+
# name of parameter => value of the parameter
|
47
|
+
def query_parameters
|
48
|
+
params = {}
|
49
|
+
params['count'] = @optional['count'] if @optional['count']
|
50
|
+
params['offset'] = @optional['offset'] if @optional['offset']
|
51
|
+
params
|
52
|
+
end
|
53
|
+
|
54
|
+
# Relative path to the endpoint
|
55
|
+
def path
|
56
|
+
"/{databaseId}/synonyms/items/"
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recombee_api_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ondřej Fiedler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -100,10 +100,12 @@ files:
|
|
100
100
|
- lib/recombee_api_client/api/add_item_property.rb
|
101
101
|
- lib/recombee_api_client/api/add_purchase.rb
|
102
102
|
- lib/recombee_api_client/api/add_rating.rb
|
103
|
+
- lib/recombee_api_client/api/add_search_synonym.rb
|
103
104
|
- lib/recombee_api_client/api/add_series.rb
|
104
105
|
- lib/recombee_api_client/api/add_user.rb
|
105
106
|
- lib/recombee_api_client/api/add_user_property.rb
|
106
107
|
- lib/recombee_api_client/api/batch.rb
|
108
|
+
- lib/recombee_api_client/api/delete_all_search_synonyms.rb
|
107
109
|
- lib/recombee_api_client/api/delete_bookmark.rb
|
108
110
|
- lib/recombee_api_client/api/delete_cart_addition.rb
|
109
111
|
- lib/recombee_api_client/api/delete_detail_view.rb
|
@@ -112,6 +114,7 @@ files:
|
|
112
114
|
- lib/recombee_api_client/api/delete_item_property.rb
|
113
115
|
- lib/recombee_api_client/api/delete_purchase.rb
|
114
116
|
- lib/recombee_api_client/api/delete_rating.rb
|
117
|
+
- lib/recombee_api_client/api/delete_search_synonym.rb
|
115
118
|
- lib/recombee_api_client/api/delete_series.rb
|
116
119
|
- lib/recombee_api_client/api/delete_user.rb
|
117
120
|
- lib/recombee_api_client/api/delete_user_property.rb
|
@@ -134,6 +137,7 @@ files:
|
|
134
137
|
- lib/recombee_api_client/api/list_item_ratings.rb
|
135
138
|
- lib/recombee_api_client/api/list_item_view_portions.rb
|
136
139
|
- lib/recombee_api_client/api/list_items.rb
|
140
|
+
- lib/recombee_api_client/api/list_search_synonyms.rb
|
137
141
|
- lib/recombee_api_client/api/list_series.rb
|
138
142
|
- lib/recombee_api_client/api/list_series_items.rb
|
139
143
|
- lib/recombee_api_client/api/list_user_bookmarks.rb
|