contactology 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. data/.infinity_test +1 -1
  2. data/.travis.yml +5 -0
  3. data/Gemfile +3 -0
  4. data/README.markdown +64 -0
  5. data/Rakefile +4 -0
  6. data/contactology.gemspec +1 -0
  7. data/lib/contactology.rb +2 -0
  8. data/lib/contactology/api.rb +2 -0
  9. data/lib/contactology/basic_object.rb +2 -0
  10. data/lib/contactology/campaign.rb +2 -0
  11. data/lib/contactology/campaign/preview.rb +2 -0
  12. data/lib/contactology/campaigns.rb +2 -0
  13. data/lib/contactology/campaigns/standard.rb +2 -0
  14. data/lib/contactology/campaigns/transactional.rb +2 -0
  15. data/lib/contactology/configuration.rb +2 -0
  16. data/lib/contactology/contact.rb +2 -0
  17. data/lib/contactology/errors.rb +2 -0
  18. data/lib/contactology/issue.rb +2 -0
  19. data/lib/contactology/issues.rb +2 -0
  20. data/lib/contactology/list.rb +2 -0
  21. data/lib/contactology/list_proxy.rb +2 -0
  22. data/lib/contactology/parser.rb +35 -0
  23. data/lib/contactology/send_result.rb +2 -0
  24. data/lib/contactology/stash.rb +2 -0
  25. data/lib/contactology/transactional_message.rb +2 -0
  26. data/lib/contactology/version.rb +3 -1
  27. data/spec/contactology.example.yml +1 -0
  28. data/spec/factories/campaigns.rb +2 -0
  29. data/spec/factories/contacts.rb +2 -0
  30. data/spec/factories/issues.rb +2 -0
  31. data/spec/factories/lists.rb +2 -0
  32. data/spec/factories/transactional_messages.rb +2 -0
  33. data/spec/fixtures/net/campaign/destroy.yml +170 -168
  34. data/spec/fixtures/net/campaign/find/success.yml +227 -120
  35. data/spec/fixtures/net/campaign/find_by_name/success.yml +215 -143
  36. data/spec/fixtures/net/campaign/preview.yml +136 -61
  37. data/spec/models/contactology/api_spec.rb +2 -0
  38. data/spec/models/contactology/campaign_spec.rb +6 -3
  39. data/spec/models/contactology/campaigns/standard_spec.rb +2 -0
  40. data/spec/models/contactology/campaigns/transactional_spec.rb +2 -0
  41. data/spec/models/contactology/configuration_spec.rb +2 -0
  42. data/spec/models/contactology/contact_spec.rb +2 -0
  43. data/spec/models/contactology/issues_spec.rb +2 -0
  44. data/spec/models/contactology/list_spec.rb +2 -0
  45. data/spec/models/contactology/send_result_spec.rb +2 -0
  46. data/spec/models/contactology/stash_spec.rb +2 -0
  47. data/spec/models/contactology/transactional_message_spec.rb +2 -0
  48. data/spec/models/contactology_spec.rb +2 -0
  49. data/spec/requests/contacts_spec.rb +2 -0
  50. data/spec/spec_helper.rb +2 -0
  51. data/spec/support/contactology.rb +2 -0
  52. data/spec/support/factory_girl.rb +2 -0
  53. data/spec/support/vcr.rb +2 -0
  54. metadata +98 -87
@@ -1,176 +1,283 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
4
  method: :get
5
5
  uri: https://api.emailcampaigns.net:443/2/REST/?key=%{API_KEY}&method=List_Add_Public&name=Factory%20List
6
- body:
7
- headers:
8
- accept:
6
+ body: !!null
7
+ headers:
8
+ accept:
9
9
  - application/json
10
- user-agent:
11
- - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.7.1)
12
- response: !ruby/struct:VCR::Response
13
- status: !ruby/struct:VCR::ResponseStatus
10
+ user-agent:
11
+ - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
12
+ response: !ruby/struct:VCR::Response
13
+ status: !ruby/struct:VCR::ResponseStatus
14
14
  code: 200
15
15
  message: OK
16
- headers:
17
- x-powered-by:
16
+ headers:
17
+ x-powered-by:
18
18
  - PHP/5.2.10
19
- set-cookie:
20
- - PHPSESSID=d0c92f636747f8500d31d570731879aa; path=/
21
- expires:
19
+ set-cookie:
20
+ - PHPSESSID=fbe709a3664a92976ba4613dd4432c0a; path=/
21
+ expires:
22
22
  - Thu, 19 Nov 1981 08:52:00 GMT
23
- cache-control:
23
+ cache-control:
24
24
  - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
25
- pragma:
25
+ pragma:
26
26
  - no-cache
27
- content-type:
27
+ content-type:
28
28
  - text/plain;charset=UTF-8
29
- transfer-encoding:
29
+ transfer-encoding:
30
30
  - chunked
