contactology 0.1.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. data/.gitignore +16 -2
  2. data/.rspec +0 -1
  3. data/.rvmrc +34 -23
  4. data/.travis.yml +9 -3
  5. data/CHANGELOG.markdown +46 -0
  6. data/Gemfile +0 -7
  7. data/README.markdown +5 -3
  8. data/contactology.gemspec +10 -10
  9. data/lib/contactology/version.rb +1 -1
  10. data/spec/cassettes/campaign/destroy.yml +293 -0
  11. data/spec/cassettes/campaign/find/failure.yml +45 -0
  12. data/spec/cassettes/campaign/find/success.yml +252 -0
  13. data/spec/cassettes/campaign/find_by_name/failure.yml +44 -0
  14. data/spec/cassettes/campaign/find_by_name/success.yml +252 -0
  15. data/spec/cassettes/campaign/preview.yml +135 -0
  16. data/spec/cassettes/campaigns/standard/create/failure.yml +127 -0
  17. data/spec/cassettes/campaigns/standard/create/invalid.yml +169 -0
  18. data/spec/cassettes/campaigns/standard/create/success.yml +209 -0
  19. data/spec/cassettes/campaigns/standard/send_campaign/failure.yml +374 -0
  20. data/spec/cassettes/campaigns/standard/send_campaign/failure_missing_attributes.yml +373 -0
  21. data/spec/cassettes/campaigns/standard/send_campaign/success.yml +374 -0
  22. data/spec/cassettes/campaigns/transactional/create/failure.yml +44 -0
  23. data/spec/cassettes/campaigns/transactional/create/success.yml +85 -0
  24. data/spec/cassettes/campaigns/transactional/send_campaign/failure.yml +127 -0
  25. data/spec/cassettes/campaigns/transactional/send_campaign/success.yml +208 -0
  26. data/spec/cassettes/contact/active.yml +127 -0
  27. data/spec/cassettes/contact/change_email/success.yml +210 -0
  28. data/spec/cassettes/contact/change_email/unknown.yml +45 -0
  29. data/spec/cassettes/contact/create.yml +127 -0
  30. data/spec/cassettes/contact/destroy.yml +85 -0
  31. data/spec/cassettes/contact/find/active.yml +127 -0
  32. data/spec/cassettes/contact/find/suppressed.yml +168 -0
  33. data/spec/cassettes/contact/find/unknown.yml +44 -0
  34. data/spec/cassettes/contact/lists/empty.yml +126 -0
  35. data/spec/cassettes/contact/lists/full.yml +333 -0
  36. data/spec/cassettes/contact/lists/unknown.yml +86 -0
  37. data/spec/cassettes/contact/suppress.yml +168 -0
  38. data/spec/cassettes/list/all.yml +168 -0
  39. data/spec/cassettes/list/create.yml +127 -0
  40. data/spec/cassettes/list/destroy.yml +210 -0
  41. data/spec/cassettes/list/find/success.yml +169 -0
  42. data/spec/cassettes/list/find/unknown.yml +45 -0
  43. data/spec/cassettes/list/import/success.yml +251 -0
  44. data/spec/cassettes/list/subscribe/success.yml +250 -0
  45. data/spec/cassettes/list/unsubscribe/success.yml +291 -0
  46. data/spec/cassettes/transactional_message/send_message/failure.yml +209 -0
  47. data/spec/cassettes/transactional_message/send_message/success.yml +208 -0
  48. data/spec/factories/campaigns.rb +18 -16
  49. data/spec/factories/contacts.rb +6 -2
  50. data/spec/factories/issues.rb +12 -8
  51. data/spec/factories/lists.rb +6 -2
  52. data/spec/factories/transactional_messages.rb +8 -4
  53. data/spec/models/contactology/campaign_spec.rb +16 -22
  54. data/spec/models/contactology/campaigns/standard_spec.rb +31 -27
  55. data/spec/models/contactology/campaigns/transactional_spec.rb +26 -16
  56. data/spec/models/contactology/contact_spec.rb +28 -35
  57. data/spec/models/contactology/issues_spec.rb +2 -2
  58. data/spec/models/contactology/list_spec.rb +12 -20
  59. data/spec/models/contactology/transactional_message_spec.rb +13 -15
  60. data/spec/spec_helper.rb +9 -5
  61. data/spec/support/factory_girl.rb +4 -18
  62. data/spec/support/vcr.rb +9 -6
  63. metadata +208 -177
  64. data/.infinity_test +0 -16
  65. data/.watchr +0 -36
  66. data/Changelog.markdown +0 -30
  67. data/spec/fixtures/net/campaign/destroy.yml +0 -248
  68. data/spec/fixtures/net/campaign/find/failure.yml +0 -36
  69. data/spec/fixtures/net/campaign/find/success.yml +0 -283
  70. data/spec/fixtures/net/campaign/find_by_name/failure.yml +0 -36
  71. data/spec/fixtures/net/campaign/find_by_name/success.yml +0 -283
  72. data/spec/fixtures/net/campaign/preview.yml +0 -181
  73. data/spec/fixtures/net/campaigns/standard/create/failure.yml +0 -106
  74. data/spec/fixtures/net/campaigns/standard/create/invalid.yml +0 -141
  75. data/spec/fixtures/net/campaigns/standard/create/success.yml +0 -176
  76. data/spec/fixtures/net/campaigns/standard/send_campaign/failure.yml +0 -316
  77. data/spec/fixtures/net/campaigns/standard/send_campaign/failure_missing_attributes.yml +0 -316
  78. data/spec/fixtures/net/campaigns/standard/send_campaign/success.yml +0 -316
  79. data/spec/fixtures/net/campaigns/transactional/create/failure.yml +0 -36
  80. data/spec/fixtures/net/campaigns/transactional/create/success.yml +0 -71
  81. data/spec/fixtures/net/campaigns/transactional/send_campaign/failure.yml +0 -106
  82. data/spec/fixtures/net/campaigns/transactional/send_campaign/success.yml +0 -176
  83. data/spec/fixtures/net/contact/active.yml +0 -106
  84. data/spec/fixtures/net/contact/change_email/success.yml +0 -176
  85. data/spec/fixtures/net/contact/change_email/unknown.yml +0 -36
  86. data/spec/fixtures/net/contact/create.yml +0 -106
  87. data/spec/fixtures/net/contact/destroy.yml +0 -141
  88. data/spec/fixtures/net/contact/find/active.yml +0 -106
  89. data/spec/fixtures/net/contact/find/suppressed.yml +0 -141
  90. data/spec/fixtures/net/contact/find/unknown.yml +0 -36
  91. data/spec/fixtures/net/contact/lists/empty.yml +0 -106
  92. data/spec/fixtures/net/contact/lists/full.yml +0 -246
  93. data/spec/fixtures/net/contact/lists/unknown.yml +0 -71
  94. data/spec/fixtures/net/contact/suppress.yml +0 -141
  95. data/spec/fixtures/net/list/all.yml +0 -141
  96. data/spec/fixtures/net/list/create.yml +0 -106
  97. data/spec/fixtures/net/list/destroy.yml +0 -176
  98. data/spec/fixtures/net/list/find/success.yml +0 -141
  99. data/spec/fixtures/net/list/find/unknown.yml +0 -36
  100. data/spec/fixtures/net/list/import/success.yml +0 -351
  101. data/spec/fixtures/net/list/subscribe/success.yml +0 -211
  102. data/spec/fixtures/net/list/unsubscribe/success.yml +0 -246
  103. data/spec/fixtures/net/transactional_message/send_message/failure.yml +0 -176
  104. data/spec/fixtures/net/transactional_message/send_message/success.yml +0 -176
  105. data/spec/requests/contacts_spec.rb +0 -6
