promoter 0.1.7 → 0.1.8
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 +4 -4
- data/README.md +4 -4
- data/lib/promoter/contact.rb +12 -6
- data/lib/promoter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c64eec01edb7194390f6c905a3f0b2c1c5bd069
|
4
|
+
data.tar.gz: 2206223ddd7d844f3414974145efd72651590a84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 185366e12c7af55af70f00959019814016fd43e42e2791b7f01539851cd374402018d807895b30816e1185677a751f47fb6d293bb263d21d17b91ae01ca1df5a
|
7
|
+
data.tar.gz: f307b36a0ffb83cbda8c05daa93d9073e0b3731b07c4532541a4fc7f5b69f198fb8fcdb3f799cdad4b4173f727fb69f56153400b8208add9c60af6328bd2391d
|
data/README.md
CHANGED
@@ -143,20 +143,20 @@ Promoter::ContactList.contact_ids_for(2)
|
|
143
143
|
|
144
144
|
```ruby
|
145
145
|
Promoter::ContactList.remove_contact(contact_list_id: 7899,
|
146
|
-
contact_id: 15777)
|
146
|
+
contact_id: 15777)
|
147
147
|
```
|
148
148
|
|
149
149
|
### Remove a contact from a contact list by email
|
150
150
|
|
151
151
|
```ruby
|
152
|
-
Promoter::ContactList.remove_contact(
|
153
|
-
|
152
|
+
Promoter::ContactList.remove_contact(contact_list_id: 7899,
|
153
|
+
email: "me@me.com")
|
154
154
|
```
|
155
155
|
|
156
156
|
### Remove a contact from all contact lists
|
157
157
|
|
158
158
|
```ruby
|
159
|
-
Promoter::ContactList.remove_contact(
|
159
|
+
Promoter::ContactList.remove_contact(contact_email: "me@me.com")
|
160
160
|
```
|
161
161
|
|
162
162
|
## Email Templates
|
data/lib/promoter/contact.rb
CHANGED
@@ -19,10 +19,11 @@ module Promoter
|
|
19
19
|
Contact.destroy(self.email)
|
20
20
|
end
|
21
21
|
|
22
|
-
# Parameter
|
23
|
-
# page
|
24
|
-
#
|
25
|
-
# email
|
22
|
+
# Parameter Optional? Description
|
23
|
+
# page yes Returns which page of results to return. Defaults to 1
|
24
|
+
#
|
25
|
+
# email yes Filter the results by email address.
|
26
|
+
# contact_list_id yes Filter the results by contact list
|
26
27
|
def self.all(options={})
|
27
28
|
if !options.is_a?(Hash)
|
28
29
|
puts "-- DEPRECATION WARNING--"
|
@@ -31,10 +32,15 @@ module Promoter
|
|
31
32
|
else
|
32
33
|
# default to first page
|
33
34
|
options[:page] ||= 1
|
35
|
+
|
36
|
+
if options.key?(:contact_list_id)
|
37
|
+
options[:contact_list__id] = options.delete(:contact_list_id)
|
38
|
+
end
|
39
|
+
|
34
40
|
query_string = URI.encode_www_form(options)
|
35
41
|
end
|
36
42
|
response = Request.get("#{API_URL}/?#{query_string}")
|
37
|
-
response['results'].map {|attrs| new(attrs)}
|
43
|
+
response['results'].map { |attrs| new(attrs) }
|
38
44
|
end
|
39
45
|
|
40
46
|
def self.find(id)
|
@@ -80,4 +86,4 @@ module Promoter
|
|
80
86
|
end
|
81
87
|
|
82
88
|
end
|
83
|
-
end
|
89
|
+
end
|
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.1.
|
4
|
+
version: 0.1.8
|
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: 2016-10-
|
11
|
+
date: 2016-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|