31
- date:
32
- - Wed, 03 Aug 2011 18:24:19 GMT
33
- server:
31
+ date:
32
+ - Thu, 04 Aug 2011 01:43:52 GMT
33
+ server:
34
34
  - lighttpd/1.4.28
35
- body: "48"
36
- http_version: "1.1"
37
- - !ruby/struct:VCR::HTTPInteraction
38
- request: !ruby/struct:VCR::Request
35
+ body: '50'
36
+ http_version: '1.1'
37
+ - !ruby/struct:VCR::HTTPInteraction
38
+ request: !ruby/struct:VCR::Request
39
39
  method: :get
40
- uri: https://api.emailcampaigns.net:443/2/REST/?key=%{API_KEY}&listId=48&method=List_Get_Info
41
- body:
42
- headers:
43
- accept:
40
+ uri: https://api.emailcampaigns.net:443/2/REST/?key=%{API_KEY}&listId=50&method=List_Get_Info
41
+ body: !!null
42
+ headers:
43
+ accept:
44
44
  - application/json
45
- user-agent:
46
- - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.7.1)
47
- response: !ruby/struct:VCR::Response
48
- status: !ruby/struct:VCR::ResponseStatus
45
+ user-agent:
46
+ - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
47
+ response: !ruby/struct:VCR::Response
48
+ status: !ruby/struct:VCR::ResponseStatus
49
49
  code: 200
50
50
  message: OK
51
- headers:
52
- x-powered-by:
51
+ headers:
52
+ x-powered-by:
53
53
  - PHP/5.2.10
54
- set-cookie:
55
- - PHPSESSID=200b30d60da4119f08f00ed7f450b6ed; path=/
56
- expires:
54
+ set-cookie:
55
+ - PHPSESSID=e549ac392d0c56c035af3bca543d6ddc; path=/
56
+ expires:
57
57
  - Thu, 19 Nov 1981 08:52:00 GMT
58
- cache-control:
58
+ cache-control:
59
59
  - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
60
- pragma:
60
+ pragma:
61
61
  - no-cache
62
- content-type:
62
+ content-type:
63
63
  - text/plain;charset=UTF-8
64
- transfer-encoding:
64
+ transfer-encoding:
65
65
  - chunked
66
- date:
67
- - Wed, 03 Aug 2011 18:24:30 GMT
68
- server:
66
+ date:
67
+ - Thu, 04 Aug 2011 01:43:53 GMT
68
+ server:
69
69
  - lighttpd/1.4.28
70
- body: "{\"listId\":\"48\",\"name\":\"Factory List\",\"description\":null,\"type\":\"public\",\"optIn\":false}"
71
- http_version: "1.1"
72
- - !ruby/struct:VCR::HTTPInteraction
73
- request: !ruby/struct:VCR::Request
70
+ body: ! '{"listId":"50","name":"Factory List","description":null,"type":"public","optIn":false}'
71
+ http_version: '1.1'
72
+ - !ruby/struct:VCR::HTTPInteraction
73
+ request: !ruby/struct:VCR::Request
74
74
  method: :get
75
- uri: https://api.emailcampaigns.net:443/2/REST/?campaignName=factory%20campaign&key=%{API_KEY}&method=Campaign_Create_Standard&senderEmail=nate@envylabs.com&senderName=Nate%20Bibler&subject=Factory%20Campaign%20Message&content%5Btext%5D=This%20is%20a%20good%20message!%20%7BCOMPANY_ADDRESS%7D&recipients%5Blist%5D=48
76
- body:
77
- headers:
78
- accept:
75
+ uri: https://api.emailcampaigns.net:443/2/REST/?campaignName=factory%20campaign&key=%{API_KEY}&method=Campaign_Create_Standard&senderEmail=nate@envylabs.com&senderName=Nate%20Bibler&subject=Factory%20Campaign%20Message&content%5Btext%5D=This%20is%20a%20good%20message!%20%7BCOMPANY_ADDRESS%7D&recipients%5Blist%5D=50
76
+ body: !!null
77
+ headers:
78
+ accept:
79
79
  - application/json
80
- user-agent:
81
- - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.7.1)
82
- response: !ruby/struct:VCR::Response
83
- status: !ruby/struct:VCR::ResponseStatus
80
+ user-agent:
81
+ - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
82
+ response: !ruby/struct:VCR::Response
83
+ status: !ruby/struct:VCR::ResponseStatus
84
84
  code: 200
85
85
  message: OK
86
- headers:
87
- x-powered-by:
86
+ headers:
87
+ x-powered-by:
88
88
  - PHP/5.2.10
89
- set-cookie:
90
- - PHPSESSID=3d447eedd05bb105d95e91436d977b25; path=/
91
- expires:
89
+ set-cookie:
90
+ - PHPSESSID=017ebe0387a592b2058e5dc7213020aa; path=/
91
+ expires:
92
92
  - Thu, 19 Nov 1981 08:52:00 GMT
93
- cache-control:
93
+ cache-control:
94
94
  - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
