recombee_api_client 1.2.1 → 1.2.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 83b584f1d11c806d77846c5619ca291e2bbaa498
4
- data.tar.gz: 317bde2ed001ea6a00b10d045123098e27b268c4
3
+ metadata.gz: 553bef28ad832e8fd0c6f868cfb9d9c230186c23
4
+ data.tar.gz: dec8326a4dcf7d9ac2a46405f81d3d4ae1adda43
5
5
  SHA512:
6
- metadata.gz: eb191d7f12f872936719dc11a7c6e37e8e4c925c424f53aef19975dd7931ee5a43d3a2265f3e2c62d78e523363d91ce1c44e7c5a8cbecea878e122c67cbb27e1
7
- data.tar.gz: c1d90063fe718a27a0cf665c0bcaebaa9d1fa1066ef3b917fb1492329a2c63fb386d5f01b1e7c957f9ba6754a94b3fc0abea9c804278a20c144af2fd7ed8c6bd
6
+ metadata.gz: d3bdb86539dd8377bdbe31098b0a49f3f32086a729224aa2c5c6f459e4acc9ec4c8ab27cc47d8ee2b23b2d0440fe6892678d2e036ca69e7fd8048a480746b590
7
+ data.tar.gz: ab51ef1c571d5ca2a1ebced6de62219d178a06a55a4315277c23c2821bc43b63ca8e7242af7785b4a2dc1e8123e4cb6d8b364342601d5d7a245524a1604c2489
data/README.md CHANGED
@@ -57,7 +57,7 @@ begin
57
57
  puts 'Recommend for a user'
58
58
  recommended = client.send(UserBasedRecommendation.new('user-25', 5, 'rotationRate' => 0))
59
59
  puts "Recommended items: #{recommended}"
60
- rescue ResponseError => e
60
+ rescue APIError => e
61
61
  puts e
62
62
  end
63
63
  ```
@@ -13,7 +13,7 @@ module RecombeeApiClient
13
13
  #Merging happens between two users referred to as the *source* and the *target*. After the merge, all the interactions of the source user are attributed to the target user, and the source user is **deleted** unless special parameter `keepSourceUser` is set `true`.
14
14
  #
15
15
  class MergeUsers < ApiRequest
16
- attr_reader :target_user_id, :source_user_id, :keep_source_user
16
+ attr_reader :target_user_id, :source_user_id, :keep_source_user, :cascade_create
17
17
  attr_accessor :timeout
18
18
  attr_accessor :ensure_https
19
19
 
@@ -23,17 +23,19 @@ module RecombeeApiClient
23
23
  # - +source_user_id+ -> ID of the target user.
24
24
  #
25
25
  # * *Optional arguments (given as hash optional)*
26
- # - +keepSourceUser+ -> If true, the source user will not be deleted, but also kept in the database..
26
+ # - +keepSourceUser+ -> If true, the source user will not be deleted, but also kept in the database.
27
+ # - +cascadeCreate+ -> Sets whether the user *targetUserId* should be created if not present in the database.
27
28
  #
28
29
  def initialize(target_user_id, source_user_id, optional = {})
29
30
  @target_user_id = target_user_id
30
31
  @source_user_id = source_user_id
31
32
  @keep_source_user = optional['keepSourceUser']
33
+ @cascade_create = optional['cascadeCreate']
32
34
  @optional = optional
33
35
  @timeout = 1000
34
36
  @ensure_https = false
35
37
  @optional.each do |par, _|
36
- fail UnknownOptionalParameter.new(par) unless ["keepSourceUser"].include? par
38
+ fail UnknownOptionalParameter.new(par) unless ["keepSourceUser","cascadeCreate"].include? par
37
39
  end
38
40
  end
39
41
 
@@ -53,6 +55,7 @@ module RecombeeApiClient
53
55
  def query_parameters
54
56
  params = {}
55
57
  params['keepSourceUser'] = @optional['keepSourceUser'] if @optional['keepSourceUser']
58
+ params['cascadeCreate'] = @optional['cascadeCreate'] if @optional['cascadeCreate']
56
59
  params
57
60
  end
58
61
 
@@ -1,3 +1,3 @@
1
1
  module RecombeeApiClient
2
- VERSION = '1.2.1'
2
+ VERSION = '1.2.3'
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.2.1
4
+ version: 1.2.3
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: 2016-08-05 00:00:00.000000000 Z
11
+ date: 2016-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json