promoter 0.1.9 → 0.2.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
- SHA1:
3
- metadata.gz: 1bc0ad6413d70db9e8c90fd3fbb892350aaa8810
4
- data.tar.gz: ec101558dc9fd53bfe8d63c18f397bae9a7b6f1e
2
+ SHA256:
3
+ metadata.gz: b9333711f05054354742338ee9ac3bbc11cf8084c00704a3eabdc8798101ce14
4
+ data.tar.gz: bd2a3247c8ef872f1a7d988c6230e28ca0a0d998f9bb96bbcaf152764d1455ac
5
5
  SHA512:
6
- metadata.gz: 015822735ba7e70eb7360245419bdb77b8364238e2cfed146cb7049ccff7d0b60b8959eeeb8b454d57b70b56aa7a308abc7e4211747645bab624d2c6c1e77f1c
7
- data.tar.gz: ba6b5340519a0e9b8e873636ed9ec40d8e7728443fab30948ae461eec77824ca049c07a058cb4ed38ebfa2f0e40ee5af1cb511ead9437f019ebec650845a4310
6
+ metadata.gz: 713c0eb3148eda34d126594cdf2b98e7b8d35fa2148893269a6cf90d1f102d79a2cb02a0f520c33170459ef444f234d88ac06e45b734877725b3af87447452f1
7
+ data.tar.gz: 8c0629627da499b1610a0d896926b7c8cc6b3a1e823c8f00442b04fa3a9d8444739652215f7d6117aa80ad12c8c55544e4a1366118619ddace1f0c3c97a2481a
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  promoter is a wrapper for the promoter.io REST API.
4
4
 
5
- You can find the promoter.io api docs here: http://docs.promoter.apiary.io/
5
+ You can find the promoter.io API docs here: https://developers.promoter.io/v1.0/reference
6
6
 
7
7
  ## Installation
8
8
 
@@ -7,13 +7,14 @@ module Promoter
7
7
  API_URL = "https://app.promoter.io/api/metrics"
8
8
 
9
9
  def initialize(attrs)
10
- @campaign_name = attrs["campaign"]
10
+ @campaign_name = attrs["campaign_name"]
11
11
  @nps = attrs["nps"].to_f
12
12
  @organization_nps = attrs["organization_nps"].to_f
13
13
  end
14
14
 
15
- def self.all
16
- response = Request.get("#{API_URL}/")
15
+ def self.all(options={})
16
+ query_string = URI.encode_www_form(options)
17
+ response = Request.get("#{API_URL}/?#{query_string}")
17
18
  response['results'].map {|attrs| new(attrs)}
18
19
  end
19
20
 
@@ -1,3 +1,3 @@
1
1
  module Promoter
2
- VERSION = "0.1.9"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: promoter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris O'Sullivan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-16 00:00:00.000000000 Z
11
+ date: 2018-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  version: '0'
140
140
  requirements: []
141
141
  rubyforge_project:
142
- rubygems_version: 2.6.8
142
+ rubygems_version: 2.7.3
143
143
  signing_key:
144
144
  specification_version: 4
145
145
  summary: promoter is a wrapper for the promoter.io REST API