constant_contact 1.1.5 → 1.1.6
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.
- data/README.md +1 -1
- data/lib/constant_contact/base.rb +2 -2
- data/lib/constant_contact/list.rb +7 -0
- data/lib/constant_contact/version.rb +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -49,7 +49,7 @@ All examples require setting up either the specific class you'll be use or the B
|
|
49
49
|
### Find a Contact By Email Address, Check if They're a Member of the Default List
|
50
50
|
|
51
51
|
c = ConstantContact::Contact.find_by_email('jon@example.com')
|
52
|
-
@contact = ConstantContact::Contact.find(
|
52
|
+
@contact = ConstantContact::Contact.find(c.int_id) # Because Constant Contact doesn't return a full contact when searching by email
|
53
53
|
puts 'In default contact list.' if @contact.contact_lists.include?(1) # contact_lists is an array of list ids
|
54
54
|
|
55
55
|
|
@@ -133,9 +133,9 @@ module ConstantContact
|
|
133
133
|
"<entry xmlns=\"http://www.w3.org/2005/Atom\">
|
134
134
|
<title type=\"text\"> </title>
|
135
135
|
<updated>#{Time.now.strftime(DATE_FORMAT)}</updated>
|
136
|
-
<author
|
136
|
+
<author></author>
|
137
137
|
<id>#{id.blank? ? 'data:,none' : id}</id>
|
138
|
-
<summary type=\"text\"
|
138
|
+
<summary type=\"text\">#{self.class.name.split('::').last}</summary>
|
139
139
|
<content type=\"application/vnd.ctct+xml\">
|
140
140
|
#{self.to_xml}
|
141
141
|
</content>
|
@@ -3,6 +3,13 @@ module ConstantContact
|
|
3
3
|
|
4
4
|
# @@column_names = [:contact_count, :display_on_signup, :members, :name, :opt_in_default, :short_name, :sort_order]
|
5
5
|
|
6
|
+
def to_xml
|
7
|
+
xml = Builder::XmlMarkup.new
|
8
|
+
xml.tag!("ContactList", :xmlns => "http://ws.constantcontact.com/ns/1.0/") do
|
9
|
+
self.attributes.each{|k, v| xml.tag!( k.to_s.camelize, v )}
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
6
13
|
def self.find_by_name(name)
|
7
14
|
lists = self.find :all
|
8
15
|
lists.find{|list| list.Name == name}
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: constant_contact
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 6
|
10
|
+
version: 1.1.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tim Case
|
@@ -18,7 +18,7 @@ autorequire:
|
|
18
18
|
bindir: bin
|
19
19
|
cert_chain: []
|
20
20
|
|
21
|
-
date: 2010-
|
21
|
+
date: 2010-10-26 00:00:00 -04:00
|
22
22
|
default_executable:
|
23
23
|
dependencies:
|
24
24
|
- !ruby/object:Gem::Dependency
|