usabilla_api 1.0.1 → 1.1.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: 26b4c34efe0fb872823f70e7d250b0f290b9d767
4
- data.tar.gz: 6b0a1a866ac365aadc77950abf5bcc0403d6c15e
3
+ metadata.gz: f13c35ae8417fa8b4b41581e65b0bb07a48b28e2
4
+ data.tar.gz: b619e2e61b5561465ddd422b3ebf20c11881c5f7
5
5
  SHA512:
6
- metadata.gz: 15922cda8bdba95c3394236368a3e85a7047b3e862a58dce9a5273114e7b56109eb249c3c243a4a38cf63008051835f5dcf1651020c8bd8358ee9bbd323a5f6a
7
- data.tar.gz: f7439b97caaccab1516c6efada558c6d580f14d6fbc61ea29d9a3365a17c0557886e528d769458f0674e95d96eb8fb980090b3ad0ddda52778cbe8650f9564ec
6
+ metadata.gz: 157ad4385c43a9819713a1f0f03235d3012d68476adea0ccc201f1daa1ee75470c67c183225a46ebf0a6638134e2a216ecd2f6926ed391540ab365f8eca0cda7
7
+ data.tar.gz: 45246ed9e9e49572b350d39dd947a78abe76a7f584c38357087d26de5efa3a5a1bd5aadf1a554ada54c0ebd16f172ff579b8e7bea2b82b4bcb6a725a5910652d
data/CHANGELOG.md CHANGED
@@ -3,5 +3,6 @@ Version History
3
3
  * All version update notes will be included here.
4
4
  ----
5
5
 
6
+ * **1.0.1** Adjust Query String for proper routing.
6
7
  * **1.0.0** 100% Testing Included. Refactoring to the way you call convenience functions has changed, you must now change
7
8
  your previous function calls to what has been updated in the [Readme file](https://github.com/JMolinaro/usabilla_api/blob/master/README.md) under Usage.
data/README.md CHANGED
@@ -54,11 +54,11 @@ def show
54
54
  end
55
55
  ```
56
56
  ```
57
- # View /show.html.rb
57
+ # View /show.html.erb
58
58
  <h2>Buttons</h2>
59
59
  <% @buttons.each do |button| %>
60
- Button ID: <% button.id %>
61
- Button Name: <% button.name %>
60
+ Button ID: <%= button.id %>
61
+ Button Name: <%= button.name %>
62
62
  <% end %>
63
63
  ```
64
64
 
@@ -6,21 +6,17 @@ module UsabillaApi
6
6
  class << self
7
7
 
8
8
  def retrieve(params)
9
- request = UsabillaApi.api_client.new(params).get_buttons
10
- request = UsabillaApi.response.new(JSON.parse(request)).buttons unless return_json_response
11
- request
9
+ request = JSON.parse(UsabillaApi.api_client.new(params).get_buttons)
10
+ response = UsabillaApi.response.new(request)
11
+ response.items = response.items.map {|item| UsabillaApi::Models::Button::Item.new(item)} unless response.items.nil?
12
+ response
12
13
  end
13
14
 
14
15
  def feedback(params)
15
- request = UsabillaApi.api_client.new(params).get_feedback_items
16
- request = UsabillaApi.response.new(JSON.parse(request)).feedback_items unless return_json_response
17
- request
18
- end
19
-
20
- private
21
-
22
- def return_json_response
23
- UsabillaApi.configuration.json_response
16
+ request = JSON.parse(UsabillaApi.api_client.new(params).get_feedback_items)
17
+ response = UsabillaApi.response.new(request)
18
+ response.items = response.items.map {|item| UsabillaApi::Models::Feedback::Item.new(item)} unless response.items.nil?
19
+ response
24
20
  end
25
21
 
26
22
  end
@@ -6,21 +6,17 @@ module UsabillaApi
6
6
  class << self
7
7
 
8
8
  def retrieve(params)
9
- request = UsabillaApi.api_client.new(params).get_campaigns
10
- request = UsabillaApi.response.new(JSON.parse(request)).campaign unless return_json_response
11
- request
9
+ request = JSON.parse(UsabillaApi.api_client.new(params).get_campaigns)
10
+ response = UsabillaApi.response.new(request)
11
+ response.items = response.items.map {|item| UsabillaApi::Models::Campaign::Item.new(item)} unless response.items.nil?
12
+ response
12
13
  end
13
14
 
14
15
  def results(params)
15
- request = UsabillaApi.api_client.new(params).get_campaign_results
16
- request = UsabillaApi.response.new(JSON.parse(request)).campaign_results unless return_json_response
17
- request
18
- end
19
-
20
- private
21
-
22
- def return_json_response
23
- UsabillaApi.configuration.json_response
16
+ request = JSON.parse(UsabillaApi.api_client.new(params).get_campaign_results)
17
+ response = UsabillaApi.response.new(request)
18
+ response.items = response.items.map {|item| UsabillaApi::Models::CampaignResults::Item.new(item)} unless response.items.nil?
19
+ response
24
20
  end
25
21
 
26
22
  end
@@ -20,7 +20,6 @@ module UsabillaApi
20
20
  @host = 'data.usabilla.com'
21
21
  @base_scope = '/live/website'
22
22
  @base_uri = @host_protocol + @host + @base_scope
23
- @json_response = false
24
23
  set_default_api_uris
25
24
  set_attr_accessors
26
25
  end
@@ -10,21 +10,6 @@ module UsabillaApi
10
10
  @last_time_stamp = args['lastTimestamp'] || nil
11
11
  end
12
12
 
13
- def buttons
14
- @items = @items.map {|item| UsabillaApi::Models::Button::Item.new(item)} unless @items.nil?
15
- end
16
-
17
- def feedback_items
18
- @items = @items.map {|item| UsabillaApi::Models::Feedback::Item.new(item)} unless @items.nil?
19
- end
20
-
21
- def campaign
22
- @items = @items.map {|item| UsabillaApi::Models::Campaign::Item.new(item)} unless @items.nil?
23
- end
24
-
25
- def campaign_results
26
- @items = @items.map {|item| UsabillaApi::Models::CampaignResults::Item.new(item)} unless @items.nil?
27
- end
28
13
  end
29
14
  end
30
15
  end
@@ -1,3 +1,3 @@
1
1
  module UsabillaApi
2
- VERSION = '1.0.1'
2
+ VERSION = '1.1.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usabilla_api
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
  - Jon Molinaro