Riminder 1.0.1 → 1.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: ce869a51b8aba72aa977f3174128eef1538215deb60912753fa1a5cfdbb7ad54
4
- data.tar.gz: e675988d953c4ad6e1727d77282821d3e32d90dce843c3278855734f635364c8
2
+ SHA1:
3
+ metadata.gz: cfcabf3cd7aeaafe79d5151f81900917907d502f
4
+ data.tar.gz: 4e14d99bb8dcdc5e57384ac1a13352f0c9e0538b
5
5
  SHA512:
6
- metadata.gz: d7d62bc512d75f0ed79a2b54ab70156528ca02e0e1d2c66c2ddd374381652964877f6b2f618589c1ec580603a138a577822735880b2e1e19eae41cda7cd2a8c5
7
- data.tar.gz: 954bf4e28adafd0c3da3bca9b5ee950a99697ed2fbb10d6c53fa21255fa6c8c4f5f53030cc52cd324afca2b802f54d9ba78011e34c9ec1e803578d550fa6309b
6
+ metadata.gz: 4510fea06913bc2561cc1f09ede24942b3db0ec11f4f6f31473a60a5388880b47a3a6867a1d404ff727f430e2b74ab14a8c2801468dcfc68102429692c544811
7
+ data.tar.gz: 6f027675c3dfbb9625b49acb0a99dd69f2c0288d9f26f524cb0f7e941aed2fb3b55098f93713e47c4f1541ca1042e0576942eb7c0ff06264acbdf0294f4f48ef
@@ -9,6 +9,7 @@ class Profile
9
9
  attr_reader :json
10
10
  attr_reader :stage
11
11
  attr_reader :rating
12
+ attr_reader :revealing
12
13
  DEFAULT_DATE_START = '1347209668'
13
14
 
14
15
  def initialize(clientw)
@@ -20,6 +21,7 @@ class Profile
20
21
  @json = Json.new(@clientw)
21
22
  @stage = Stage.new(@clientw)
22
23
  @rating = Rating.new(@clientw)
24
+ @revealing = Revealing.new(@clientw)
23
25
 
24
26
  end
25
27
 
@@ -195,4 +197,23 @@ class Profile
195
197
  end
196
198
  end
197
199
 
200
+ class Revealing
201
+ @clientw
202
+ def initialize(clientw)
203
+ @clientw = clientw
204
+ end
205
+
206
+ def get(options)
207
+ payload = {
208
+ "source_id" => options['source_id']
209
+ }
210
+ payload = ReqUtils.add_if_not_blank(payload, 'profile_id', options['profile_id'])
211
+ payload = ReqUtils.add_if_not_blank(payload, 'profile_reference', options['profile_reference'])
212
+ payload = ReqUtils.add_if_not_blank(payload, 'filter_id', options['filter_id'])
213
+ payload = ReqUtils.add_if_not_blank(payload, 'filter_reference', options['filter_reference'])
214
+ resp = @clientw.get("profile/revealing", payload)
215
+ return resp['data']
216
+ end
217
+ end
218
+
198
219
  end
@@ -28,4 +28,4 @@ class Riminder
28
28
 
29
29
  end
30
30
 
31
- end
31
+ end
@@ -30,7 +30,7 @@ class RiminderResponseException < RiminderException
30
30
  def initialize(msg, exp)
31
31
  response_body = exp.http_body
32
32
  if (response_body.length >= 201)
33
- response_body = response_body.str[0, 200] + '...'
33
+ response_body = response_body[0, 200] + '...'
34
34
  end
35
35
  msg = msg + exp.to_s + " => " + response_body
36
36
 
@@ -1,4 +1,3 @@
1
- require_relative 'requtils.rb'
2
1
 
3
2
  class Source
4
3
  @clientw
@@ -13,12 +12,9 @@ class Source
13
12
  end
14
13
 
15
14
  def get(source_id)
16
- query = {}
17
- if (source_id.is_a?(Hash))
18
- ReqUtils.add_if_not_blank(query, 'source_id', source_id['source_id'])
19
- else
20
- query["source_id"] = source_id
21
- end
15
+ query = {
16
+ "source_id" => source_id
17
+ }
22
18
  resp = @clientw.get("source", query)
23
19
  return resp['data']
24
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Riminder
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gotte Alexandre
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-13 00:00:00.000000000 Z
11
+ date: 2018-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  requirements: []
110
110
  rubyforge_project:
111
- rubygems_version: 2.7.6
111
+ rubygems_version: 2.5.2.1
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: A ruby api client for Riminder api.