madmimi 1.0.16 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +2 -0
  3. data/Gemfile +12 -0
  4. data/Gemfile.lock +93 -0
  5. data/README.rdoc +88 -37
  6. data/Rakefile +2 -30
  7. data/VERSION +1 -1
  8. data/config/paths.yml +23 -0
  9. data/lib/madmimi.rb +210 -123
  10. data/madmimi.gemspec +130 -22
  11. data/spec/cassettes/add_to_list/success.yml +54 -0
  12. data/spec/cassettes/add_to_list/user_does_not_exist.yml +165 -0
  13. data/spec/cassettes/add_to_list/user_existed.yml +54 -0
  14. data/spec/cassettes/add_to_list/user_exists.yml +171 -0
  15. data/spec/cassettes/add_to_list/user_updated.yml +174 -0
  16. data/spec/cassettes/add_user/user_did_not_exist.yml +54 -0
  17. data/spec/cassettes/add_user/user_exist.yml +303 -0
  18. data/spec/cassettes/add_user/user_existed.yml +54 -0
  19. data/spec/cassettes/add_user/user_missing.yml +138 -0
  20. data/spec/cassettes/add_user/user_updated.yml +153 -0
  21. data/spec/cassettes/add_users/users_did_not_exist.yml +54 -0
  22. data/spec/cassettes/add_users/users_exist.yml +326 -0
  23. data/spec/cassettes/add_users/users_existed.yml +54 -0
  24. data/spec/cassettes/add_users/users_missing.yml +305 -0
  25. data/spec/cassettes/add_users/users_updated.yml +327 -0
  26. data/spec/cassettes/add_users_to_list/gained_membership.yml +107 -0
  27. data/spec/cassettes/add_users_to_list/missing_membership.yml +174 -0
  28. data/spec/cassettes/add_users_to_list/users_did_not_exist.yml +54 -0
  29. data/spec/cassettes/add_users_to_list/users_exist.yml +365 -0
  30. data/spec/cassettes/add_users_to_list/users_existed.yml +54 -0
  31. data/spec/cassettes/add_users_to_list/users_missing.yml +341 -0
  32. data/spec/cassettes/add_users_to_list/users_updated.yml +365 -0
  33. data/spec/cassettes/audience_search/does_not_include_suppressed_users.yml +76 -0
  34. data/spec/cassettes/audience_search/includes_suppressed_users.yml +86 -0
  35. data/spec/cassettes/csv_import/success.yml +54 -0
  36. data/spec/cassettes/csv_import/users_exist.yml +273 -0
  37. data/spec/cassettes/csv_import/users_missing.yml +381 -0
  38. data/spec/cassettes/delete_list/exists.yml +57 -0
  39. data/spec/cassettes/delete_list/fail.yml +54 -0
  40. data/spec/cassettes/delete_list/not_exists.yml +56 -0
  41. data/spec/cassettes/delete_list/success.yml +54 -0
  42. data/spec/cassettes/delete_list/users_exist.yml +129 -0
  43. data/spec/cassettes/list_members/multiple.yml +68 -0
  44. data/spec/cassettes/list_members/single.yml +68 -0
  45. data/spec/cassettes/lists/multiple.yml +56 -0
  46. data/spec/cassettes/lists/single.yml +55 -0
  47. data/spec/cassettes/mailing_stats/mailing_does_not_exist.yml +50 -0
  48. data/spec/cassettes/mailing_stats/promotion_and_mailing_exist.yml +57 -0
  49. data/spec/cassettes/mailing_stats/promotion_does_not_exist.yml +50 -0
  50. data/spec/cassettes/members/multiple.yml +174 -0
  51. data/spec/cassettes/members/single.yml +61 -0
  52. data/spec/cassettes/memberships/multiple.yml +56 -0
  53. data/spec/cassettes/memberships/single.yml +108 -0
  54. data/spec/cassettes/new_list/exists.yml +57 -0
  55. data/spec/cassettes/new_list/fail.yml +52 -0
  56. data/spec/cassettes/new_list/not_exists.yml +56 -0
  57. data/spec/cassettes/new_list/success.yml +52 -0
  58. data/spec/cassettes/promotions/multiple.yml +63 -0
  59. data/spec/cassettes/promotions/single.yml +61 -0
  60. data/spec/cassettes/remove_from_all_list/user_does_not_have_memberships.yml +60 -0
  61. data/spec/cassettes/remove_from_all_lists/user_has_memberships.yml +113 -0
  62. data/spec/cassettes/remove_from_all_lists/user_with_memberships.yml +49 -0
  63. data/spec/cassettes/remove_from_list/user_does_not_exist.yml +49 -0
  64. data/spec/cassettes/remove_from_list/user_in_list_does_not_exist.yml +62 -0
  65. data/spec/cassettes/remove_from_list/user_in_list_exists.yml +68 -0
  66. data/spec/cassettes/remove_from_list/user_in_the_list.yml +49 -0
  67. data/spec/cassettes/remove_from_list/user_not_in_the_list.yml +49 -0
  68. data/spec/cassettes/save_promotion/only_plain_text.yml +56 -0
  69. data/spec/cassettes/save_promotion/only_raw_html.yml +56 -0
  70. data/spec/cassettes/save_promotion/promotion_exists.yml +65 -0
  71. data/spec/cassettes/save_promotion/promotion_missing.yml +63 -0
  72. data/spec/cassettes/save_promotion/raw_html_and_plain_text.yml +56 -0
  73. data/spec/cassettes/send_html/promotion_does_not_exist.yml +56 -0
  74. data/spec/cassettes/send_html/send_single.yml +53 -0
  75. data/spec/cassettes/send_html/send_to_all.yml +56 -0
  76. data/spec/cassettes/send_html/send_to_list.yml +56 -0
  77. data/spec/cassettes/send_mail/promotion_does_not_exist.yml +54 -0
  78. data/spec/cassettes/send_mail/send_single.yml +53 -0
  79. data/spec/cassettes/send_mail/send_to_all.yml +56 -0
  80. data/spec/cassettes/send_mail/send_to_list.yml +56 -0
  81. data/spec/cassettes/send_plaintext/promotion_does_not_exist.yml +56 -0
  82. data/spec/cassettes/send_plaintext/send_single.yml +53 -0
  83. data/spec/cassettes/send_plaintext/send_to_all.yml +56 -0
  84. data/spec/cassettes/send_plaintext/send_to_list.yml +56 -0
  85. data/spec/cassettes/send_plaintext/tracking_beacon_missing.yml +56 -0
  86. data/spec/cassettes/status/transactional_mail_does_not_exist.yml +51 -0
  87. data/spec/cassettes/status/transactional_mail_exists.yml +53 -0
  88. data/spec/cassettes/suppress_email/already_suppressed.yml +51 -0
  89. data/spec/cassettes/suppress_email/not_suppressed.yml +102 -0
  90. data/spec/cassettes/suppress_email/user_does_not_exist.yml +100 -0
  91. data/spec/cassettes/suppress_email/user_is_now_suppressed.yml +51 -0
  92. data/spec/cassettes/suppress_email/user_not_suppressed.yml +51 -0
  93. data/spec/cassettes/suppressed/member_does_not_exist.yml +49 -0
  94. data/spec/cassettes/suppressed/member_is_not_suppressed.yml +51 -0
  95. data/spec/cassettes/suppressed/member_is_suppressed.yml +51 -0
  96. data/spec/cassettes/suppressed_since/members_exist.yml +56 -0
  97. data/spec/cassettes/suppressed_since/no_members.yml +56 -0
  98. data/spec/cassettes/unsuppress_email/already_suppressed.yml +100 -0
  99. data/spec/cassettes/unsuppress_email/not_suppressed.yml +99 -0
  100. data/spec/cassettes/unsuppress_email/user_does_not_exist.yml +99 -0
  101. data/spec/cassettes/unsuppress_email/user_is_now_unsuppressed.yml +49 -0
  102. data/spec/cassettes/unsuppress_email/user_suppressed.yml +51 -0
  103. data/spec/cassettes/update_email/user_does_not_have_permission.yml +52 -0
  104. data/spec/cassettes/update_email/user_existed.yml +54 -0
  105. data/spec/cassettes/update_email/user_missing.yml +52 -0
  106. data/spec/cassettes/update_email/user_with_new_email.yml +345 -0
  107. data/spec/cassettes/update_email/user_with_old_email.yml +345 -0
  108. data/spec/madmimi_spec.rb +1166 -0
  109. data/spec/spec_helper.rb +15 -0
  110. metadata +210 -96
  111. data/test/fixtures/lists.xml +0 -7
  112. data/test/fixtures/promotions.xml +0 -10
  113. data/test/fixtures/search.xml +0 -38
  114. data/test/helper.rb +0 -43
  115. data/test/test_madmimi.rb +0 -63