95
- pragma:
95
+ pragma:
96
96
  - no-cache
97
- content-type:
97
+ content-type:
98
98
  - text/plain;charset=UTF-8
99
- transfer-encoding:
99
+ transfer-encoding:
100
100
  - chunked
101
- date:
102
- - Wed, 03 Aug 2011 18:24:31 GMT
103
- server:
101
+ date:
102
+ - Thu, 04 Aug 2011 01:43:42 GMT
103
+ server:
104
104
  - lighttpd/1.4.28
105
- body: "35"
106
- http_version: "1.1"
107
- - !ruby/struct:VCR::HTTPInteraction
108
- request: !ruby/struct:VCR::Request
105
+ body: '44'
106
+ http_version: '1.1'
107
+ - !ruby/struct:VCR::HTTPInteraction
108
+ request: !ruby/struct:VCR::Request
109
109
  method: :get
110
- uri: https://api.emailcampaigns.net:443/2/REST/?campaignId=35&key=%{API_KEY}&method=Campaign_Get_Info
111
- body:
112
- headers:
113
- accept:
110
+ uri: https://api.emailcampaigns.net:443/2/REST/?campaignId=44&key=%{API_KEY}&method=Campaign_Get_Info
111
+ body: !!null
112
+ headers:
113
+ accept:
114
114
  - application/json
115
- user-agent:
116
- - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.7.1)
117
- response: !ruby/struct:VCR::Response
118
- status: !ruby/struct:VCR::ResponseStatus
115
+ user-agent:
116
+ - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
117
+ response: !ruby/struct:VCR::Response
118
+ status: !ruby/struct:VCR::ResponseStatus
119
119
  code: 200
120
120
  message: OK
121
- headers:
122
- x-powered-by:
121
+ headers:
122
+ x-powered-by:
123
123
  - PHP/5.2.10
124
- set-cookie:
125
- - PHPSESSID=2f869629a5e7cb92b08c55f9c859f3fb; path=/
126
- expires:
124
+ set-cookie:
125
+ - PHPSESSID=f588b3d81af041aefbcaa27ac58bfd9a; path=/
126
+ expires:
127
127
  - Thu, 19 Nov 1981 08:52:00 GMT
128
- cache-control:
128
+ cache-control:
129
129
  - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
130
- pragma:
130
+ pragma:
131
131
  - no-cache
132
- content-type:
132
+ content-type:
133
133
  - text/plain;charset=UTF-8
134
- transfer-encoding:
134
+ transfer-encoding:
135
135
  - chunked
136
- date:
137
- - Wed, 03 Aug 2011 18:24:32 GMT
138
- server:
136
+ date:
137
+ - Thu, 04 Aug 2011 01:43:42 GMT
138
+ server:
139
139
  - lighttpd/1.4.28
140
- body: "{\"campaignId\":\"35\",\"campaignName\":\"factory campaign\",\"type\":\"standard\",\"contentType\":\"standard\",\"status\":\"draft\",\"recipients\":{\"list\":[\"48\"]},\"subject\":\"Factory Campaign Message\",\"senderName\":\"Nate Bibler\",\"senderEmail\":\"nate@envylabs.com\",\"recipientName\":\"\",\"replyToName\":\"\",\"replyToEmail\":null,\"content\":{\"html\":\"\",\"text\":\"This is a good message! {COMPANY_ADDRESS}\"},\"startTime\":\"2011-08-03 18:24:31\",\"authenticate\":false,\"trackReplies\":false,\"showInArchive\":false,\"viewInBrowser\":false,\"trackOpens\":true,\"trackClickThruHTML\":true,\"trackClickThruText\":true,\"googleAnalyticsName\":null,\"automaticTweet\":false,\"clickTaleName\":null,\"clickTaleCustomFields\":[\"\"],\"useCustomUrlParameters\":null,\"customUrlParameters\":null}"
141
- http_version: "1.1"
142
- - !ruby/struct:VCR::HTTPInteraction
143
- request: !ruby/struct:VCR::Request
140
+ body: ! '{"campaignId":"44","campaignName":"factory campaign","type":"standard","contentType":"standard","status":"draft","recipients":{"list":["50"]},"subject":"Factory
141
+ Campaign Message","senderName":"Nate Bibler","senderEmail":"nate@envylabs.com","recipientName":"","replyToName":"","replyToEmail":null,"content":{"html":"","text":"This
142
+ is a good message! {COMPANY_ADDRESS}"},"startTime":"2011-08-04 01:43:42","authenticate":false,"trackReplies":false,"showInArchive":false,"viewInBrowser":false,"trackOpens":true,"trackClickThruHTML":true,"trackClickThruText":true,"googleAnalyticsName":null,"automaticTweet":false,"clickTaleName":null,"clickTaleCustomFields":[""],"useCustomUrlParameters":null,"customUrlParameters":null}'
143
+ http_version: '1.1'
144
+ - !ruby/struct:VCR::HTTPInteraction
145
+ request: !ruby/struct:VCR::Request
144
146
  method: :get
