promoter 0.1.7 → 0.1.8

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: a1919110c9915e91b39eb2a6bb0a0c7074975a0d
4
- data.tar.gz: 2f37ea5eb45ce3f7ce8324ffc6ce5648f997dd12
3
+ metadata.gz: 8c64eec01edb7194390f6c905a3f0b2c1c5bd069
4
+ data.tar.gz: 2206223ddd7d844f3414974145efd72651590a84
5
5
  SHA512:
6
- metadata.gz: 539806089030b64fbec126a2ecb7448f11ee1ff1d6a02ff8d9b9c3c2476f3608a4ded699c2b9652de27d80fdf27d3698f33441df3b8e174a5cd75b685cf4cb42
7
- data.tar.gz: bcbbc54063e1a3d11aa5a7b8f729266d649eb176f1cfda4dba9a5e691ef3e0725f8ec3a1886946bb1c5817873fa19940d573d18fbbce852220189e79e8a84592
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(email: "me@me.com",
153
- contact_id: 15777)
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(contact_id: 15777)
159
+ Promoter::ContactList.remove_contact(contact_email: "me@me.com")
160
160
  ```
161
161
 
162
162
  ## Email Templates
@@ -19,10 +19,11 @@ module Promoter
19
19
  Contact.destroy(self.email)
20
20
  end
21
21
 
22
- # Parameter Optional? Description
23
- # page yes Returns which page of results to return.
24
- # Defaults to 1
25
- # email yes Filter the results by email address.
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
@@ -1,3 +1,3 @@
1
1
  module Promoter
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
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.7
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-04 00:00:00.000000000 Z
11
+ date: 2016-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler