recombee_api_client 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f21bfcff0358bddbb67867f07587e6debb8ae94
4
- data.tar.gz: 4117139086e3e3f515a692f39d42df273e9cb1be
3
+ metadata.gz: f352c6ef8fe7deec30fcbe75a95f6fca0973d332
4
+ data.tar.gz: 99dc6053c007b41e86ebf06cf688740a8beeb5d9
5
5
  SHA512:
6
- metadata.gz: c124f71c954aaada1ce7832713dcab6538dde62d35a8802e448cef1d3f9ac0c1cfe7276c5932b1341c8f26a0a5153c68e669d0c2c84f66161fdc2b2571de410f
7
- data.tar.gz: e0aafaeb3454dfe99f2d3084baff1878d581c4c06192638ebaee5b758b1cf62ffd264f614efc342b29524b668ff7f933c193b133f30344a0fce5f51129107905
6
+ metadata.gz: d39f7acd6fffaa2a2de295959845b5444a240d31f5639314c05e6e23b4752fbe7d57bba46236e7e47b3dd8f17498cf748d54df3a88f6438158b96415d383bdbc
7
+ data.tar.gz: a57d0ca06bced0c0b5ccfcb384c308d0323e27637011e37d0a60824fab90ac4a26a4f550ddf1c273e0690cbb070a3070a294ec6593d7dbc5b099d9a1ced0b27a
@@ -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/1.4.0'}
21
+ USER_AGENT = {'User-Agent' => 'recombee-ruby-api-client/1.5.0'}
22
22
 
23
23
  ##
24
24
  # - +account+ -> Name of your account at Recombee
@@ -0,0 +1,65 @@
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
+ #The view portions feature is currently experimental.
11
+ #
12
+ #Deletes an existing view portion specified by (`userId`, `itemId`, `sessionId`) from the database.
13
+ #
14
+ class DeleteViewPortion < ApiRequest
15
+ attr_reader :user_id, :item_id, :session_id
16
+ attr_accessor :timeout
17
+ attr_accessor :ensure_https
18
+
19
+ ##
20
+ # * *Required arguments*
21
+ # - +user_id+ -> ID of the user who rated the item.
22
+ # - +item_id+ -> ID of the item which was rated.
23
+ #
24
+ # * *Optional arguments (given as hash optional)*
25
+ # - +sessionId+ -> Identifier of a session.
26
+ #
27
+ def initialize(user_id, item_id, optional = {})
28
+ @user_id = user_id
29
+ @item_id = item_id
30
+ @session_id = optional['sessionId']
31
+ @optional = optional
32
+ @timeout = 1000
33
+ @ensure_https = false
34
+ @optional.each do |par, _|
35
+ fail UnknownOptionalParameter.new(par) unless ["sessionId"].include? par
36
+ end
37
+ end
38
+
39
+ # HTTP method
40
+ def method
41
+ :delete
42
+ end
43
+
44
+ # Values of body parameters as a Hash
45
+ def body_parameters
46
+ p = Hash.new
47
+ p
48
+ end
49
+
50
+ # Values of query parameters as a Hash.
51
+ # name of parameter => value of the parameter
52
+ def query_parameters
53
+ params = {}
54
+ params['userId'] = @user_id
55
+ params['itemId'] = @item_id
56
+ params['sessionId'] = @optional['sessionId'] if @optional['sessionId']
57
+ params
58
+ end
59
+
60
+ # Relative path to the endpoint
61
+ def path
62
+ "/{databaseId}/viewportions/"
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,53 @@
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
+ #The view portions feature is currently experimental.
11
+ #
12
+ #List all the view portions of an item ever submitted by different users.
13
+ #
14
+ class ListItemViewPortions < ApiRequest
15
+ attr_reader :item_id
16
+ attr_accessor :timeout
17
+ attr_accessor :ensure_https
18
+
19
+ ##
20
+ # * *Required arguments*
21
+ # - +item_id+ -> ID of the item of which the view portions are to be listed.
22
+ #
23
+ #
24
+ def initialize(item_id)
25
+ @item_id = item_id
26
+ @timeout = 100000
27
+ @ensure_https = false
28
+ end
29
+
30
+ # HTTP method
31
+ def method
32
+ :get
33
+ end
34
+
35
+ # Values of body parameters as a Hash
36
+ def body_parameters
37
+ p = Hash.new
38
+ p
39
+ end
40
+
41
+ # Values of query parameters as a Hash.
42
+ # name of parameter => value of the parameter
43
+ def query_parameters
44
+ params = {}
45
+ params
46
+ end
47
+
48
+ # Relative path to the endpoint
49
+ def path
50
+ "/{databaseId}/items/#{@item_id}/viewportions/"
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,52 @@
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
+ #The view portions feature is currently experimental.
11
+ #
12
+ #List all the view portions ever submitted by a given user.
13
+ #
14
+ class ListUserViewPortions < ApiRequest
15
+ attr_reader :user_id
16
+ attr_accessor :timeout
17
+ attr_accessor :ensure_https
18
+
19
+ ##
20
+ # * *Required arguments*
21
+ # - +user_id+ -> ID of the user whose view portions are to be listed.
22
+ #
23
+ def initialize(user_id)
24
+ @user_id = user_id
25
+ @timeout = 100000
26
+ @ensure_https = false
27
+ end
28
+
29
+ # HTTP method
30
+ def method
31
+ :get
32
+ end
33
+
34
+ # Values of body parameters as a Hash
35
+ def body_parameters
36
+ p = Hash.new
37
+ p
38
+ end
39
+
40
+ # Values of query parameters as a Hash.
41
+ # name of parameter => value of the parameter
42
+ def query_parameters
43
+ params = {}
44
+ params
45
+ end
46
+
47
+ # Relative path to the endpoint
48
+ def path
49
+ "/{databaseId}/users/#{@user_id}/viewportions/"
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,75 @@
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
+ #The view portions feature is currently experimental.
11
+ #
12
+ #Sets viewed portion of an item (for example a video or article) by a user (at a session).
13
+ #If you send new request with the same (`userId`, `itemId`, `sessionId`), the portion gets updated.
14
+ #
15
+ class SetViewPortion < ApiRequest
16
+ attr_reader :user_id, :item_id, :session_id, :timestamp, :portion, :cascade_create
17
+ attr_accessor :timeout
18
+ attr_accessor :ensure_https
19
+
20
+ ##
21
+ # * *Required arguments*
22
+ # - +user_id+ -> User who viewed a portion of the item
23
+ # - +item_id+ -> Viewed item
24
+ # - +portion+ -> Viewed portion of the item (number between 0.0 (viewed nothing) and 1.0 (viewed full item) ).
25
+ #
26
+ # * *Optional arguments (given as hash optional)*
27
+ # - +sessionId+ -> Id of session in which the user viewed the item
28
+ # - +timestamp+ -> UTC timestamp of the rating as ISO8601-1 pattern or UTC epoch time. The default value is the current time.
29
+ # - +cascadeCreate+ -> Sets whether the given user/item should be created if not present in the database.
30
+ #
31
+ def initialize(user_id, item_id, portion, optional = {})
32
+ @user_id = user_id
33
+ @item_id = item_id
34
+ @portion = portion
35
+ @session_id = optional['sessionId']
36
+ @timestamp = optional['timestamp']
37
+ @cascade_create = optional['cascadeCreate']
38
+ @optional = optional
39
+ @timeout = 1000
40
+ @ensure_https = false
41
+ @optional.each do |par, _|
42
+ fail UnknownOptionalParameter.new(par) unless ["sessionId","timestamp","cascadeCreate"].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['userId'] = @user_id
55
+ p['itemId'] = @item_id
56
+ p['portion'] = @portion
57
+ p['sessionId'] = @optional['sessionId'] if @optional.include? 'sessionId'
58
+ p['timestamp'] = @optional['timestamp'] if @optional.include? 'timestamp'
59
+ p['cascadeCreate'] = @optional['cascadeCreate'] if @optional.include? 'cascadeCreate'
60
+ p
61
+ end
62
+
63
+ # Values of query parameters as a Hash.
64
+ # name of parameter => value of the parameter
65
+ def query_parameters
66
+ params = {}
67
+ params
68
+ end
69
+
70
+ # Relative path to the endpoint
71
+ def path
72
+ "/{databaseId}/viewportions/"
73
+ end
74
+ end
75
+ end
@@ -1,3 +1,3 @@
1
1
  module RecombeeApiClient