145
- uri: https://api.emailcampaigns.net:443/2/REST/?campaignId=35&key=%{API_KEY}&method=Campaign_Delete
146
- body:
147
- headers:
148
- accept:
147
+ uri: https://api.emailcampaigns.net:443/2/REST/?key=%{API_KEY}&listId=50&method=List_Delete
148
+ body: !!null
149
+ headers:
150
+ accept:
149
151
  - application/json
150
- user-agent:
151
- - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.7.1)
152
- response: !ruby/struct:VCR::Response
153
- status: !ruby/struct:VCR::ResponseStatus
152
+ user-agent:
153
+ - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
154
+ response: !ruby/struct:VCR::Response
155
+ status: !ruby/struct:VCR::ResponseStatus
154
156
  code: 200
155
157
  message: OK
156
- headers:
157
- x-powered-by:
158
+ headers:
159
+ x-powered-by:
158
160
  - PHP/5.2.10
159
- set-cookie:
160
- - PHPSESSID=7d66adc8a23b52086f3b2b38aa89d3a9; path=/
161
- expires:
161
+ set-cookie:
162
+ - PHPSESSID=9fa97d217d5577e08ce221979cc8d53e; path=/
163
+ expires:
162
164
  - Thu, 19 Nov 1981 08:52:00 GMT
163
- cache-control:
165
+ cache-control:
164
166
  - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
165
- pragma:
167
+ pragma:
166
168
  - no-cache
167
- content-type:
169
+ content-type:
168
170
  - text/plain;charset=UTF-8
169
- transfer-encoding:
171
+ transfer-encoding:
170
172
  - chunked
171
- date:
172
- - Wed, 03 Aug 2011 18:24:32 GMT
173
- server:
173
+ date:
174
+ - Thu, 04 Aug 2011 01:43:54 GMT
175
+ server:
174
176
  - lighttpd/1.4.28
175
- body: "true"
176
- http_version: "1.1"
177
+ body: 'true'
178
+ http_version: '1.1'
179
+ - !ruby/struct:VCR::HTTPInteraction
180
+ request: !ruby/struct:VCR::Request
181
+ method: :get
182
+ uri: https://api.emailcampaigns.net:443/2/REST/?campaignId=44&key=%{API_KEY}&method=Campaign_Delete
183
+ body: !!null
184
+ headers:
185
+ accept:
186
+ - application/json
187
+ user-agent:
188
+ - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
189
+ response: !ruby/struct:VCR::Response
190
+ status: !ruby/struct:VCR::ResponseStatus
191
+ code: 200
192
+ message: OK
193
+ headers:
194
+ x-powered-by:
195
+ - PHP/5.2.10
196
+ set-cookie:
197
+ - PHPSESSID=470a857c0ea2dbace3fbb984fd7af07e; path=/
198
+ expires:
199
+ - Thu, 19 Nov 1981 08:52:00 GMT
200
+ cache-control:
201
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
202
+ pragma:
203
+ - no-cache
204
+ content-type:
205
+ - text/plain;charset=UTF-8
206
+ transfer-encoding:
207
+ - chunked
208
+ date:
209
+ - Thu, 04 Aug 2011 01:43:54 GMT
210
+ server:
211
+ - lighttpd/1.4.28
212
+ body: 'true'
213
+ http_version: '1.1'
214
+ - !ruby/struct:VCR::HTTPInteraction
215
+ request: !ruby/struct:VCR::Request
216
+ method: :get
217
+ uri: https://api.emailcampaigns.net:443/2/REST/?key=%{API_KEY}&method=List_Get_Info&listId%5B0%5D=50
218
+ body: !!null
219
+ headers:
220
+ accept:
221
+ - application/json
222
+ user-agent:
223
+ - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
224
+ response: !ruby/struct:VCR::Response
225
+ status: !ruby/struct:VCR::ResponseStatus
226
+ code: 200
227
+ message: OK
228
+ headers:
229
+ x-powered-by:
230
+ - PHP/5.2.10
231
+ set-cookie:
232
+ - PHPSESSID=74a29964addd0890fec7a0da9a7d7f52; path=/
233
+ expires:
234
+ - Thu, 19 Nov 1981 08:52:00 GMT
235
+ cache-control:
236
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
237
+ pragma:
238
+ - no-cache
239
+ content-type:
240
+ - text/plain;charset=UTF-8
241
+ transfer-encoding:
242
+ - chunked
243
+ date:
244
+ - Thu, 04 Aug 2011 02:13:49 GMT
245
+ server:
246
+ - lighttpd/1.4.28
247
+ body: ! '{"result":"error","message":"Input Error: List 1 does not exist","code":601}'
248
+ http_version: '1.1'
249
+ - !ruby/struct:VCR::HTTPInteraction
250
+ request: !ruby/struct:VCR::Request
251
+ method: :get
252
+ uri: https://api.emailcampaigns.net:443/2/REST/?key=%{API_KEY}&method=List_Get_Info&listId%5B0%5D=50
253
+ body: !!null
254
+ headers:
255
+ accept:
256
+ - application/json
257
+ user-agent:
258
+ - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
259
+ response: !ruby/struct:VCR::Response
260
+ status: !ruby/struct:VCR::ResponseStatus
261
+ code: 200
262
+ message: OK
263
+ headers:
264
+ x-powered-by:
265
+ - PHP/5.2.10
266
+ set-cookie:
267
+ - PHPSESSID=7bb60fbef442cccb321a0881c0688577; path=/
268
+ expires:
269
+ - Thu, 19 Nov 1981 08:52:00 GMT
270
+ cache-control:
271
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
272
+ pragma:
273
+ - no-cache
274
+ content-type:
275
+ - text/plain;charset=UTF-8
276
+ transfer-encoding:
277
+ - chunked
278
+ date:
279
+ - Thu, 04 Aug 2011 02:13:49 GMT
280
+ server:
281
+ - lighttpd/1.4.28
282
+ body: ! '{"result":"error","message":"Input Error: List 1 does not exist","code":601}'
283
+ http_version: '1.1'
@@ -1,211 +1,283 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
4
  method: :get