@@ -0,0 +1,56 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.madmimi.com/mailer/to_all
6
+ body:
7
+ encoding: US-ASCII
8
+ string: username=test%40example.com&api_key=TEST_API_KEY&promotion_name=Transactional%20Promotion&from=maxim%2B1%40madmimi.com&subject=Test&to_all=true&raw_plain_text=Test%20%5B%5Btracking_beacon%5D%5D%20%5B%5Bopt_out%5D%5D
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ Server:
16
+ - cloudflare-nginx
17
+ Date:
18
+ - Mon, 08 Sep 2014 08:21:20 GMT
19
+ Content-Type:
20
+ - text/html; charset=utf-8
21
+ Transfer-Encoding:
22
+ - chunked
23
+ Connection:
24
+ - keep-alive
25
+ Set-Cookie:
26
+ - __cfduid=d2fd5112371be078ccb62d0bc1ac727b61410164479545; expires=Mon, 23-Dec-2019
27
+ 23:50:00 GMT; path=/; domain=.madmimi.com; HttpOnly
28
+ - chrome_token=; domain=madmimi.com; path=/; expires=Thu, 01-Jan-1970 00:00:00
29
+ GMT
30
+ - non_eu=true; path=/
31
+ Strict-Transport-Security:
32
+ - max-age=31536000
33
+ X-Ua-Compatible:
34
+ - IE=Edge,chrome=1
35
+ Etag:
36
+ - W/"5a5ebbaff57ea333e5e68a03feb66757"
37
+ Cache-Control:
38
+ - max-age=0, private, must-revalidate
39
+ X-Request-Id:
40
+ - 6c914ff288f7be33f53b92b54c96e45f
41
+ X-Rack-Cache:
42
+ - invalidate, pass
43
+ Status:
44
+ - 200 OK
45
+ P3p:
46
+ - CP="CAO PSA OUR"
47
+ Vary:
48
+ - Accept-Encoding
49
+ Cf-Ray:
50
+ - 1669bb5c96a00479-FRA
51
+ body:
52
+ encoding: US-ASCII
53
+ string: '122048619'
54
+ http_version:
55
+ recorded_at: Mon, 08 Sep 2014 08:21:20 GMT
56
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,56 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.madmimi.com/mailer/to_list
6
+ body:
7
+ encoding: US-ASCII
8
+ string: username=test%40example.com&api_key=TEST_API_KEY&promotion_name=Transactional%20Promotion&from=maxim%2B1%40madmimi.com&subject=Test&list_name=list%201&raw_plain_text=Test%20%5B%5Btracking_beacon%5D%5D%20%5B%5Bopt_out%5D%5D
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ Server:
16
+ - cloudflare-nginx
17
+ Date:
18
+ - Mon, 08 Sep 2014 08:21:19 GMT
19
+ Content-Type:
20
+ - text/html; charset=utf-8
21
+ Transfer-Encoding:
22
+ - chunked
23
+ Connection:
24
+ - keep-alive
25
+ Set-Cookie:
26
+ - __cfduid=de5f44e4ea508bae7a692c2bb861223641410164478576; expires=Mon, 23-Dec-2019
27
+ 23:50:00 GMT; path=/; domain=.madmimi.com; HttpOnly
28
+ - chrome_token=; domain=madmimi.com; path=/; expires=Thu, 01-Jan-1970 00:00:00
29
+ GMT
30
+ - non_eu=true; path=/
31
+ Strict-Transport-Security:
32
+ - max-age=31536000
33
+ X-Ua-Compatible:
34
+ - IE=Edge,chrome=1
35
+ Etag:
36
+ - W/"d947c62c618cfdec5179a061145ecdd5"
37
+ Cache-Control:
38
+ - max-age=0, private, must-revalidate
39
+ X-Request-Id:
40
+ - 124e9d280eeaf996ae70f4d642c1fb36
41
+ X-Rack-Cache:
42
+ - invalidate, pass
43
+ Status:
44
+ - 200 OK
45
+ P3p:
46
+ - CP="CAO PSA OUR"
47
+ Vary:
48
+ - Accept-Encoding
49
+ Cf-Ray:
50
+ - 1669bb5686540479-FRA
51
+ body:
52
+ encoding: US-ASCII
53
+ string: '122048618'
54
+ http_version:
55
+ recorded_at: Mon, 08 Sep 2014 08:21:19 GMT
56
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,56 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.madmimi.com/mailer/to_all
6
+ body:
7
+ encoding: US-ASCII
8
+ string: username=test%40example.com&api_key=TEST_API_KEY&promotion_name=Unknown%20Promotion&from=maxim%2B1%40madmimi.com&subject=Test&to_all=true&raw_plain_text=Test%20%5B%5Bopt_out%5D%5D
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ Server:
16
+ - cloudflare-nginx
17
+ Date:
18
+ - Mon, 08 Sep 2014 08:21:23 GMT
19
+ Content-Type:
20
+ - text/html; charset=utf-8
21
+ Transfer-Encoding:
22
+ - chunked
23
+ Connection:
24
+ - keep-alive
25
+ Set-Cookie:
26
+ - __cfduid=d016071d2adf3281293ec1bc59573397b1410164483290; expires=Mon, 23-Dec-2019
27
+ 23:50:00 GMT; path=/; domain=.madmimi.com; HttpOnly
28
+ - chrome_token=; domain=madmimi.com; path=/; expires=Thu, 01-Jan-1970 00:00:00
29
+ GMT
30
+ - non_eu=true; path=/
31
+ Strict-Transport-Security:
32
+ - max-age=31536000
33
+ X-Ua-Compatible:
34
+ - IE=Edge,chrome=1
35
+ Etag:
36
+ - W/"480c3bdc7ee01f2815e60a008a9411e9"
37
+ Cache-Control:
38
+ - max-age=0, private, must-revalidate
39
+ X-Request-Id:
40
+ - d60e76efbb17f170ab52c5114aa0d653
41
+ X-Rack-Cache:
42
+ - invalidate, pass
43
+ Status:
44
+ - 200 OK
45
+ P3p:
46
+ - CP="CAO PSA OUR"
47
+ Vary:
48
+ - Accept-Encoding
49
+ Cf-Ray:
50
+ - 1669bb73f2aa0479-FRA
51
+ body:
52
+ encoding: US-ASCII
53
+ string: '122048622'
54
+ http_version:
55
+ recorded_at: Mon, 08 Sep 2014 08:21:23 GMT
56
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,51 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.madmimi.com/mailers/status/0
6
+ body:
7
+ encoding: US-ASCII
8
+ string: username=test%40example.com&api_key=TEST_API_KEY
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 410
13
+ message: Gone
14
+ headers:
15
+ Server:
16
+ - cloudflare-nginx
17
+ Date:
18
+ - Mon, 08 Sep 2014 06:37:24 GMT
19
+ Content-Type:
20
+ - text/html
21
+ Transfer-Encoding:
22
+ - chunked
23
+ Connection:
24
+ - keep-alive
25
+ Set-Cookie:
26
+ - __cfduid=d945709fc377c66ed8b3e16f62585223b1410158244090; expires=Mon, 23-Dec-2019
27
+ 23:50:00 GMT; path=/; domain=.madmimi.com; HttpOnly
28
+ Strict-Transport-Security:
29
+ - max-age=31536000
30
+ X-Ua-Compatible:
31
+ - IE=Edge,chrome=1
32
+ Cache-Control:
33
+ - no-cache
34
+ X-Request-Id:
35
+ - 1514eef4e85a7db73d5ab70e07711f98
36
+ X-Rack-Cache:
37
+ - miss
38
+ Status:
39
+ - 410 Gone
40
+ P3p:
41
+ - CP="CAO PSA OUR"
42
+ Vary:
43
+ - Accept-Encoding
44
+ Cf-Ray:
45
+ - 1669231fe3ac0d79-SJC
46
+ body:
47
+ encoding: US-ASCII
48
+ string: Not Found
49
+ http_version:
50
+ recorded_at: Mon, 08 Sep 2014 06:37:24 GMT
51
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,53 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.madmimi.com/mailers/status/10199217171363888473
6
+ body:
7
+ encoding: US-ASCII
8
+ string: username=test%40example.com&api_key=TEST_API_KEY
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ Server:
16
+ - cloudflare-nginx
17
+ Date:
18
+ - Mon, 08 Sep 2014 07:50:25 GMT
19
+ Content-Type:
20
+ - text/html
21
+ Transfer-Encoding:
22
+ - chunked
23
+ Connection:
24
+ - keep-alive
25
+ Set-Cookie:
26
+ - __cfduid=d4ea0de1db95db776f5245cdb8b1fb3cb1410162624786; expires=Mon, 23-Dec-2019
27
+ 23:50:00 GMT; path=/; domain=.madmimi.com; HttpOnly
28
+ Strict-Transport-Security:
29
+ - max-age=31536000
30
+ X-Ua-Compatible:
31
+ - IE=Edge,chrome=1
32
+ Etag:
33
+ - W/"c5946eb9400717fd6f40e26e36cdb498"
34
+ Cache-Control:
35
+ - max-age=0, private, must-revalidate
36
+ X-Request-Id:
37
+ - d3554bf28673656204505345a389cd99
38
+ X-Rack-Cache:
39
+ - miss
40
+ Status:
41
+ - 200 OK
42
+ P3p:
43
+ - CP="CAO PSA OUR"
44
+ Vary:
45
+ - Accept-Encoding
46
+ Cf-Ray:
47
+ - 16698e146a6e088d-FRA
48
+ body:
49
+ encoding: US-ASCII
50
+ string: received
51
+ http_version:
52
+ recorded_at: Mon, 08 Sep 2014 07:50:25 GMT
53
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,51 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.madmimi.com/audience_members/test@example.com/is_suppressed
6
+ body:
7
+ encoding: US-ASCII
8
+ string: username=test%40example.com&api_key=TEST_API_KEY
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ Date:
16
+ - Sun, 07 Sep 2014 19:33:05 GMT
17
+ Content-Type:
18
+ - text/html
19
+ Transfer-Encoding:
20
+ - chunked
21
+ Connection:
22
+ - keep-alive
23
+ Set-Cookie:
24
+ - __cfduid=d8f5243a4ec955f61a2d414863b642a3a1410118384848; expires=Mon, 23-Dec-2019
25
+ 23:50:00 GMT; path=/; domain=.madmimi.com; HttpOnly
26
+ X-Ua-Compatible:
27
+ - IE=Edge,chrome=1
28
+ Etag:
29
+ - W/"b326b5062b2f0e69046810717534cb09"
30
+ Cache-Control:
31
+ - max-age=0, private, must-revalidate
32
+ X-Request-Id:
33
+ - d9afa433fa4fb51f1e70cb56e47cdff9
34
+ X-Rack-Cache:
35
+ - miss
36
+ Status:
37
+ - 200 OK
38
+ P3p:
39
+ - CP="CAO PSA OUR"
40
+ Vary:
41
+ - Accept-Encoding
42
+ Server:
43
+ - cloudflare-nginx
44
+ Cf-Ray:
45
+ - 166556014949088d-FRA
46
+ body:
47
+ encoding: US-ASCII
48
+ string: 'true'
49
+ http_version:
50
+ recorded_at: Sun, 07 Sep 2014 19:33:04 GMT
51
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,102 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.madmimi.com/audience_members/test@example.com/is_suppressed
6
+ body:
7
+ encoding: US-ASCII
8
+ string: username=test%40example.com&api_key=TEST_API_KEY
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ Date:
16
+ - Sun, 07 Sep 2014 19:32:08 GMT
17
+ Content-Type:
18
+ - text/html
19
+ Transfer-Encoding:
20
+ - chunked
21
+ Connection:
22
+ - keep-alive
23
+ Set-Cookie:
24
+ - __cfduid=d491f94d4d37f56967f7efc06145efd961410118328096; expires=Mon, 23-Dec-2019
25
+ 23:50:00 GMT; path=/; domain=.madmimi.com; HttpOnly
26
+ X-Ua-Compatible:
27
+ - IE=Edge,chrome=1
28
+ Etag:
29
+ - W/"68934a3e9455fa72420237eb05902327"
30
+ Cache-Control:
31
+ - max-age=0, private, must-revalidate
32
+ X-Request-Id:
33
+ - 73e91f73869b5109748f451178567353
34
+ X-Rack-Cache:
35
+ - miss
36
+ Status:
37
+ - 200 OK
38
+ P3p:
39
+ - CP="CAO PSA OUR"
40
+ Vary:
41
+ - Accept-Encoding
42
+ Server:
43
+ - cloudflare-nginx
44
+ Cf-Ray:
45
+ - 1665549e98aa0479-FRA
46
+ body:
47
+ encoding: US-ASCII
48
+ string: 'false'
49
+ http_version:
50
+ recorded_at: Sun, 07 Sep 2014 19:32:07 GMT
51
+ - request:
52
+ method: post
53
+ uri: http://api.madmimi.com/suppressed_audience_members
54
+ body:
55
+ encoding: US-ASCII
56
+ string: username=test%40example.com&api_key=TEST_API_KEY&audience_member_id=test%40example.com
57
+ headers: {}
58
+ response:
59
+ status:
60
+ code: 200
61
+ message: OK
62
+ headers:
63
+ Date:
64
+ - Sun, 07 Sep 2014 19:32:08 GMT
65
+ Content-Type:
66
+ - application/json; charset=utf-8
67
+ Transfer-Encoding:
68
+ - chunked
69
+ Connection:
70
+ - keep-alive
71
+ Set-Cookie:
72
+ - __cfduid=d5ee7925668479eb296404ec6047fec101410118328569; expires=Mon, 23-Dec-2019
73
+ 23:50:00 GMT; path=/; domain=.madmimi.com; HttpOnly
74
+ - chrome_token=; domain=madmimi.com; path=/; expires=Thu, 01-Jan-1970 00:00:00
75
+ GMT
76
+ - non_eu=true; path=/
77
+ X-Ua-Compatible:
78
+ - IE=Edge,chrome=1
79
+ Etag:
80
+ - ! '"c3dfaff4a5fecf8f0c431a685fd54383"'
81
+ Cache-Control:
82
+ - max-age=0, private, must-revalidate
83
+ X-Request-Id:
84
+ - 4e4f8e1830433242a9ec0788678beedb
85
+ X-Rack-Cache:
86
+ - invalidate, pass
87
+ Status:
88
+ - 200 OK
89
+ P3p:
90
+ - CP="CAO PSA OUR"
91
+ Server:
92
+ - cloudflare-nginx
93
+ Cf-Ray:
94
+ - 166554a180110479-FRA
95
+ body:
96
+ encoding: US-ASCII
97
+ string: ! '{"success":false,"error":"Couldn''t find AudienceMember with id=test@example.com
98
+ [WHERE `audience_members`.`user_id` = 290143 AND ((audience_members.suppressed
99
+ IS NULL OR audience_members.suppressed = 0))]"}'
100
+ http_version:
101
+ recorded_at: Sun, 07 Sep 2014 19:32:08 GMT
102
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,100 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.madmimi.com/audience_members/test@example.com/is_suppressed
6
+ body:
7
+ encoding: US-ASCII
8
+ string: username=test%40example.com&api_key=TEST_API_KEY
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 400
13
+ message: Bad Request
14
+ headers:
15
+ Date:
16
+ - Sun, 07 Sep 2014 19:30:44 GMT
17
+ Content-Type:
18
+ - text/html
19
+ Transfer-Encoding:
20
+ - chunked
21
+ Connection:
22
+ - keep-alive
23
+ Set-Cookie:
24
+ - __cfduid=de9e318391540c54f02be6b0065b301ff1410118243933; expires=Mon, 23-Dec-2019
25
+ 23:50:00 GMT; path=/; domain=.madmimi.com; HttpOnly
26
+ X-Ua-Compatible:
27
+ - IE=Edge,chrome=1
28
+ Cache-Control:
29
+ - no-cache
30
+ X-Request-Id:
31
+ - b39c636372f3f5ed16181f13564cb13b
32
+ X-Rack-Cache:
33
+ - miss
34
+ Status:
35
+ - 400 Bad Request
36
+ P3p:
37
+ - CP="CAO PSA OUR"
38
+ Vary:
39
+ - Accept-Encoding
40
+ Server:
41
+ - cloudflare-nginx
42
+ Cf-Ray:
43
+ - 166552909e170479-FRA
44
+ body:
45
+ encoding: US-ASCII
46
+ string: test@example.com does not exist
47
+ http_version:
48
+ recorded_at: Sun, 07 Sep 2014 19:30:43 GMT
49
+ - request:
50
+ method: post
51
+ uri: http://api.madmimi.com/suppressed_audience_members
52
+ body:
53
+ encoding: US-ASCII
54
+ string: username=test%40example.com&api_key=TEST_API_KEY&audience_member_id=test%40example.com
55
+ headers: {}
56
+ response:
57
+ status:
58
+ code: 200
59
+ message: OK
60
+ headers:
61
+ Date:
62
+ - Sun, 07 Sep 2014 19:30:44 GMT
63
+ Content-Type:
64
+ - application/json; charset=utf-8
65
+ Transfer-Encoding:
66
+ - chunked
67
+ Connection:
68
+ - keep-alive
69
+ Set-Cookie:
70
+ - __cfduid=d5b79961103567ba33dbed20a24c414181410118244536; expires=Mon, 23-Dec-2019
71
+ 23:50:00 GMT; path=/; domain=.madmimi.com; HttpOnly
72
+ - chrome_token=; domain=madmimi.com; path=/; expires=Thu, 01-Jan-1970 00:00:00
73
+ GMT
74
+ - non_eu=true; path=/
75
+ X-Ua-Compatible:
76
+ - IE=Edge,chrome=1
77
+ Etag:
78
+ - ! '"c3dfaff4a5fecf8f0c431a685fd54383"'
79
+ Cache-Control:
80
+ - max-age=0, private, must-revalidate
81
+ X-Request-Id:
82
+ - b02982fbdb692c65c92e7db599de39aa
83
+ X-Rack-Cache:
84
+ - invalidate, pass
85
+ Status:
86
+ - 200 OK
87
+ P3p:
88
+ - CP="CAO PSA OUR"
89
+ Server:
90
+ - cloudflare-nginx
91
+ Cf-Ray:
92
+ - 1665529455c30479-FRA
93
+ body:
94
+ encoding: US-ASCII
95
+ string: ! '{"success":false,"error":"Couldn''t find AudienceMember with id=test@example.com
96
+ [WHERE `audience_members`.`user_id` = 290143 AND ((audience_members.suppressed
97
+ IS NULL OR audience_members.suppressed = 0))]"}'
98
+ http_version:
99
+ recorded_at: Sun, 07 Sep 2014 19:30:44 GMT
100
+ recorded_with: VCR 2.9.2