constant_contact 1.1.6 → 1.2.0
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/lib/constant_contact/campaign.rb +1 -1
- data/lib/constant_contact/campaign_event/bounce_event.rb +9 -0
- data/lib/constant_contact/campaign_event/campaign_event_base.rb +7 -0
- data/lib/constant_contact/campaign_event/forward_event.rb +9 -0
- data/lib/constant_contact/campaign_event/open_event.rb +9 -0
- data/lib/constant_contact/campaign_event/optout_event.rb +9 -0
- data/lib/constant_contact/campaign_event/sent_event.rb +9 -0
- data/lib/constant_contact/contact_event/contact_event_base.rb +7 -0
- data/lib/constant_contact/contact_event/reports_summary.rb +9 -0
- data/lib/constant_contact/contact_event/sent_event.rb +9 -0
- data/lib/constant_contact/event.rb +4 -0
- data/lib/constant_contact/formats/atom_format.rb +4 -0
- data/lib/constant_contact/version.rb +1 -1
- data/lib/constant_contact.rb +10 -2
- data/test/fixtures/senteventscollection.xml +76 -0
- metadata +15 -5
- data/lib/constant_contact/contact_event.rb +0 -7
@@ -17,6 +17,10 @@ module ActiveResource
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def decode(xml)
|
20
|
+
if xml =~ /\<atom\:/
|
21
|
+
xml.gsub!( /\<atom\:/, '<' )
|
22
|
+
xml.gsub!( /\<\/atom\:/, '</' )
|
23
|
+
end
|
20
24
|
return [] if no_content?(xml)
|
21
25
|
result = Hash.from_xml(from_atom_data(xml))
|
22
26
|
is_collection?(xml) ? result['records'] : result.values.first
|
data/lib/constant_contact.rb
CHANGED
@@ -6,10 +6,18 @@ require 'builder'
|
|
6
6
|
require 'cgi' unless defined?(CGI) && defined?(CGI::escape)
|
7
7
|
require File.join(directory, 'constant_contact', 'formats')
|
8
8
|
require File.join(directory, 'constant_contact', 'base')
|
9
|
-
require File.join(directory, 'constant_contact', 'list')
|
9
|
+
require File.join(directory, 'constant_contact', 'list')
|
10
10
|
require File.join(directory, 'constant_contact', 'member')
|
11
11
|
require File.join(directory, 'constant_contact', 'contact')
|
12
12
|
require File.join(directory, 'constant_contact', 'campaign')
|
13
|
-
require File.join(directory, 'constant_contact', '
|
13
|
+
require File.join(directory, 'constant_contact', 'campaign_event', 'campaign_event_base')
|
14
|
+
require File.join(directory, 'constant_contact', 'campaign_event', 'bounce_event')
|
15
|
+
require File.join(directory, 'constant_contact', 'campaign_event', 'forward_event')
|
16
|
+
require File.join(directory, 'constant_contact', 'campaign_event', 'open_event')
|
17
|
+
require File.join(directory, 'constant_contact', 'campaign_event', 'optout_event')
|
18
|
+
require File.join(directory, 'constant_contact', 'campaign_event', 'sent_event')
|
19
|
+
require File.join(directory, 'constant_contact', 'contact_event', 'contact_event_base')
|
20
|
+
require File.join(directory, 'constant_contact', 'contact_event', 'sent_event')
|
21
|
+
require File.join(directory, 'constant_contact', 'contact_event', 'reports_summary')
|
14
22
|
require File.join(directory, 'constant_contact', 'activity')
|
15
23
|
require File.join(directory, 'constant_contact', 'email_address')
|
@@ -0,0 +1,76 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<feed xmlns="http://www.w3.org/2005/Atom">
|
3
|
+
<id>http://api.constantcontact.com/ws/customers/dtjohnsospam/campaigns/1103842030678/events/sends</id>
|
4
|
+
<title type="text">Send Events for Customer: dtjohnsospam, Campaign id: 1103842030678</title>
|
5
|
+
<link href="sends"></link>
|
6
|
+
<link href="sends" rel="self"></link>
|
7
|
+
<author>
|
8
|
+
<name>dtjohnsospam</name>
|
9
|
+
</author>
|
10
|
+
<updated>2010-10-28T20:56:31.199Z</updated>
|
11
|
+
<link href="/ws/customers/dtjohnsospam/campaigns/1103842030678/events/sends" rel="first"></link>
|
12
|
+
<link href="/ws/customers/dtjohnsospam/campaigns/1103842030678/events/sends" rel="current"></link>
|
13
|
+
<entry>
|
14
|
+
<id>http://api.constantcontact.com/ws/customers/dtjohnsospam/events/sends/1103842030678,4,1288295117783</id>
|
15
|
+
<title type="text">Email Send Event for Customer: dtjohnsospam, Campaign: http://api.constantcontact.com/ws/customers/dtjohnsospam/campaigns/1103842030678</title>
|
16
|
+
<updated>2010-10-28T19:45:17.783Z</updated>
|
17
|
+
<author>
|
18
|
+
<name>Constant Contact</name>
|
19
|
+
</author>
|
20
|
+
<content type="application/vnd.ctct+xml">
|
21
|
+
<SentEvent xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/dtjohnsospam/events/sends/1103842030678,4,1288295117783">
|
22
|
+
<Contact id="http://api.constantcontact.com/ws/customers/dtjohnsospam/contacts/4">
|
23
|
+
<EmailAddress>daniel@webs.com</EmailAddress>
|
24
|
+
<link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/dtjohnsospam/contacts/4" rel="self"></link>
|
25
|
+
</Contact>
|
26
|
+
<Campaign id="http://api.constantcontact.com/ws/customers/dtjohnsospam/campaigns/1103842030678">
|
27
|
+
<link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/dtjohnsospam/campaigns/1103842030678" rel="self"></link>
|
28
|
+
<Name>Oct 28 2010</Name>
|
29
|
+
</Campaign>
|
30
|
+
<EventTime>2010-10-28T19:45:17.783Z</EventTime>
|
31
|
+
</SentEvent>
|
32
|
+
</content>
|
33
|
+
</entry>
|
34
|
+
<entry>
|
35
|
+
<id>http://api.constantcontact.com/ws/customers/dtjohnsospam/events/sends/1103842030678,3,1288295117733</id>
|
36
|
+
<title type="text">Email Send Event for Customer: dtjohnsospam, Campaign: http://api.constantcontact.com/ws/customers/dtjohnsospam/campaigns/1103842030678</title>
|
37
|
+
<updated>2010-10-28T19:45:17.733Z</updated>
|
38
|
+
<author>
|
39
|
+
<name>Constant Contact</name>
|
40
|
+
</author>
|
41
|
+
<content type="application/vnd.ctct+xml">
|
42
|
+
<SentEvent xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/dtjohnsospam/events/sends/1103842030678,3,1288295117733">
|
43
|
+
<Contact id="http://api.constantcontact.com/ws/customers/dtjohnsospam/contacts/3">
|
44
|
+
<EmailAddress>idris@umd.edu</EmailAddress>
|
45
|
+
<link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/dtjohnsospam/contacts/3" rel="self"></link>
|
46
|
+
</Contact>
|
47
|
+
<Campaign id="http://api.constantcontact.com/ws/customers/dtjohnsospam/campaigns/1103842030678">
|
48
|
+
<link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/dtjohnsospam/campaigns/1103842030678" rel="self"></link>
|
49
|
+
<Name>Oct 28 2010</Name>
|
50
|
+
</Campaign>
|
51
|
+
<EventTime>2010-10-28T19:45:17.733Z</EventTime>
|
52
|
+
</SentEvent>
|
53
|
+
</content>
|
54
|
+
</entry>
|
55
|
+
<entry>
|
56
|
+
<id>http://api.constantcontact.com/ws/customers/dtjohnsospam/events/sends/1103842030678,2,1288295117649</id>
|
57
|
+
<title type="text">Email Send Event for Customer: dtjohnsospam, Campaign: http://api.constantcontact.com/ws/customers/dtjohnsospam/campaigns/1103842030678</title>
|
58
|
+
<updated>2010-10-28T19:45:17.649Z</updated>
|
59
|
+
<author>
|
60
|
+
<name>Constant Contact</name>
|
61
|
+
</author>
|
62
|
+
<content type="application/vnd.ctct+xml">
|
63
|
+
<SentEvent xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/dtjohnsospam/events/sends/1103842030678,2,1288295117649">
|
64
|
+
<Contact id="http://api.constantcontact.com/ws/customers/dtjohnsospam/contacts/2">
|
65
|
+
<EmailAddress>hoverwhat@gmail.com</EmailAddress>
|
66
|
+
<link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/dtjohnsospam/contacts/2" rel="self"></link>
|
67
|
+
</Contact>
|
68
|
+
<Campaign id="http://api.constantcontact.com/ws/customers/dtjohnsospam/campaigns/1103842030678">
|
69
|
+
<link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/dtjohnsospam/campaigns/1103842030678" rel="self"></link>
|
70
|
+
<Name>Oct 28 2010</Name>
|
71
|
+
</Campaign>
|
72
|
+
<EventTime>2010-10-28T19:45:17.649Z</EventTime>
|
73
|
+
</SentEvent>
|
74
|
+
</content>
|
75
|
+
</entry>
|
76
|
+
</feed>
|
metadata
CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 1.
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 1.2.0
|
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-10-
|
21
|
+
date: 2010-10-29 00:00:00 -04:00
|
22
22
|
default_executable:
|
23
23
|
dependencies:
|
24
24
|
- !ruby/object:Gem::Dependency
|
@@ -133,9 +133,18 @@ files:
|
|
133
133
|
- lib/constant_contact/activity.rb
|
134
134
|
- lib/constant_contact/base.rb
|
135
135
|
- lib/constant_contact/campaign.rb
|
136
|
+
- lib/constant_contact/campaign_event/bounce_event.rb
|
137
|
+
- lib/constant_contact/campaign_event/campaign_event_base.rb
|
138
|
+
- lib/constant_contact/campaign_event/forward_event.rb
|
139
|
+
- lib/constant_contact/campaign_event/open_event.rb
|
140
|
+
- lib/constant_contact/campaign_event/optout_event.rb
|
141
|
+
- lib/constant_contact/campaign_event/sent_event.rb
|
136
142
|
- lib/constant_contact/contact.rb
|
137
|
-
- lib/constant_contact/contact_event.rb
|
143
|
+
- lib/constant_contact/contact_event/contact_event_base.rb
|
144
|
+
- lib/constant_contact/contact_event/reports_summary.rb
|
145
|
+
- lib/constant_contact/contact_event/sent_event.rb
|
138
146
|
- lib/constant_contact/email_address.rb
|
147
|
+
- lib/constant_contact/event.rb
|
139
148
|
- lib/constant_contact/formats/atom_format.rb
|
140
149
|
- lib/constant_contact/formats/html_encoded_format.rb
|
141
150
|
- lib/constant_contact/formats.rb
|
@@ -157,6 +166,7 @@ files:
|
|
157
166
|
- test/fixtures/multiple_contacts_by_emails.xml
|
158
167
|
- test/fixtures/new_list.xml
|
159
168
|
- test/fixtures/nocontent.xml
|
169
|
+
- test/fixtures/senteventscollection.xml
|
160
170
|
- test/fixtures/service_document.xml
|
161
171
|
- test/fixtures/single_contact_by_email.xml
|
162
172
|
- test/fixtures/single_contact_by_id.xml
|