5
5
  uri: https://api.emailcampaigns.net:443/2/REST/?key=%{API_KEY}&method=List_Add_Public&name=Factory%20List
6
- body:
7
- headers:
8
- accept:
6
+ body: !!null
7
+ headers:
8
+ accept:
9
9
  - application/json
10
- user-agent:
11
- - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.7.1)
12
- response: !ruby/struct:VCR::Response
13
- status: !ruby/struct:VCR::ResponseStatus
10
+ user-agent:
11
+ - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
12
+ response: !ruby/struct:VCR::Response
13
+ status: !ruby/struct:VCR::ResponseStatus
14
14
  code: 200
15
15
  message: OK
16
- headers:
17
- x-powered-by:
16
+ headers:
17
+ x-powered-by:
18
18
  - PHP/5.2.10
19
- set-cookie:
20
- - PHPSESSID=93da87918d0f9f109855798e59147f3c; path=/
21
- expires:
19
+ set-cookie:
20
+ - PHPSESSID=82a857132853896e8f4bc1a5172ae386; path=/
21
+ expires:
22
22
  - Thu, 19 Nov 1981 08:52:00 GMT
23
- cache-control:
23
+ cache-control:
24
24
  - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
25
- pragma:
25
+ pragma:
26
26
  - no-cache
27
- content-type:
27
+ content-type:
28
28
  - text/plain;charset=UTF-8
29
- transfer-encoding:
29
+ transfer-encoding:
30
30
  - chunked
31
- date:
32
- - Wed, 03 Aug 2011 18:24:22 GMT
33
- server:
31
+ date:
32
+ - Thu, 04 Aug 2011 01:43:54 GMT
33
+ server:
34
34
  - lighttpd/1.4.28
35
- body: "47"
36
- http_version: "1.1"
37
- - !ruby/struct:VCR::HTTPInteraction
38
- request: !ruby/struct:VCR::Request
35
+ body: '51'
36
+ http_version: '1.1'
37
+ - !ruby/struct:VCR::HTTPInteraction
38
+ request: !ruby/struct:VCR::Request
39
39
  method: :get
40
- uri: https://api.emailcampaigns.net:443/2/REST/?key=%{API_KEY}&listId=47&method=List_Get_Info
41
- body:
42
- headers:
43
- accept:
40
+ uri: https://api.emailcampaigns.net:443/2/REST/?key=%{API_KEY}&listId=51&method=List_Get_Info
41
+ body: !!null
42
+ headers:
43
+ accept:
44
44
  - application/json
45
- user-agent:
46
- - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.7.1)
47
- response: !ruby/struct:VCR::Response
48
- status: !ruby/struct:VCR::ResponseStatus
45
+ user-agent:
46
+ - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
47
+ response: !ruby/struct:VCR::Response
48
+ status: !ruby/struct:VCR::ResponseStatus
49
49
  code: 200
50
50
  message: OK
51
- headers:
52
- x-powered-by:
51
+ headers:
52
+ x-powered-by:
53
53
  - PHP/5.2.10
54
- set-cookie:
55
- - PHPSESSID=fe42b7c7bba1d9c3cbae2d7d22d86f81; path=/
56
- expires:
54
+ set-cookie:
55
+ - PHPSESSID=8840784a32b3cfdf50044d20b6d537ad; path=/
56
+ expires:
57
57
  - Thu, 19 Nov 1981 08:52:00 GMT
58
- cache-control:
58
+ cache-control:
59
59
  - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
60
- pragma:
60
+ pragma:
61
61
  - no-cache
62
- content-type:
62
+ content-type:
63
63
  - text/plain;charset=UTF-8