2
- VERSION = '1.4.0'
2
+ VERSION = '1.5.0'
3
3
  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: 1.4.0
4
+ version: 1.5.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: 2017-08-25 00:00:00.000000000 Z
11
+ date: 2017-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -115,6 +115,7 @@ files:
115
115
  - lib/recombee_api_client/api/delete_series.rb
116
116
  - lib/recombee_api_client/api/delete_user.rb
117
117
  - lib/recombee_api_client/api/delete_user_property.rb
118
+ - lib/recombee_api_client/api/delete_view_portion.rb
118
119
  - lib/recombee_api_client/api/get_item_property_info.rb
119
120
  - lib/recombee_api_client/api/get_item_values.rb
120
121
  - lib/recombee_api_client/api/get_user_property_info.rb
@@ -130,6 +131,7 @@ files:
130
131
  - lib/recombee_api_client/api/list_item_properties.rb
131
132
  - lib/recombee_api_client/api/list_item_purchases.rb
132
133
  - lib/recombee_api_client/api/list_item_ratings.rb
134
+ - lib/recombee_api_client/api/list_item_view_portions.rb
133
135
  - lib/recombee_api_client/api/list_items.rb
134
136
  - lib/recombee_api_client/api/list_series.rb
135
137
  - lib/recombee_api_client/api/list_series_items.rb
@@ -139,6 +141,7 @@ files:
139
141
  - lib/recombee_api_client/api/list_user_properties.rb
140
142
  - lib/recombee_api_client/api/list_user_purchases.rb
141
143
  - lib/recombee_api_client/api/list_user_ratings.rb
144
+ - lib/recombee_api_client/api/list_user_view_portions.rb
142
145
  - lib/recombee_api_client/api/list_users.rb
143
146
  - lib/recombee_api_client/api/merge_users.rb
144
147
  - lib/recombee_api_client/api/remove_from_group.rb
@@ -148,6 +151,7 @@ files:
148
151
  - lib/recombee_api_client/api/set_item_values.rb
149
152
  - lib/recombee_api_client/api/set_user_values.rb
150
153
  - lib/recombee_api_client/api/set_values.rb
154
+ - lib/recombee_api_client/api/set_view_portion.rb
151
155
  - lib/recombee_api_client/api/user_based_recommendation.rb
152
156
  - lib/recombee_api_client/errors.rb
153
157
  - lib/recombee_api_client/version.rb