constant-contact-ruby 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -0
- data/README.rdoc +4 -4
- data/VERSION.yml +1 -1
- data/constant-contact-ruby.gemspec +3 -2
- data/lib/constant_contact/activity.rb +4 -2
- data/lib/constant_contact/contact_list.rb +6 -1
- metadata +3 -2
data/CHANGELOG
ADDED
data/README.rdoc
CHANGED
@@ -50,10 +50,10 @@ HTTParty gem - http://rubygems.org/gems/httparty
|
|
50
50
|
Activity.remove_all_contacts_from_lists( 1, 3, 4 ) # remove all contacts from lists 1, 3, and 4
|
51
51
|
|
52
52
|
new_contacts = [
|
53
|
-
{ :email_address
|
54
|
-
{ :email_address
|
55
|
-
{ :email_address
|
56
|
-
{ :email_address
|
53
|
+
{ :email_address => 'user1@example.com', :first_name => 'User1', :last_name => 'test' },
|
54
|
+
{ :email_address => 'user2@example.com', :first_name => 'User2', :last_name => 'test 2' },
|
55
|
+
{ :email_address => 'user3@example.com', :first_name => 'User1' },
|
56
|
+
{ :email_address => 'user4@example.com' }
|
57
57
|
]
|
58
58
|
Activity.add_contacts_to_lists( new_contacts, 3, 4 ) # all the users array to lists 3 and 4
|
59
59
|
Activity.remove_contacts_from_lists( new_contacts, 4 ) # remove the users from list 4
|
data/VERSION.yml
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{constant-contact-ruby}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Craig P Jolicoeur"]
|
12
|
-
s.date = %q{2010-03-
|
12
|
+
s.date = %q{2010-03-04}
|
13
13
|
s.description = %q{Ruby wrapper around the Constant Contact REST API}
|
14
14
|
s.email = %q{cpjolicoeur@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.files = [
|
21
21
|
".document",
|
22
22
|
".gitignore",
|
23
|
+
"CHANGELOG",
|
23
24
|
"LICENSE",
|
24
25
|
"README.rdoc",
|
25
26
|
"Rakefile",
|
@@ -41,8 +41,10 @@ module ConstantContact
|
|
41
41
|
data = ConstantContact.get( '/activities', options )
|
42
42
|
return activities if ( data.nil? or data.empty? or data['feed']['entry'].nil? )
|
43
43
|
|
44
|
-
data['feed']['entry'].
|
45
|
-
activities << new( entry )
|
44
|
+
if( data['feed']['entry'].is_a?(Array) )
|
45
|
+
data['feed']['entry'].each { |entry| activities << new( entry ) }
|
46
|
+
else
|
47
|
+
activities << new( data['feed']['entry'] )
|
46
48
|
end
|
47
49
|
|
48
50
|
activities
|
@@ -92,7 +92,12 @@ module ConstantContact
|
|
92
92
|
def self.members( id, options={} )
|
93
93
|
members = ConstantContact.get( "/lists/#{id.to_s}/members", options )
|
94
94
|
return nil if ( members.nil? or members.empty? )
|
95
|
-
|
95
|
+
|
96
|
+
if( members['feed']['entry'].is_a?(Array) )
|
97
|
+
members['feed']['entry'].collect { |entry| Contact.new( entry, '', true ) }
|
98
|
+
else
|
99
|
+
Contact.new( members['feed']['entry'], '', true )
|
100
|
+
end
|
96
101
|
end
|
97
102
|
|
98
103
|
# Returns the objects API URI
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: constant-contact-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Craig P Jolicoeur
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-03-
|
12
|
+
date: 2010-03-04 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -26,6 +26,7 @@ extra_rdoc_files:
|
|
26
26
|
files:
|
27
27
|
- .document
|
28
28
|
- .gitignore
|
29
|
+
- CHANGELOG
|
29
30
|
- LICENSE
|
30
31
|
- README.rdoc
|
31
32
|
- Rakefile
|