64
- transfer-encoding:
64
+ transfer-encoding:
65
65
  - chunked
66
- date:
67
- - Wed, 03 Aug 2011 18:24:22 GMT
68
- server:
66
+ date:
67
+ - Thu, 04 Aug 2011 01:43:55 GMT
68
+ server:
69
69
  - lighttpd/1.4.28
70
- body: "{\"listId\":\"47\",\"name\":\"Factory List\",\"description\":null,\"type\":\"public\",\"optIn\":false}"
71
- http_version: "1.1"
72
- - !ruby/struct:VCR::HTTPInteraction
73
- request: !ruby/struct:VCR::Request
70
+ body: ! '{"listId":"51","name":"Factory List","description":null,"type":"public","optIn":false}'
71
+ http_version: '1.1'
72
+ - !ruby/struct:VCR::HTTPInteraction
73
+ request: !ruby/struct:VCR::Request
74
74
  method: :get
75
- uri: https://api.emailcampaigns.net:443/2/REST/?campaignName=test-find-by-name&key=%{API_KEY}&method=Campaign_Create_Standard&senderEmail=nate@envylabs.com&senderName=Nate%20Bibler&subject=Factory%20Campaign%20Message&content%5Btext%5D=This%20is%20a%20good%20message!%20%7BCOMPANY_ADDRESS%7D&recipients%5Blist%5D=47
76
- body:
77
- headers:
78
- accept:
75
+ uri: https://api.emailcampaigns.net:443/2/REST/?campaignName=test-find-by-name&key=%{API_KEY}&method=Campaign_Create_Standard&senderEmail=nate@envylabs.com&senderName=Nate%20Bibler&subject=Factory%20Campaign%20Message&content%5Btext%5D=This%20is%20a%20good%20message!%20%7BCOMPANY_ADDRESS%7D&recipients%5Blist%5D=51
76
+ body: !!null
77
+ headers:
78
+ accept:
79
79
  - application/json
80
- user-agent:
81
- - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.7.1)
82
- response: !ruby/struct:VCR::Response
83
- status: !ruby/struct:VCR::ResponseStatus
80
+ user-agent:
81
+ - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
82
+ response: !ruby/struct:VCR::Response
83
+ status: !ruby/struct:VCR::ResponseStatus
84
84
  code: 200
85
85
  message: OK
86
- headers:
87
- x-powered-by:
86
+ headers:
87
+ x-powered-by:
88
88
  - PHP/5.2.10
89
- set-cookie:
90
- - PHPSESSID=c92026fecf7a057267e0370a24fd77bc; path=/
91
- expires:
89
+ set-cookie:
90
+ - PHPSESSID=26f0c3275e342cd8b8a57f64072a8d9d; path=/
91
+ expires:
92
92
  - Thu, 19 Nov 1981 08:52:00 GMT
93
- cache-control:
93
+ cache-control:
94
94
  - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
95
- pragma:
95
+ pragma:
96
96
  - no-cache
97
- content-type:
97
+ content-type:
98
98
  - text/plain;charset=UTF-8
99
- transfer-encoding:
99
+ transfer-encoding:
100
100
  - chunked
101
- date:
102
- - Wed, 03 Aug 2011 18:24:23 GMT
103
- server:
101
+ date:
102
+ - Thu, 04 Aug 2011 01:43:55 GMT
103
+ server:
104
104
  - lighttpd/1.4.28
105
- body: "34"
106
- http_version: "1.1"
107
- - !ruby/struct:VCR::HTTPInteraction
108
- request: !ruby/struct:VCR::Request
105
+ body: '45'
106
+ http_version: '1.1'
107
+ - !ruby/struct:VCR::HTTPInteraction
108
+ request: !ruby/struct:VCR::Request
109
109
  method: :get
110
110
  uri: https://api.emailcampaigns.net:443/2/REST/?key=%{API_KEY}&method=Campaign_Find&searchParameters%5BcampaignName%5D=test-find-by-name
111
- body:
112
- headers:
113
- accept:
111
+ body: !!null
112
+ headers:
113
+ accept:
114
114
  - application/json
115
- user-agent:
116
- - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.7.1)
117
- response: !ruby/struct:VCR::Response
118
- status: !ruby/struct:VCR::ResponseStatus
115
+ user-agent:
116
+ - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
117
+ response: !ruby/struct:VCR::Response
118
+ status: !ruby/struct:VCR::ResponseStatus
119
119
  code: 200
120
120
  message: OK
121
- headers:
122
- x-powered-by:
121
+ headers:
122
+ x-powered-by:
123
123
  - PHP/5.2.10
124
- set-cookie:
125
- - PHPSESSID=04fe3ecbc9c4b660595363eaf5acdf6e; path=/
126
- expires:
124
+ set-cookie:
125
+ - PHPSESSID=00d8bb52927e7717806edad3b68c1030; path=/
126
+ expires:
127
127
  - Thu, 19 Nov 1981 08:52:00 GMT
