wes-data-api 10.3.0 → 10.4.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: 1922197bed5efdd83c781d736553c32cff979da4
4
- data.tar.gz: 46faefc3174f86b9e29aee462b72f8b0597d108d
3
+ metadata.gz: 83adde3b98be27d8ce63787d41cff3b1e1e62ce1
4
+ data.tar.gz: f0b8b92d1657ffe9a42ae50ebfe7292af2628c10
5
5
  SHA512:
6
- metadata.gz: e1354aa789c6a042b6dc8f46c44a0c58666d66be456ca275bf25cc2b048f3b2a21385cc8e11ca1692614d25723d81e0aedbde9a04f38aa4b52ac8738df74e86b
7
- data.tar.gz: 09a6f310906af49190277e49e51471cf2806a5754032e16775364dcfe3bb3a36839e61d924adb879c5222ab545098ac4f7df9592d8463d423461d6500d8c8bb6
6
+ metadata.gz: 0e373f9b185a197abd1cc141af841a5a03bd941668525c3b095902ea0bae30eebc72d94900a67968576abe187a61504afa13ee565fe7223b9fef05d44c83208c
7
+ data.tar.gz: a03fd51567f2b521d0949503483899da7ba8b32bb6efff83e1dcac0654447f8538379a9b3928ffc5b561d9b10b2a72de515bf0fb1006b0bb842018b95d8e7dd8
@@ -60,8 +60,20 @@ module Wes
60
60
  )
61
61
  end
62
62
 
63
+ def insights(type)
64
+ data = insight_data(type)
65
+
66
+ JSON.parse(data)
67
+ end
68
+
63
69
  private
64
70
 
71
+ def insight_data(type)
72
+ method_name = format("insights_%s", type)
73
+ raise NoMethodError unless @attributes.respond_to?(method_name)
74
+ @attributes.send(method_name)
75
+ end
76
+
65
77
  def answers_route
66
78
  [routes.brief, id, routes.answers].join('/')
67
79
  end
data/lib/wes/data/api.rb CHANGED
@@ -5,7 +5,7 @@ require 'wes/data/api/configuration'
5
5
  module Wes
6
6
  module Data
7
7
  module API
8
- VERSION = '10.3.0'.freeze
8
+ VERSION = '10.4.0'.freeze
9
9
  end
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wes-data-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.3.0
4
+ version: 10.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''