@@ -0,0 +1,374 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.emailcampaigns.net/2/REST/?key=%{API_KEY}&method=List_Add_Public&name=send-standard-campaign-failure
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ User-Agent:
13
+ - contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: OK
18
+ headers:
19
+ X-Powered-By:
20
+ - PHP/5.2.10
21
+ Set-Cookie:
22
+ - PHPSESSID=3fa6a857c51543860d7542a7768fc7e2; path=/
23
+ Expires:
24
+ - Thu, 19 Nov 1981 08:52:00 GMT
25
+ Cache-Control:
26
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
27
+ Pragma:
28
+ - no-cache
29
+ Content-Type:
30
+ - text/plain;charset=UTF-8
31
+ Connection:
32
+ - close
33
+ Transfer-Encoding:
34
+ - chunked
35
+ Date:
36
+ - Wed, 20 Feb 2013 05:14:50 GMT
37
+ Server:
38
+ - lighttpd/1.4.28
39
+ body:
40
+ encoding: US-ASCII
41
+ string: '161'
42
+ http_version:
43
+ recorded_at: Wed, 20 Feb 2013 05:14:50 GMT
44
+ - request:
45
+ method: get
46
+ uri: https://api.emailcampaigns.net/2/REST/?key=%{API_KEY}&listId=161&method=List_Get_Info
47
+ body:
48
+ encoding: US-ASCII
49
+ string: ''
50
+ headers:
51
+ Accept:
52
+ - application/json
53
+ User-Agent:
54
+ - contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
55
+ response:
56
+ status:
57
+ code: 200
58
+ message: OK
59
+ headers:
60
+ X-Powered-By:
61
+ - PHP/5.2.10
62
+ Set-Cookie:
63
+ - PHPSESSID=7fb32ec828ace0e7fd2e2ba9904e78aa; path=/
64
+ Expires:
65
+ - Thu, 19 Nov 1981 08:52:00 GMT
66
+ Cache-Control:
67
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
68
+ Pragma:
69
+ - no-cache
70
+ Content-Type:
71
+ - text/plain;charset=UTF-8
72
+ Connection:
73
+ - close
74
+ Transfer-Encoding:
75
+ - chunked
76
+ Date:
77
+ - Wed, 20 Feb 2013 05:14:50 GMT
78
+ Server:
79
+ - lighttpd/1.4.28
80
+ body:
81
+ encoding: US-ASCII
82
+ string: ! '{"listId":"161","name":"send-standard-campaign-failure","description":null,"type":"public","created":"2013-02-20
83
+ 05:14:50","optIn":false}'
84
+ http_version:
85
+ recorded_at: Wed, 20 Feb 2013 05:14:51 GMT
86
+ - request:
87
+ method: get
88
+ uri: https://api.emailcampaigns.net/2/REST/?email=factory-contact@example.com&key=%{API_KEY}&method=Contact_Add&optionalParameters%5BupdateCustomFields%5D=true
89
+ body:
90
+ encoding: US-ASCII
91
+ string: ''
92
+ headers:
93
+ Accept:
94
+ - application/json
95
+ User-Agent:
96
+ - contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
97
+ response:
98
+ status:
99
+ code: 200
100
+ message: OK
101
+ headers:
102
+ X-Powered-By:
103
+ - PHP/5.2.10
104
+ Set-Cookie:
105
+ - PHPSESSID=050b00c868f1f616d322d4d6c9e7b799; path=/
106
+ Expires:
107
+ - Thu, 19 Nov 1981 08:52:00 GMT
108
+ Cache-Control:
109
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
110
+ Pragma:
111
+ - no-cache
112
+ Content-Type:
113
+ - text/plain;charset=UTF-8
114
+ Connection:
115
+ - close
116
+ Transfer-Encoding:
117
+ - chunked
118
+ Date:
119
+ - Wed, 20 Feb 2013 05:14:51 GMT
120
+ Server:
121
+ - lighttpd/1.4.28
122
+ body:
123
+ encoding: US-ASCII
124
+ string: 'true'
125
+ http_version:
126
+ recorded_at: Wed, 20 Feb 2013 05:14:51 GMT
127
+ - request:
128
+ method: get
129
+ uri: https://api.emailcampaigns.net/2/REST/?email=factory-contact@example.com&key=%{API_KEY}&listId=161&method=List_Subscribe
130
+ body:
131
+ encoding: US-ASCII
132
+ string: ''
133
+ headers:
134
+ Accept:
135
+ - application/json
136
+ User-Agent:
137
+ - contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
138
+ response:
139
+ status:
140
+ code: 200
141
+ message: OK
142
+ headers:
143
+ X-Powered-By:
144
+ - PHP/5.2.10
145
+ Set-Cookie:
146
+ - PHPSESSID=10ef2453d35d2a9755344023062aea52; path=/
147
+ Expires:
148
+ - Thu, 19 Nov 1981 08:52:00 GMT
149
+ Cache-Control:
150
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
151
+ Pragma:
152
+ - no-cache
153
+ Content-Type:
154
+ - text/plain;charset=UTF-8
155
+ Connection:
156
+ - close
157
+ Transfer-Encoding:
158
+ - chunked
159
+ Date:
160
+ - Wed, 20 Feb 2013 05:14:54 GMT
161
+ Server:
162
+ - lighttpd/1.4.28
163
+ body:
164
+ encoding: US-ASCII
165
+ string: 'true'
166
+ http_version:
167
+ recorded_at: Wed, 20 Feb 2013 05:14:55 GMT
168
+ - request:
169
+ method: get
170
+ uri: https://api.emailcampaigns.net/2/REST/?campaignName=factory%20campaign&content%5Btext%5D=OMG%20BUY%20VIAGRA&key=%{API_KEY}&method=Campaign_Create_Standard&recipients%5Blist%5D=161&senderEmail=sender@example.com&senderName=Sender%20Example&subject=Factory%20Campaign%20Message
171
+ body:
172
+ encoding: US-ASCII
173
+ string: ''
174
+ headers:
175
+ Accept:
176
+ - application/json
177
+ User-Agent:
178
+ - contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
179
+ response:
180
+ status:
181
+ code: 200
182
+ message: OK
183
+ headers:
184
+ X-Powered-By:
185
+ - PHP/5.2.10
186
+ Set-Cookie:
187
+ - PHPSESSID=1c85b2815d2f12e20ab2460eccde390a; path=/
188
+ Expires:
189
+ - Thu, 19 Nov 1981 08:52:00 GMT
190
+ Cache-Control:
191
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
192
+ Pragma:
193
+ - no-cache
194
+ Content-Type:
195
+ - text/plain;charset=UTF-8
196
+ Connection:
197
+ - close
198
+ Transfer-Encoding:
199
+ - chunked
200
+ Date:
201
+ - Wed, 20 Feb 2013 05:14:56 GMT
202
+ Server:
203
+ - lighttpd/1.4.28
204
+ body:
205
+ encoding: US-ASCII
206
+ string: '95'
207
+ http_version:
208
+ recorded_at: Wed, 20 Feb 2013 05:14:56 GMT
209
+ - request:
210
+ method: get
211
+ uri: https://api.emailcampaigns.net/2/REST/?campaignId=95&key=%{API_KEY}&method=Campaign_Send
212
+ body:
213
+ encoding: US-ASCII
214
+ string: ''
215
+ headers:
216
+ Accept:
217
+ - application/json
218
+ User-Agent:
219
+ - contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
220
+ response:
221
+ status:
222
+ code: 200
223
+ message: OK
224
+ headers:
225
+ X-Powered-By:
226
+ - PHP/5.2.10
227
+ Set-Cookie:
228
+ - PHPSESSID=2ce078cf4727809ba3f84caa4c0ab535; path=/
229
+ Expires:
230
+ - Thu, 19 Nov 1981 08:52:00 GMT
231
+ Cache-Control:
232
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
233
+ Pragma:
234
+ - no-cache
235
+ Content-Type:
236
+ - text/plain;charset=UTF-8
237
+ Connection:
238
+ - close
239
+ Transfer-Encoding:
240
+ - chunked
241
+ Date:
242
+ - Wed, 20 Feb 2013 05:14:56 GMT
243
+ Server:
244
+ - lighttpd/1.4.28
245
+ body:
246
+ encoding: US-ASCII
247
+ string: ! '{"success":true,"issues":[]}'
248
+ http_version:
249
+ recorded_at: Wed, 20 Feb 2013 05:14:57 GMT
250
+ - request:
251
+ method: get
252
+ uri: https://api.emailcampaigns.net/2/REST/?key=%{API_KEY}&listId=161&method=List_Delete
253
+ body:
254
+ encoding: US-ASCII
255
+ string: ''
256
+ headers:
257
+ Accept:
258
+ - application/json
259
+ User-Agent:
260
+ - contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
261
+ response:
262
+ status:
263
+ code: 200
264
+ message: OK
265
+ headers:
266
+ X-Powered-By:
267
+ - PHP/5.2.10
268
+ Set-Cookie:
269
+ - PHPSESSID=cd1bf8582a083135129a25097025c479; path=/
270
+ Expires:
271
+ - Thu, 19 Nov 1981 08:52:00 GMT
272
+ Cache-Control:
273
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
274
+ Pragma:
275
+ - no-cache
276
+ Content-Type:
277
+ - text/plain;charset=UTF-8
278
+ Connection:
279
+ - close
280
+ Transfer-Encoding:
281
+ - chunked
282
+ Date:
283
+ - Wed, 20 Feb 2013 05:14:57 GMT
284
+ Server:
285
+ - lighttpd/1.4.28
286
+ body:
287
+ encoding: US-ASCII
288
+ string: 'true'
289
+ http_version:
290
+ recorded_at: Wed, 20 Feb 2013 05:14:57 GMT
291
+ - request:
292
+ method: get
293
+ uri: https://api.emailcampaigns.net/2/REST/?email=factory-contact@example.com&key=%{API_KEY}&method=Contact_Delete
294
+ body:
295
+ encoding: US-ASCII
296
+ string: ''
297
+ headers:
298
+ Accept:
299
+ - application/json
300
+ User-Agent:
301
+ - contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
302
+ response:
303
+ status:
304
+ code: 200
305
+ message: OK
306
+ headers:
307
+ X-Powered-By:
308
+ - PHP/5.2.10
309
+ Set-Cookie:
310
+ - PHPSESSID=2d49ab9813a144851d9ae6ee4616201a; path=/
311
+ Expires:
312
+ - Thu, 19 Nov 1981 08:52:00 GMT
313
+ Cache-Control:
314
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
315
+ Pragma:
316
+ - no-cache
317
+ Content-Type:
318
+ - text/plain;charset=UTF-8
319
+ Connection:
320
+ - close
321
+ Transfer-Encoding:
322
+ - chunked
323
+ Date:
324
+ - Wed, 20 Feb 2013 05:14:57 GMT
325
+ Server:
326
+ - lighttpd/1.4.28
327
+ body:
328
+ encoding: US-ASCII
329
+ string: 'true'
330
+ http_version:
331
+ recorded_at: Wed, 20 Feb 2013 05:14:57 GMT
332
+ - request:
333
+ method: get
334
+ uri: https://api.emailcampaigns.net/2/REST/?campaignId=95&key=%{API_KEY}&method=Campaign_Delete
335
+ body:
336
+ encoding: US-ASCII
337
+ string: ''
338
+ headers:
339
+ Accept:
340
+ - application/json
341
+ User-Agent:
342
+ - contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
343
+ response:
344
+ status:
345
+ code: 200
346
+ message: OK
347
+ headers:
348
+ X-Powered-By:
349
+ - PHP/5.2.10
350
+ Set-Cookie:
351
+ - PHPSESSID=eec1b17b34e04cdf487c6bdeb7307db2; path=/
352
+ Expires:
353
+ - Thu, 19 Nov 1981 08:52:00 GMT
354
+ Cache-Control:
355
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
356
+ Pragma:
357
+ - no-cache
358
+ Content-Type:
359
+ - text/plain;charset=UTF-8
360
+ Connection:
361
+ - close
362
+ Transfer-Encoding:
363
+ - chunked
364
+ Date:
365
+ - Wed, 20 Feb 2013 05:14:58 GMT
366
+ Server:
367
+ - lighttpd/1.4.28
368
+ body:
369
+ encoding: US-ASCII
370
+ string: ! '{"result":"error","message":"Input Error: Campaign 95 has the wrong
371
+ status","code":601}'
372
+ http_version:
373
+ recorded_at: Wed, 20 Feb 2013 05:14:58 GMT
374
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,373 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.emailcampaigns.net/2/REST/?key=%{API_KEY}&method=List_Add_Public&name=send-standard-campaign-failure
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ User-Agent:
13
+ - contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: OK
18
+ headers:
19
+ X-Powered-By:
20
+ - PHP/5.2.10
21
+ Set-Cookie:
22
+ - PHPSESSID=652de080a88ca55ef54b5a9118cece07; path=/
23
+ Expires:
24
+ - Thu, 19 Nov 1981 08:52:00 GMT
25
+ Cache-Control:
26
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
27
+ Pragma:
28
+ - no-cache
29
+ Content-Type:
30
+ - text/plain;charset=UTF-8
31
+ Connection:
32
+ - close
33
+ Transfer-Encoding:
34
+ - chunked
35
+ Date:
36
+ - Wed, 20 Feb 2013 05:14:47 GMT
37
+ Server:
38
+ - lighttpd/1.4.28
39
+ body:
40
+ encoding: US-ASCII
41
+ string: '159'
42
+ http_version:
43
+ recorded_at: Wed, 20 Feb 2013 05:14:47 GMT
44
+ - request:
45
+ method: get
46
+ uri: https://api.emailcampaigns.net/2/REST/?key=%{API_KEY}&listId=159&method=List_Get_Info
47
+ body:
48
+ encoding: US-ASCII
49
+ string: ''
50
+ headers:
51
+ Accept:
52
+ - application/json
53
+ User-Agent:
54
+ - contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
55
+ response:
56
+ status:
57
+ code: 200
58
+ message: OK
59
+ headers:
60
+ X-Powered-By:
61
+ - PHP/5.2.10
62
+ Set-Cookie:
63
+ - PHPSESSID=699c6f9db8cf7440125f53301791ea6f; path=/
64
+ Expires:
65
+ - Thu, 19 Nov 1981 08:52:00 GMT
66
+ Cache-Control:
67
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
68
+ Pragma:
69
+ - no-cache
70
+ Content-Type:
71
+ - text/plain;charset=UTF-8
72
+ Connection:
73
+ - close
74
+ Transfer-Encoding:
75
+ - chunked
76
+ Date:
77
+ - Wed, 20 Feb 2013 05:14:47 GMT
78
+ Server:
79
+ - lighttpd/1.4.28
80
+ body:
81
+ encoding: US-ASCII
82
+ string: ! '{"listId":"159","name":"send-standard-campaign-failure","description":null,"type":"public","created":"2013-02-20
83
+ 05:14:47","optIn":false}'
84
+ http_version:
85
+ recorded_at: Wed, 20 Feb 2013 05:14:47 GMT
86
+ - request:
87
+ method: get
88
+ uri: https://api.emailcampaigns.net/2/REST/?email=factory-contact@example.com&key=%{API_KEY}&method=Contact_Add&optionalParameters%5BupdateCustomFields%5D=true
89
+ body:
90
+ encoding: US-ASCII
91
+ string: ''
92
+ headers:
93
+ Accept:
94
+ - application/json
95
+ User-Agent:
96
+ - contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
97
+ response:
98
+ status:
99
+ code: 200
100
+ message: OK
101
+ headers:
102
+ X-Powered-By:
103
+ - PHP/5.2.10
104
+ Set-Cookie:
105
+ - PHPSESSID=9c1eea7e9a32b1df833d7e5bc2f60cef; path=/
106
+ Expires:
107
+ - Thu, 19 Nov 1981 08:52:00 GMT
108
+ Cache-Control:
109
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
110
+ Pragma:
111
+ - no-cache
112
+ Content-Type:
113
+ - text/plain;charset=UTF-8
114
+ Connection:
115
+ - close
116
+ Transfer-Encoding:
117
+ - chunked
118
+ Date:
119
+ - Wed, 20 Feb 2013 05:14:47 GMT
120
+ Server:
121
+ - lighttpd/1.4.28
122
+ body:
123
+ encoding: US-ASCII
124
+ string: 'true'
125
+ http_version:
126
+ recorded_at: Wed, 20 Feb 2013 05:14:47 GMT
127
+ - request:
128
+ method: get
129
+ uri: https://api.emailcampaigns.net/2/REST/?email=factory-contact@example.com&key=%{API_KEY}&listId=159&method=List_Subscribe
130
+ body:
131
+ encoding: US-ASCII
132
+ string: ''
133
+ headers:
134
+ Accept:
135
+ - application/json
136
+ User-Agent:
137
+ - contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
138
+ response:
139
+ status:
140
+ code: 200
141
+ message: OK
142
+ headers:
143
+ X-Powered-By:
144
+ - PHP/5.2.10
145
+ Set-Cookie:
146
+ - PHPSESSID=c3bf97ffc5be5e86501cd5763c2e80ab; path=/
147
+ Expires:
148
+ - Thu, 19 Nov 1981 08:52:00 GMT
149
+ Cache-Control:
150
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
151
+ Pragma:
152
+ - no-cache
153
+ Content-Type:
154
+ - text/plain;charset=UTF-8
155
+ Connection:
156
+ - close
157
+ Transfer-Encoding:
158
+ - chunked
159
+ Date:
160
+ - Wed, 20 Feb 2013 05:14:48 GMT
161
+ Server:
162
+ - lighttpd/1.4.28
163
+ body:
164
+ encoding: US-ASCII
165
+ string: 'true'
166
+ http_version:
167
+ recorded_at: Wed, 20 Feb 2013 05:14:48 GMT
168
+ - request:
169
+ method: get
170
+ uri: https://api.emailcampaigns.net/2/REST/?campaignName=factory%20campaign&content%5Btext%5D=This%20is%20a%20good%20message!%20%7BCOMPANY_ADDRESS%7D&key=%{API_KEY}&method=Campaign_Create_Standard&recipients%5Blist%5D=159&senderEmail=sender@example.com&senderName=Sender%20Example&subject=Factory%20Campaign%20Message
171
+ body:
172
+ encoding: US-ASCII
173
+ string: ''
174
+ headers:
175
+ Accept:
176
+ - application/json
177
+ User-Agent:
178
+ - contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
179
+ response:
180
+ status:
181
+ code: 200
182
+ message: OK
183
+ headers:
184
+ X-Powered-By:
185
+ - PHP/5.2.10
186
+ Set-Cookie:
187
+ - PHPSESSID=1e11afa14ea02963a620565fb56d4c2e; path=/
188
+ Expires:
189
+ - Thu, 19 Nov 1981 08:52:00 GMT
190
+ Cache-Control:
191
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
192
+ Pragma:
193
+ - no-cache
194
+ Content-Type:
195
+ - text/plain;charset=UTF-8
196
+ Connection:
197
+ - close
198
+ Transfer-Encoding:
199
+ - chunked
200
+ Date:
201
+ - Wed, 20 Feb 2013 05:14:48 GMT
202
+ Server:
203
+ - lighttpd/1.4.28
204
+ body:
205
+ encoding: US-ASCII
206
+ string: '93'
207
+ http_version:
208
+ recorded_at: Wed, 20 Feb 2013 05:14:48 GMT
209
+ - request:
210
+ method: get
211
+ uri: https://api.emailcampaigns.net/2/REST/?key=%{API_KEY}&method=Campaign_Send
212
+ body:
213
+ encoding: US-ASCII
214
+ string: ''
215
+ headers:
216
+ Accept:
217
+ - application/json
218
+ User-Agent:
219
+ - contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
220
+ response:
221
+ status:
222
+ code: 200
223
+ message: OK
224
+ headers:
225
+ X-Powered-By:
226
+ - PHP/5.2.10
227
+ Set-Cookie:
228
+ - PHPSESSID=a93161008ca5e183acd6a459ee0c174c; path=/
229
+ Expires:
230
+ - Thu, 19 Nov 1981 08:52:00 GMT
231
+ Cache-Control:
232
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
233
+ Pragma:
234
+ - no-cache
235
+ Content-Type:
236
+ - text/plain;charset=UTF-8
237
+ Connection:
238
+ - close
239
+ Transfer-Encoding:
240
+ - chunked
241
+ Date:
242
+ - Wed, 20 Feb 2013 05:14:48 GMT
243
+ Server:
244
+ - lighttpd/1.4.28
245
+ body:
246
+ encoding: US-ASCII
247
+ string: ! '{"result":"error","message":"Missing parameter campaignId for Campaign_Send","code":2}'
248
+ http_version:
249
+ recorded_at: Wed, 20 Feb 2013 05:14:49 GMT
250
+ - request:
251
+ method: get
252
+ uri: https://api.emailcampaigns.net/2/REST/?key=%{API_KEY}&listId=159&method=List_Delete
253
+ body:
254
+ encoding: US-ASCII
255
+ string: ''
256
+ headers:
257
+ Accept:
258
+ - application/json
259
+ User-Agent:
260
+ - contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
261
+ response:
262
+ status:
263
+ code: 200
264
+ message: OK
265
+ headers:
266
+ X-Powered-By:
267
+ - PHP/5.2.10
268
+ Set-Cookie:
269
+ - PHPSESSID=ab74d694cdffd529221ba139ccaaa6d8; path=/
270
+ Expires:
271
+ - Thu, 19 Nov 1981 08:52:00 GMT
272
+ Cache-Control:
273
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
274
+ Pragma:
275
+ - no-cache
276
+ Content-Type:
277
+ - text/plain;charset=UTF-8
278
+ Connection:
279
+ - close
280
+ Transfer-Encoding:
281
+ - chunked
282
+ Date:
283
+ - Wed, 20 Feb 2013 05:14:49 GMT
284
+ Server:
285
+ - lighttpd/1.4.28
286
+ body:
287
+ encoding: US-ASCII
288
+ string: 'true'
289
+ http_version:
290
+ recorded_at: Wed, 20 Feb 2013 05:14:49 GMT
291
+ - request:
292
+ method: get
293
+ uri: https://api.emailcampaigns.net/2/REST/?email=factory-contact@example.com&key=%{API_KEY}&method=Contact_Delete
294
+ body:
295
+ encoding: US-ASCII
296
+ string: ''
297
+ headers:
298
+ Accept:
299
+ - application/json
300
+ User-Agent:
301
+ - contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
302
+ response:
303
+ status:
304
+ code: 200
305
+ message: OK
306
+ headers:
307
+ X-Powered-By:
308
+ - PHP/5.2.10
309
+ Set-Cookie:
310
+ - PHPSESSID=57bb5cb5e5f7f14e11000edc821f2b51; path=/
311
+ Expires:
312
+ - Thu, 19 Nov 1981 08:52:00 GMT
313
+ Cache-Control:
314
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
315
+ Pragma:
316
+ - no-cache
317
+ Content-Type:
318
+ - text/plain;charset=UTF-8
319
+ Connection:
320
+ - close
321
+ Transfer-Encoding:
322
+ - chunked
323
+ Date:
324
+ - Wed, 20 Feb 2013 05:14:49 GMT
325
+ Server:
326
+ - lighttpd/1.4.28
327
+ body:
328
+ encoding: US-ASCII
329
+ string: 'true'
330
+ http_version:
331
+ recorded_at: Wed, 20 Feb 2013 05:14:49 GMT
332
+ - request:
333
+ method: get
334
+ uri: https://api.emailcampaigns.net/2/REST/?key=%{API_KEY}&method=Campaign_Delete
335
+ body:
336
+ encoding: US-ASCII
337
+ string: ''
338
+ headers:
339
+ Accept:
340
+ - application/json
341
+ User-Agent:
342
+ - contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
343
+ response:
344
+ status:
345
+ code: 200
346
+ message: OK
347
+ headers:
348
+ X-Powered-By:
349
+ - PHP/5.2.10
350
+ Set-Cookie:
351
+ - PHPSESSID=074d6d5ee2d81ff8327567eb75d804e9; path=/
352
+ Expires:
353
+ - Thu, 19 Nov 1981 08:52:00 GMT
354
+ Cache-Control:
355
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
356
+ Pragma:
357
+ - no-cache
358
+ Content-Type:
359
+ - text/plain;charset=UTF-8
360
+ Connection:
361
+ - close
362
+ Transfer-Encoding:
363
+ - chunked
364
+ Date:
365
+ - Wed, 20 Feb 2013 05:14:50 GMT
366
+ Server:
367
+ - lighttpd/1.4.28
368
+ body:
369
+ encoding: US-ASCII
370
+ string: ! '{"result":"error","message":"Missing parameter campaignId for Campaign_Delete","code":2}'
371
+ http_version:
372
+ recorded_at: Wed, 20 Feb 2013 05:14:50 GMT
373
+ recorded_with: VCR 2.4.0