128
- cache-control:
128
+ cache-control:
129
129
  - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
130
- pragma:
130
+ pragma:
131
131
  - no-cache
132
- content-type:
132
+ content-type:
133
133
  - text/plain;charset=UTF-8
134
- transfer-encoding:
134
+ transfer-encoding:
135
135
  - chunked
136
- date:
137
- - Wed, 03 Aug 2011 18:24:25 GMT
138
- server:
136
+ date:
137
+ - Thu, 04 Aug 2011 01:43:55 GMT
138
+ server:
139
139
  - lighttpd/1.4.28
140
- body: "{\"34\":{\"campaignId\":\"34\",\"campaignName\":\"test-find-by-name\",\"type\":\"standard\",\"contentType\":\"standard\",\"status\":\"draft\",\"recipients\":{\"list\":[\"47\"]},\"subject\":\"Factory Campaign Message\",\"senderName\":\"Nate Bibler\",\"senderEmail\":\"nate@envylabs.com\",\"recipientName\":\"\",\"replyToName\":\"\",\"replyToEmail\":null,\"content\":{\"html\":\"\",\"text\":\"This is a good message! {COMPANY_ADDRESS}\"},\"startTime\":\"2011-08-03 18:24:23\",\"authenticate\":false,\"trackReplies\":false,\"showInArchive\":false,\"viewInBrowser\":false,\"trackOpens\":true,\"trackClickThruHTML\":true,\"trackClickThruText\":true,\"googleAnalyticsName\":null,\"automaticTweet\":false,\"clickTaleName\":null,\"clickTaleCustomFields\":[\"\"],\"useCustomUrlParameters\":null,\"customUrlParameters\":null}}"
141
- http_version: "1.1"
142
- - !ruby/struct:VCR::HTTPInteraction
143
- request: !ruby/struct:VCR::Request
140
+ body: ! '{"45":{"campaignId":"45","campaignName":"test-find-by-name","type":"standard","contentType":"standard","status":"draft","recipients":{"list":["51"]},"subject":"Factory
141
+ Campaign Message","senderName":"Nate Bibler","senderEmail":"nate@envylabs.com","recipientName":"","replyToName":"","replyToEmail":null,"content":{"html":"","text":"This
142
+ is a good message! {COMPANY_ADDRESS}"},"startTime":"2011-08-04 01:43:55","authenticate":false,"trackReplies":false,"showInArchive":false,"viewInBrowser":false,"trackOpens":true,"trackClickThruHTML":true,"trackClickThruText":true,"googleAnalyticsName":null,"automaticTweet":false,"clickTaleName":null,"clickTaleCustomFields":[""],"useCustomUrlParameters":null,"customUrlParameters":null}}'
143
+ http_version: '1.1'
144
+ - !ruby/struct:VCR::HTTPInteraction
145
+ request: !ruby/struct:VCR::Request
144
146
  method: :get
145
- uri: https://api.emailcampaigns.net:443/2/REST/?key=%{API_KEY}&listId=47&method=List_Delete
146
- body:
147
- headers:
148
- accept:
147
+ uri: https://api.emailcampaigns.net:443/2/REST/?key=%{API_KEY}&listId=51&method=List_Delete
148
+ body: !!null
149
+ headers:
150
+ accept:
149
151
  - application/json
150
- user-agent:
151
- - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.7.1)
152
- response: !ruby/struct:VCR::Response
153
- status: !ruby/struct:VCR::ResponseStatus
152
+ user-agent:
153
+ - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
154
+ response: !ruby/struct:VCR::Response
155
+ status: !ruby/struct:VCR::ResponseStatus
154
156
  code: 200
155
157
  message: OK
156
- headers:
157
- x-powered-by:
158
+ headers:
159
+ x-powered-by:
158
160
  - PHP/5.2.10
159
- set-cookie:
160
- - PHPSESSID=4fbb9e1bc77e2c87108c5e95ddae1f7e; path=/
161
- expires:
161
+ set-cookie:
162
+ - PHPSESSID=688cc29f2c6a133842e7f09e0ce9b86c; path=/
163
+ expires:
162
164
  - Thu, 19 Nov 1981 08:52:00 GMT
163
- cache-control:
165
+ cache-control:
164
166
  - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
165
- pragma:
167
+ pragma:
166
168
  - no-cache
167
- content-type:
169
+ content-type:
168
170
  - text/plain;charset=UTF-8
169
- transfer-encoding:
171
+ transfer-encoding:
170
172
  - chunked
171
- date:
172
- - Wed, 03 Aug 2011 18:24:14 GMT
173
- server:
173
+ date:
174
+ - Thu, 04 Aug 2011 01:43:44 GMT
175
+ server:
174
176
  - lighttpd/1.4.28
175
- body: "true"
176
- http_version: "1.1"
177
- - !ruby/struct:VCR::HTTPInteraction
178
- request: !ruby/struct:VCR::Request
177
+ body: 'true'
178
+ http_version: '1.1'
179
+ - !ruby/struct:VCR::HTTPInteraction
180
+ request: !ruby/struct:VCR::Request
179
181
  method: :get
