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 +5 -5
- data/README.md +1 -1
- data/lib/promoter/metric.rb +4 -3
- data/lib/promoter/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b9333711f05054354742338ee9ac3bbc11cf8084c00704a3eabdc8798101ce14
|
4
|
+
data.tar.gz: bd2a3247c8ef872f1a7d988c6230e28ca0a0d998f9bb96bbcaf152764d1455ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 713c0eb3148eda34d126594cdf2b98e7b8d35fa2148893269a6cf90d1f102d79a2cb02a0f520c33170459ef444f234d88ac06e45b734877725b3af87447452f1
|
7
|
+
data.tar.gz: 8c0629627da499b1610a0d896926b7c8cc6b3a1e823c8f00442b04fa3a9d8444739652215f7d6117aa80ad12c8c55544e4a1366118619ddace1f0c3c97a2481a
|
data/README.md
CHANGED
data/lib/promoter/metric.rb
CHANGED
@@ -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["
|
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
|
-
|
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
|
|
data/lib/promoter/version.rb
CHANGED
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.
|
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:
|
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.
|
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
|