180
- uri: https://api.emailcampaigns.net:443/2/REST/?campaignId=34&key=%{API_KEY}&method=Campaign_Delete
181
- body:
182
- headers:
183
- accept:
182
+ uri: https://api.emailcampaigns.net:443/2/REST/?campaignId=45&key=%{API_KEY}&method=Campaign_Delete
183
+ body: !!null
184
+ headers:
185
+ accept:
184
186
  - application/json
185
- user-agent:
186
- - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.7.1)
187
- response: !ruby/struct:VCR::Response
188
- status: !ruby/struct:VCR::ResponseStatus
187
+ user-agent:
188
+ - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
189
+ response: !ruby/struct:VCR::Response
190
+ status: !ruby/struct:VCR::ResponseStatus
189
191
  code: 200
190
192
  message: OK
191
- headers:
192
- x-powered-by:
193
+ headers:
194
+ x-powered-by:
193
195
  - PHP/5.2.10
194
- set-cookie:
195
- - PHPSESSID=5553d23dcdb2eaaeed17664a8a8db6b3; path=/
196
- expires:
196
+ set-cookie:
197
+ - PHPSESSID=c73d67971851751d4439325d08e1ed26; path=/
198
+ expires:
197
199
  - Thu, 19 Nov 1981 08:52:00 GMT
198
- cache-control:
200
+ cache-control:
199
201
  - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
200
- pragma:
202
+ pragma:
201
203
  - no-cache
202
- content-type:
204
+ content-type:
203
205
  - text/plain;charset=UTF-8
204
- transfer-encoding:
206
+ transfer-encoding:
205
207
  - chunked
206
- date:
207
- - Wed, 03 Aug 2011 18:24:26 GMT
208
- server:
208
+ date:
209
+ - Thu, 04 Aug 2011 01:43:48 GMT
210
+ server:
209
211
  - lighttpd/1.4.28
210
- body: "true"
211
- http_version: "1.1"
212
+ body: 'true'
213
+ http_version: '1.1'
214
+ - !ruby/struct:VCR::HTTPInteraction
215
+ request: !ruby/struct:VCR::Request
216
+ method: :get
217
+ uri: https://api.emailcampaigns.net:443/2/REST/?key=%{API_KEY}&method=List_Get_Info&listId%5B0%5D=51
218
+ body: !!null
219
+ headers:
220
+ accept:
221
+ - application/json
222
+ user-agent:
223
+ - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
224
+ response: !ruby/struct:VCR::Response
225
+ status: !ruby/struct:VCR::ResponseStatus
226
+ code: 200
227
+ message: OK
228
+ headers:
229
+ x-powered-by:
230
+ - PHP/5.2.10
231
+ set-cookie:
232
+ - PHPSESSID=c232f9779ce23968fa97e1de9527acce; path=/
233
+ expires:
234
+ - Thu, 19 Nov 1981 08:52:00 GMT
235
+ cache-control:
236
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
237
+ pragma:
238
+ - no-cache
239
+ content-type:
240
+ - text/plain;charset=UTF-8
241
+ transfer-encoding:
242
+ - chunked
243
+ date:
244
+ - Thu, 04 Aug 2011 02:13:50 GMT
245
+ server:
246
+ - lighttpd/1.4.28
247
+ body: ! '{"result":"error","message":"Input Error: List 1 does not exist","code":601}'
248
+ http_version: '1.1'
249
+ - !ruby/struct:VCR::HTTPInteraction
250
+ request: !ruby/struct:VCR::Request
251
+ method: :get
252
+ uri: https://api.emailcampaigns.net:443/2/REST/?key=%{API_KEY}&method=List_Get_Info&listId%5B0%5D=51
253
+ body: !!null
254
+ headers:
255
+ accept:
256
+ - application/json
257
+ user-agent:
258
+ - contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
259
+ response: !ruby/struct:VCR::Response
260
+ status: !ruby/struct:VCR::ResponseStatus
261
+ code: 200
262
+ message: OK
263
+ headers:
264
+ x-powered-by:
265
+ - PHP/5.2.10
266
+ set-cookie:
267
+ - PHPSESSID=98652def9e9e1f6bf89d93fada557531; path=/
268
+ expires:
269
+ - Thu, 19 Nov 1981 08:52:00 GMT
270
+ cache-control:
271
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
272
+ pragma:
273
+ - no-cache
274
+ content-type:
275
+ - text/plain;charset=UTF-8
276
+ transfer-encoding:
277
+ - chunked
278
+ date:
279
+ - Thu, 04 Aug 2011 02:13:39 GMT
280
+ server:
281
+ - lighttpd/1.4.28
282
+ body: ! '{"result":"error","message":"Input Error: List 1 does not exist","code":601}'
283
+ http_version: '1.1'