newslettre 0.1.0 → 0.1.1

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/.gitignore CHANGED
@@ -3,3 +3,5 @@
3
3
  Gemfile.lock
4
4
  pkg/*
5
5
  config/newslettre.yml
6
+ spec/cassettes
7
+ features/cassettes
@@ -6,8 +6,8 @@ require 'newslettre'
6
6
  VCR.config do |c|
7
7
  c.stub_with :webmock
8
8
  c.cassette_library_dir = 'features/cassettes'
9
- c.filter_sensitive_data('<<USERNAME>>') { NEWSLETTRE_CONFIG['sendgrid']['username'] }
10
- c.filter_sensitive_data('<<PASSWORD>>') { NEWSLETTRE_CONFIG['sendgrid']['password'] }
9
+ c.filter_sensitive_data('<<USERNAME>>') { Curl::PostField.content "api_user", NEWSLETTRE_CONFIG['sendgrid']['username'] }
10
+ c.filter_sensitive_data('<<PASSWORD>>') { Curl::PostField.content "api_key", NEWSLETTRE_CONFIG['sendgrid']['password'] }
11
11
  c.default_cassette_options = { :record => :once }
12
12
  end
13
13
 
@@ -1,21 +1,11 @@
1
1
  class Newslettre::API
2
- include HTTParty
3
- format :json
4
- attr_accessor :email, :password
5
-
6
- base_uri "https://sendgrid.com/api/newsletter"
2
+ attr_accessor :email, :password, :format, :url
7
3
 
8
4
  def initialize options = {}
5
+ @url = "https://sendgrid.com/api/newsletter"
9
6
  @email = options.delete :email
10
7
  @password = options.delete :password
11
- end
12
-
13
- def url
14
- @url ||= self.class.default_options[:base_uri]
15
- end
16
-
17
- def format
18
- @format ||= self.class.default_options[:format]
8
+ @format = :json
19
9
  end
20
10
 
21
11
  def authenticated?
@@ -28,10 +18,13 @@ class Newslettre::API
28
18
  params, options = args
29
19
  params ||= {}
30
20
  options ||= {}
31
- response = self.class.post url_for(m, options), :query => params.merge(credentials)
32
- raise ClientFailure if response.code > 399 and response.code < 500
33
- raise EndpointFailure if response.code > 499
34
- response
21
+
22
+ response, status = request url_for(m, options), params
23
+
24
+ raise ClientFailure if status > 399 and status < 500
25
+ raise EndpointFailure if status > 499
26
+
27
+ respond response
35
28
  end
36
29
  end
37
30
 
@@ -51,7 +44,27 @@ class Newslettre::API
51
44
  }
52
45
  end
53
46
 
47
+ def request address, params
48
+ fields = params.merge(credentials).map { |key, value|
49
+ if value.kind_of? Array
50
+ value.map {|v| Curl::PostField.content("#{key}[]", v.to_s) }
51
+ else
52
+ Curl::PostField.content(key.to_s, value.to_s)
53
+ end
54
+ }.flatten
55
+
56
+ curl = Curl::Easy.new address
57
+
58
+ curl.http_post(*fields)
59
+
60
+ [curl, curl.response_code]
61
+ end
62
+
63
+ def respond response
64
+ JSON.load response.body_str
65
+ end
66
+
54
67
  def url_for path, options = {}
55
- "#{options[:prefix]}/#{path}.#{format}"
68
+ "#{url}#{options[:prefix]}/#{path}.#{format}"
56
69
  end
57
70
  end
@@ -1,3 +1,5 @@
1
+ require 'forwardable'
2
+
1
3
  class Newslettre::APIModuleProxy
2
4
  extend ::Forwardable
3
5
 
@@ -1,3 +1,3 @@
1
1
  module Newslettre
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/newslettre.rb CHANGED
@@ -1,4 +1,5 @@
1
- require 'httparty'
1
+ require 'curb'
2
+ require 'yajl/json_gem'
2
3
 
3
4
  module Newslettre
4
5
  autoload :API, 'newslettre/api'
data/newslettre.gemspec CHANGED
@@ -19,7 +19,10 @@ Gem::Specification.new do |s|
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  s.require_paths = ["lib"]
21
21
 
22
- s.add_dependency "httparty", "~> 0.8"
22
+ s.add_dependency "yajl-ruby", "~> 0.8"
23
+ #s.add_dependency "typhoeus", "~> 0.2"
24
+ #s.add_dependency "faraday", "~> 0.7"
25
+ s.add_dependency "curb", "~> 0.7"
23
26
 
24
27
  s.add_development_dependency "rake", "~> 0.9"
25
28
  s.add_development_dependency "rspec", "~> 2"
@@ -0,0 +1,76 @@
1
+ <!doctype html>
2
+ <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
3
+ <!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
4
+ <!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
5
+ <!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
6
+ <!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
7
+ <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
8
+ <head>
9
+ <meta charset="utf-8">
10
+
11
+ <!-- Use the .htaccess and remove these lines to avoid edge case issues.
12
+ More info: h5bp.com/b/378 -->
13
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
14
+
15
+ <title></title>
16
+ <meta name="description" content="">
17
+ <meta name="author" content="">
18
+
19
+ <!-- Mobile viewport optimized: j.mp/bplateviewport -->
20
+ <meta name="viewport" content="width=device-width,initial-scale=1">
21
+
22
+ <!-- Place favicon.ico and apple-touch-icon.png in the root directory: mathiasbynens.be/notes/touch-icons -->
23
+
24
+ <link rel="stylesheet" href="css/style.css">
25
+
26
+ <!-- More ideas for your <head> here: h5bp.com/d/head-Tips -->
27
+
28
+ <!-- All JavaScript at the bottom, except this Modernizr build incl. Respond.js
29
+ Respond is a polyfill for min/max-width media queries. Modernizr enables HTML5 elements & feature detects;
30
+ for optimal performance, create your own custom Modernizr build: www.modernizr.com/download/ -->
31
+ <script src="js/libs/modernizr-2.0.6.min.js"></script>
32
+ </head>
33
+
34
+ <body>
35
+ <header>
36
+
37
+ </header>
38
+ <div role="main">
39
+
40
+ </div>
41
+ <footer>
42
+
43
+ </footer>
44
+
45
+
46
+ <!-- JavaScript at the bottom for fast page loading -->
47
+
48
+ <!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline -->
49
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
50
+ <script>window.jQuery || document.write('<script src="js/libs/jquery-1.6.4.min.js"><\/script>')</script>
51
+
52
+
53
+ <!-- scripts concatenated and minified via build script -->
54
+ <script defer src="js/plugins.js"></script>
55
+ <script defer src="js/script.js"></script>
56
+ <!-- end scripts -->
57
+
58
+
59
+ <!-- Asynchronous Google Analytics snippet. Change UA-XXXXX-X to be your site's ID.
60
+ mathiasbynens.be/notes/async-analytics-snippet -->
61
+ <script>
62
+ var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview'],['_trackPageLoadTime']];
63
+ (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
64
+ g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
65
+ s.parentNode.insertBefore(g,s)}(document,'script'));
66
+ </script>
67
+
68
+ <!-- Prompt IE 6 users to install Chrome Frame. Remove this if you want to support IE 6.
69
+ chromium.org/developers/how-tos/chrome-frame-getting-started -->
70
+ <!--[if lt IE 7 ]>
71
+ <script defer src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script>
72
+ <script defer>window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})</script>
73
+ <![endif]-->
74
+
75
+ </body>
76
+ </html>
@@ -88,20 +88,23 @@ describe Newslettre do
88
88
  end
89
89
  end
90
90
 
91
- context "with a new list" do
92
- use_vcr_cassette
91
+ end
93
92
 
94
- before(:each) { @lists.add('test-list') }
93
+ context "with a new list" do
94
+ use_vcr_cassette
95
95
 
96
- after(:each) { @lists.delete('test-list') }
96
+ subject { Newslettre::Lists.new @api }
97
97
 
98
- it "should create a new list for recipients" do
99
- list = @lists.get "test-list"
98
+ before(:each) { subject.add('test-list') }
100
99
 
101
- list.should == {"list" => "test-list"}
102
- end
100
+ after(:each) { subject.delete('test-list') }
103
101
 
102
+ it "should create a new list for recipients" do
103
+ list = subject.get "test-list"
104
+
105
+ list.should == {"list" => "test-list"}
104
106
  end
107
+
105
108
  end
106
109
 
107
110
  describe Newslettre::Lists::Email do
@@ -167,6 +170,37 @@ describe Newslettre do
167
170
  end
168
171
  end
169
172
 
173
+ context "with a long letter" do
174
+ use_vcr_cassette
175
+
176
+
177
+ before :each do
178
+ @identity = Newslettre::Identity.new @api
179
+ @identity.add "test-identity", NEWSLETTRE_CONFIG['identity']
180
+
181
+ end
182
+
183
+ after :each do
184
+ @identity.delete "test-identity"
185
+
186
+ end
187
+
188
+ it "should create an HTML mail" do
189
+ data = NEWSLETTRE_CONFIG['letter']
190
+ data["html"] = File.read File.dirname(__FILE__) + "/fixtures/test-letter.html"
191
+ #html = <<-HTML
192
+ # <!doctype html>\n<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->\n<!--[if lt IE 7]> <html class=\"no-js ie6 oldie\" lang=\"en\"> <![endif]-->\n<!--[if IE 7]> <html class=\"no-js ie7 oldie\" lang=\"en\"> <![endif]-->\n<!--[if IE 8]> <html class=\"no-js ie8 oldie\" lang=\"en\"> <![endif]-->\n<!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->\n<!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en\"> <!--<![endif]-->\n<head>\n <meta charset=\"utf-8\">\n\n <!-- Use the .htaccess and remove these lines to avoid edge case issues.\n More info: h5bp.com/b/378 -->\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\n\n <title></title>\n <meta name=\"description\" content=\"\">\n <meta name=\"author\" content=\"\">\n\n <!-- Mobile viewport optimized: j.mp/bplateviewport -->\n <meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n\n <!-- Place favicon.ico and apple-touch-icon.png in the root directory: mathiasbynens.be/notes/touch-icons -->\n\n <link rel=\"stylesheet\" href=\"css/style.css\">\n \n <!-- More ideas for your <head> here: h5bp.com/d/head-Tips -->\n\n <!-- All JavaScript at the bottom, except this Modernizr build incl. Respond.js\n Respond is a polyfill for min/max-width media queries. Modernizr enables HTML5 elements & feature detects; \n for optimal performance, create your own custom Modernizr build: www.modernizr.com/download/ -->\n <script src=\"js/libs/modernizr-2.0.6.min.js\"></script>\n</head>\n\n<body>\n <header>\n\n </header>\n <div role=\"main\">\n\n </div>\n <footer>\n\n </footer>\n\n\n <!-- JavaScript at the bottom for fast page loading -->\n\n <!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline -->\n <script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js\"></script>\n <script>window.jQuery || document.write('<script src=\"js/libs/jquery-1.6.4.min.js\"><\\/script>')</script>\n\n\n <!-- scripts concatenated and minified via build script -->\n <script defer src=\"js/plugins.js\"></script>\n <script defer src=\"js/script.js\"></script>\n <!-- end scripts -->\n\n\n <!-- Asynchronous Google Analytics snippet. Change UA-XXXXX-X to be your site's ID.\n mathiasbynens.be/notes/async-analytics-snippet -->\n <script>\n var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview'],['_trackPageLoadTime']];\n (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];\n g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';\n s.parentNode.insertBefore(g,s)}(document,'script'));\n </script>\n\n <!-- Prompt IE 6 users to install Chrome Frame. Remove this if you want to support IE 6.\n chromium.org/developers/how-tos/chrome-frame-getting-started -->\n <!--[if lt IE 7 ]>\n <script defer src=\"//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js\"></script>\n <script defer>window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})</script>\n <![endif]-->\n\n</body>\n</html>\n
193
+ # HTML
194
+ @newsletter.add 'test-html', data
195
+
196
+ @newsletter.get("test-html").to_hash["html"].should_not be_empty
197
+
198
+ # and then delete it
199
+ @newsletter.delete "test-html"
200
+ end
201
+ end
202
+
203
+
170
204
  end
171
205
 
172
206
  end
data/spec/spec_helper.rb CHANGED
@@ -7,8 +7,8 @@ NEWSLETTRE_CONFIG = YAML.load_file File.dirname(__FILE__) + "/../config/newslett
7
7
  VCR.config do |c|
8
8
  c.cassette_library_dir = "spec/cassettes"
9
9
  c.stub_with :webmock
10
- c.filter_sensitive_data('<<USERNAME>>') { NEWSLETTRE_CONFIG['sendgrid']['username'] }
11
- c.filter_sensitive_data('<<PASSWORD>>') { NEWSLETTRE_CONFIG['sendgrid']['password'] }
10
+ c.filter_sensitive_data('<<USERNAME>>') { Curl::PostField.content "api_user", NEWSLETTRE_CONFIG['sendgrid']['username'] }
11
+ c.filter_sensitive_data('<<PASSWORD>>') { Curl::PostField.content "api_key", NEWSLETTRE_CONFIG['sendgrid']['password'] }
12
12
  c.default_cassette_options = { :record => :once }
13
13
  end
14
14
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newslettre
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,8 +13,8 @@ date: 2011-09-21 00:00:00.000000000 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: httparty
17
- requirement: &2153366660 !ruby/object:Gem::Requirement
16
+ name: yajl-ruby
17
+ requirement: &2153070980 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,21 @@ dependencies:
22
22
  version: '0.8'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2153366660
25
+ version_requirements: *2153070980
26
+ - !ruby/object:Gem::Dependency
27
+ name: curb
28
+ requirement: &2153067480 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '0.7'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: *2153067480
26
37
  - !ruby/object:Gem::Dependency
27
38
  name: rake
28
- requirement: &2153365360 !ruby/object:Gem::Requirement
39
+ requirement: &2153055680 !ruby/object:Gem::Requirement
29
40
  none: false
30
41
  requirements:
31
42
  - - ~>
@@ -33,10 +44,10 @@ dependencies:
33
44
  version: '0.9'
34
45
  type: :development
35
46
  prerelease: false
36
- version_requirements: *2153365360
47
+ version_requirements: *2153055680
37
48
  - !ruby/object:Gem::Dependency
38
49
  name: rspec
39
- requirement: &2153363440 !ruby/object:Gem::Requirement
50
+ requirement: &2153044700 !ruby/object:Gem::Requirement
40
51
  none: false
41
52
  requirements:
42
53
  - - ~>
@@ -44,10 +55,10 @@ dependencies:
44
55
  version: '2'
45
56
  type: :development
46
57
  prerelease: false
47
- version_requirements: *2153363440
58
+ version_requirements: *2153044700
48
59
  - !ruby/object:Gem::Dependency
49
60
  name: webmock
50
- requirement: &2153362080 !ruby/object:Gem::Requirement
61
+ requirement: &2153031300 !ruby/object:Gem::Requirement
51
62
  none: false
52
63
  requirements:
53
64
  - - ~>
@@ -55,10 +66,10 @@ dependencies:
55
66
  version: '1.7'
56
67
  type: :development
57
68
  prerelease: false
58
- version_requirements: *2153362080
69
+ version_requirements: *2153031300
59
70
  - !ruby/object:Gem::Dependency
60
71
  name: vcr
61
- requirement: &2153360040 !ruby/object:Gem::Requirement
72
+ requirement: &2153027260 !ruby/object:Gem::Requirement
62
73
  none: false
63
74
  requirements:
64
75
  - - ~>
@@ -66,10 +77,10 @@ dependencies:
66
77
  version: '1.11'
67
78
  type: :development
68
79
  prerelease: false
69
- version_requirements: *2153360040
80
+ version_requirements: *2153027260
70
81
  - !ruby/object:Gem::Dependency
71
82
  name: cucumber
72
- requirement: &2153358380 !ruby/object:Gem::Requirement
83
+ requirement: &2153018380 !ruby/object:Gem::Requirement
73
84
  none: false
74
85
  requirements:
75
86
  - - ~>
@@ -77,7 +88,7 @@ dependencies:
77
88
  version: '1'
78
89
  type: :development
79
90
  prerelease: false
80
- version_requirements: *2153358380
91
+ version_requirements: *2153018380
81
92
  description: Create and Manage Newsletters using the Sendgrid API
82
93
  email:
83
94
  - l@melzer.it
@@ -90,8 +101,6 @@ files:
90
101
  - Gemfile
91
102
  - README.md
92
103
  - Rakefile
93
- - features/cassettes/cucumber_tags/sendgrid_adding_recipients.yml
94
- - features/cassettes/cucumber_tags/sendgrid_removing_recipients.yml
95
104
  - features/recipients.feature
96
105
  - features/step_definitions/recipients_steps.rb
97
106
  - features/support/env.rb
@@ -105,15 +114,7 @@ files:
105
114
  - lib/newslettre/lists.rb
106
115
  - lib/newslettre/version.rb
107
116
  - newslettre.gemspec
108
- - spec/cassettes/Newslettre/Newslettre_Identity.yml
109
- - spec/cassettes/Newslettre/Newslettre_Identity/with_a_new_identity.yml
110
- - spec/cassettes/Newslettre/Newslettre_Letter.yml
111
- - spec/cassettes/Newslettre/Newslettre_Letter/with_a_new_letter.yml
112
- - spec/cassettes/Newslettre/Newslettre_Lists.yml
113
- - spec/cassettes/Newslettre/Newslettre_Lists/with_a_new_list.yml
114
- - spec/cassettes/Newslettre/Newslettre_Lists_Email.yml
115
- - spec/cassettes/Newslettre/http_actions.yml
116
- - spec/cassettes/upon_raising_errors.yml
117
+ - spec/fixtures/test-letter.html
117
118
  - spec/high_level_api_spec.rb
118
119
  - spec/low_level_spec.rb
119
120
  - spec/spec_helper.rb
@@ -143,20 +144,10 @@ signing_key:
143
144
  specification_version: 3
144
145
  summary: Sendgrid Newsletter API Client
145
146
  test_files:
146
- - features/cassettes/cucumber_tags/sendgrid_adding_recipients.yml
147
- - features/cassettes/cucumber_tags/sendgrid_removing_recipients.yml
148
147
  - features/recipients.feature
149
148
  - features/step_definitions/recipients_steps.rb
150
149
  - features/support/env.rb
151
- - spec/cassettes/Newslettre/Newslettre_Identity.yml
152
- - spec/cassettes/Newslettre/Newslettre_Identity/with_a_new_identity.yml
153
- - spec/cassettes/Newslettre/Newslettre_Letter.yml
154
- - spec/cassettes/Newslettre/Newslettre_Letter/with_a_new_letter.yml
155
- - spec/cassettes/Newslettre/Newslettre_Lists.yml
156
- - spec/cassettes/Newslettre/Newslettre_Lists/with_a_new_list.yml
157
- - spec/cassettes/Newslettre/Newslettre_Lists_Email.yml
158
- - spec/cassettes/Newslettre/http_actions.yml
159
- - spec/cassettes/upon_raising_errors.yml
150
+ - spec/fixtures/test-letter.html
160
151
  - spec/high_level_api_spec.rb
161
152
  - spec/low_level_spec.rb
162
153
  - spec/spec_helper.rb
@@ -1,185 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :post
5
- uri: https://sendgrid.com:443/api/newsletter/delete.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&name=Superior%20Soy%20Beans%20Discount!
6
- body: !!null
7
- headers: !!null
8
- response: !ruby/struct:VCR::Response
9
- status: !ruby/struct:VCR::ResponseStatus
10
- code: 200
11
- message: OK
12
- headers:
13
- server:
14
- - nginx/0.7.65
15
- date:
16
- - Tue, 20 Sep 2011 14:59:13 GMT
17
- content-type:
18
- - text/html
19
- transfer-encoding:
20
- - chunked
21
- connection:
22
- - keep-alive
23
- body: ! '{"message": "success"}'
24
- http_version: '1.1'
25
- - !ruby/struct:VCR::HTTPInteraction
26
- request: !ruby/struct:VCR::Request
27
- method: :post
28
- uri: https://sendgrid.com:443/api/newsletter/lists/delete.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&list=Junk-food%20addicts
29
- body: !!null
30
- headers: !!null
31
- response: !ruby/struct:VCR::Response
32
- status: !ruby/struct:VCR::ResponseStatus
33
- code: 200
34
- message: OK
35
- headers:
36
- server:
37
- - nginx/0.7.65
38
- date:
39
- - Tue, 20 Sep 2011 14:59:13 GMT
40
- content-type:
41
- - text/html
42
- transfer-encoding:
43
- - chunked
44
- connection:
45
- - keep-alive
46
- body: ! '{"message": "success"}'
47
- http_version: '1.1'
48
- - !ruby/struct:VCR::HTTPInteraction
49
- request: !ruby/struct:VCR::Request
50
- method: :post
51
- uri: https://sendgrid.com:443/api/newsletter/identity/delete.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&identity=Bourne
52
- body: !!null
53
- headers: !!null
54
- response: !ruby/struct:VCR::Response
55
- status: !ruby/struct:VCR::ResponseStatus
56
- code: 200
57
- message: OK
58
- headers:
59
- server:
60
- - nginx/0.7.65
61
- date:
62
- - Tue, 20 Sep 2011 14:59:14 GMT
63
- content-type:
64
- - text/html
65
- transfer-encoding:
66
- - chunked
67
- connection:
68
- - keep-alive
69
- body: ! '{"message": "success"}'
70
- http_version: '1.1'
71
- - !ruby/struct:VCR::HTTPInteraction
72
- request: !ruby/struct:VCR::Request
73
- method: :post
74
- uri: https://sendgrid.com:443/api/newsletter/identity/add.json?address=Oranienstra%C3%9Fe%206&api_key=<<PASSWORD>>&api_user=<<USERNAME>>&city=Berlin&country=DE&email=<<USERNAME>>&identity=Bourne&name=Mathias%20Fiedler&state=B&zip=10997
75
- body: !!null
76
- headers: !!null
77
- response: !ruby/struct:VCR::Response
78
- status: !ruby/struct:VCR::ResponseStatus
79
- code: 200
80
- message: OK
81
- headers:
82
- server:
83
- - nginx/0.7.65
84
- date:
85
- - Tue, 20 Sep 2011 14:59:15 GMT
86
- content-type:
87
- - text/html
88
- transfer-encoding:
89
- - chunked
90
- connection:
91
- - keep-alive
92
- body: ! '{"message": "success"}'
93
- http_version: '1.1'
94
- - !ruby/struct:VCR::HTTPInteraction
95
- request: !ruby/struct:VCR::Request
96
- method: :post
97
- uri: https://sendgrid.com:443/api/newsletter/add.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&html=%3Ch1%3Emeow%3C/h1%3E&identity=Bourne&name=Superior%20Soy%20Beans%20Discount!&subject=Superior%20Soy%20Beans%20Discount!&text=Super%20Cool!
98
- body: !!null
99
- headers: !!null
100
- response: !ruby/struct:VCR::Response
101
- status: !ruby/struct:VCR::ResponseStatus
102
- code: 200
103
- message: OK
104
- headers:
105
- server:
106
- - nginx/0.7.65
107
- date:
108
- - Tue, 20 Sep 2011 14:59:16 GMT
109
- content-type:
110
- - text/html
111
- transfer-encoding:
112
- - chunked
113
- connection:
114
- - keep-alive
115
- body: ! '{"message": "success"}'
116
- http_version: '1.1'
117
- - !ruby/struct:VCR::HTTPInteraction
118
- request: !ruby/struct:VCR::Request
119
- method: :post
120
- uri: https://sendgrid.com:443/api/newsletter/lists/add.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&list=Junk-food%20addicts
121
- body: !!null
122
- headers: !!null
123
- response: !ruby/struct:VCR::Response
124
- status: !ruby/struct:VCR::ResponseStatus
125
- code: 200
126
- message: OK
127
- headers:
128
- server:
129
- - nginx/0.7.65
130
- date:
131
- - Tue, 20 Sep 2011 14:59:17 GMT
132
- content-type:
133
- - text/html
134
- transfer-encoding:
135
- - chunked
136
- connection:
137
- - keep-alive
138
- body: ! '{"message": "success"}'
139
- http_version: '1.1'
140
- - !ruby/struct:VCR::HTTPInteraction
141
- request: !ruby/struct:VCR::Request
142
- method: :post
143
- uri: https://sendgrid.com:443/api/newsletter/recipients/add.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&list=Junk-food%20addicts&name=Superior%20Soy%20Beans%20Discount!
144
- body: !!null
145
- headers: !!null
146
- response: !ruby/struct:VCR::Response
147
- status: !ruby/struct:VCR::ResponseStatus
148
- code: 200
149
- message: OK
150
- headers:
151
- server:
152
- - nginx/0.7.65
153
- date:
154
- - Tue, 20 Sep 2011 14:59:18 GMT
155
- content-type:
156
- - text/html
157
- transfer-encoding:
158
- - chunked
159
- connection:
160
- - keep-alive
161
- body: ! '{"message": "success"}'
162
- http_version: '1.1'
163
- - !ruby/struct:VCR::HTTPInteraction
164
- request: !ruby/struct:VCR::Request
165
- method: :post
166
- uri: https://sendgrid.com:443/api/newsletter/recipients/get.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&name=Superior%20Soy%20Beans%20Discount!
167
- body: !!null
168
- headers: !!null
169
- response: !ruby/struct:VCR::Response
170
- status: !ruby/struct:VCR::ResponseStatus
171
- code: 200
172
- message: OK
173
- headers:
174
- server:
175
- - nginx/0.7.65
176
- date:
177
- - Tue, 20 Sep 2011 14:59:19 GMT
178
- content-type:
179
- - text/html
180
- transfer-encoding:
181
- - chunked
182
- connection:
183
- - keep-alive
184
- body: ! '[{"list": "Junk-food addicts"}]'
185
- http_version: '1.1'
@@ -1,208 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :post
5
- uri: https://sendgrid.com:443/api/newsletter/delete.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&name=Superior%20Soy%20Beans%20Discount!
6
- body: !!null
7
- headers: !!null
8
- response: !ruby/struct:VCR::Response
9
- status: !ruby/struct:VCR::ResponseStatus
10
- code: 200
11
- message: OK
12
- headers:
13
- server:
14
- - nginx/0.7.65
15
- date:
16
- - Tue, 20 Sep 2011 14:59:20 GMT
17
- content-type:
18
- - text/html
19
- transfer-encoding:
20
- - chunked
21
- connection:
22
- - keep-alive
23
- body: ! '{"message": "success"}'
24
- http_version: '1.1'
25
- - !ruby/struct:VCR::HTTPInteraction
26
- request: !ruby/struct:VCR::Request
27
- method: :post
28
- uri: https://sendgrid.com:443/api/newsletter/lists/delete.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&list=Junk-food%20addicts
29
- body: !!null
30
- headers: !!null
31
- response: !ruby/struct:VCR::Response
32
- status: !ruby/struct:VCR::ResponseStatus
33
- code: 200
34
- message: OK
35
- headers:
36
- server:
37
- - nginx/0.7.65
38
- date:
39
- - Tue, 20 Sep 2011 14:59:21 GMT
40
- content-type:
41
- - text/html
42
- transfer-encoding:
43
- - chunked
44
- connection:
45
- - keep-alive
46
- body: ! '{"message": "success"}'
47
- http_version: '1.1'
48
- - !ruby/struct:VCR::HTTPInteraction
49
- request: !ruby/struct:VCR::Request
50
- method: :post
51
- uri: https://sendgrid.com:443/api/newsletter/identity/delete.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&identity=Bourne
52
- body: !!null
53
- headers: !!null
54
- response: !ruby/struct:VCR::Response
55
- status: !ruby/struct:VCR::ResponseStatus
56
- code: 200
57
- message: OK
58
- headers:
59
- server:
60
- - nginx/0.7.65
61
- date:
62
- - Tue, 20 Sep 2011 14:59:21 GMT
63
- content-type:
64
- - text/html
65
- transfer-encoding:
66
- - chunked
67
- connection:
68
- - keep-alive
69
- body: ! '{"message": "success"}'
70
- http_version: '1.1'
71
- - !ruby/struct:VCR::HTTPInteraction
72
- request: !ruby/struct:VCR::Request
73
- method: :post
74
- uri: https://sendgrid.com:443/api/newsletter/identity/add.json?address=Oranienstra%C3%9Fe%206&api_key=<<PASSWORD>>&api_user=<<USERNAME>>&city=Berlin&country=DE&email=<<USERNAME>>&identity=Bourne&name=Mathias%20Fiedler&state=B&zip=10997
75
- body: !!null
76
- headers: !!null
77
- response: !ruby/struct:VCR::Response
78
- status: !ruby/struct:VCR::ResponseStatus
79
- code: 200
80
- message: OK
81
- headers:
82
- server:
83
- - nginx/0.7.65
84
- date:
85
- - Tue, 20 Sep 2011 14:59:22 GMT
86
- content-type:
87
- - text/html
88
- transfer-encoding:
89
- - chunked
90
- connection:
91
- - keep-alive
92
- body: ! '{"message": "success"}'
93
- http_version: '1.1'
94
- - !ruby/struct:VCR::HTTPInteraction
95
- request: !ruby/struct:VCR::Request
96
- method: :post
97
- uri: https://sendgrid.com:443/api/newsletter/add.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&html=%3Ch1%3Emeow%3C/h1%3E&identity=Bourne&name=Superior%20Soy%20Beans%20Discount!&subject=Superior%20Soy%20Beans%20Discount!&text=Super%20Cool!
98
- body: !!null
99
- headers: !!null
100
- response: !ruby/struct:VCR::Response
101
- status: !ruby/struct:VCR::ResponseStatus
102
- code: 200
103
- message: OK
104
- headers:
105
- server:
106
- - nginx/0.7.65
107
- date:
108
- - Tue, 20 Sep 2011 14:59:23 GMT
109
- content-type:
110
- - text/html
111
- transfer-encoding:
112
- - chunked
113
- connection:
114
- - keep-alive
115
- body: ! '{"message": "success"}'
116
- http_version: '1.1'
117
- - !ruby/struct:VCR::HTTPInteraction
118
- request: !ruby/struct:VCR::Request
119
- method: :post
120
- uri: https://sendgrid.com:443/api/newsletter/lists/add.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&list=Junk-food%20addicts
121
- body: !!null
122
- headers: !!null
123
- response: !ruby/struct:VCR::Response
124
- status: !ruby/struct:VCR::ResponseStatus
125
- code: 200
126
- message: OK
127
- headers:
128
- server:
129
- - nginx/0.7.65
130
- date:
131
- - Tue, 20 Sep 2011 14:59:24 GMT
132
- content-type:
133
- - text/html
134
- transfer-encoding:
135
- - chunked
136
- connection:
137
- - keep-alive
138
- body: ! '{"message": "success"}'
139
- http_version: '1.1'
140
- - !ruby/struct:VCR::HTTPInteraction
141
- request: !ruby/struct:VCR::Request
142
- method: :post
143
- uri: https://sendgrid.com:443/api/newsletter/recipients/add.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&list=Junk-food%20addicts&name=Superior%20Soy%20Beans%20Discount!
144
- body: !!null
145
- headers: !!null
146
- response: !ruby/struct:VCR::Response
147
- status: !ruby/struct:VCR::ResponseStatus
148
- code: 200
149
- message: OK
150
- headers:
151
- server:
152
- - nginx/0.7.65
153
- date:
154
- - Tue, 20 Sep 2011 14:59:25 GMT
155
- content-type:
156
- - text/html
157
- transfer-encoding:
158
- - chunked
159
- connection:
160
- - keep-alive
161
- body: ! '{"message": "success"}'
162
- http_version: '1.1'
163
- - !ruby/struct:VCR::HTTPInteraction
164
- request: !ruby/struct:VCR::Request
165
- method: :post
166
- uri: https://sendgrid.com:443/api/newsletter/recipients/delete.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&list=Junk-food%20addicts&name=Superior%20Soy%20Beans%20Discount!
167
- body: !!null
168
- headers: !!null
169
- response: !ruby/struct:VCR::Response
170
- status: !ruby/struct:VCR::ResponseStatus
171
- code: 200
172
- message: OK
173
- headers:
174
- server:
175
- - nginx/0.7.65
176
- date:
177
- - Tue, 20 Sep 2011 14:59:26 GMT
178
- content-type:
179
- - text/html
180
- transfer-encoding:
181
- - chunked
182
- connection:
183
- - keep-alive
184
- body: ! '{"message": "success"}'
185
- http_version: '1.1'
186
- - !ruby/struct:VCR::HTTPInteraction
187
- request: !ruby/struct:VCR::Request
188
- method: :post
189
- uri: https://sendgrid.com:443/api/newsletter/recipients/get.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&name=Superior%20Soy%20Beans%20Discount!
190
- body: !!null
191
- headers: !!null
192
- response: !ruby/struct:VCR::Response
193
- status: !ruby/struct:VCR::ResponseStatus
194
- code: 200
195
- message: OK
196
- headers:
197
- server:
198
- - nginx/0.7.65
199
- date:
200
- - Tue, 20 Sep 2011 14:59:26 GMT
201
- content-type:
202
- - text/html
203
- transfer-encoding:
204
- - chunked
205
- connection:
206
- - keep-alive
207
- body: ! '[]'
208
- http_version: '1.1'
@@ -1,72 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :post
5
- uri: https://sendgrid.com:443/api/newsletter/identity/add.json?address=Oranienstra%C3%9Fe%206&api_key=<<PASSWORD>>&api_user=<<USERNAME>>&city=Berlin&country=DE&email=<<USERNAME>>&identity=test-identity&name=Mathias%20Fiedler&state=B&zip=10997
6
- body: !!null
7
- headers: !!null
8
- response: !ruby/struct:VCR::Response
9
- status: !ruby/struct:VCR::ResponseStatus
10
- code: 200
11
- message: OK
12
- headers:
13
- server:
14
- - nginx/0.7.65
15
- date:
16
- - Tue, 20 Sep 2011 14:26:56 GMT
17
- content-type:
18
- - text/html
19
- transfer-encoding:
20
- - chunked
21
- connection:
22
- - keep-alive
23
- body: ! '{"message": "success"}'
24
- http_version: '1.1'
25
- - !ruby/struct:VCR::HTTPInteraction
26
- request: !ruby/struct:VCR::Request
27
- method: :post
28
- uri: https://sendgrid.com:443/api/newsletter/identity/get.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&identity=test-identity
29
- body: !!null
30
- headers: !!null
31
- response: !ruby/struct:VCR::Response
32
- status: !ruby/struct:VCR::ResponseStatus
33
- code: 200
34
- message: OK
35
- headers:
36
- server:
37
- - nginx/0.7.65
38
- date:
39
- - Tue, 20 Sep 2011 14:26:57 GMT
40
- content-type:
41
- - text/html
42
- transfer-encoding:
43
- - chunked
44
- connection:
45
- - keep-alive
46
- body: ! '{"city": "Berlin", "name": "Mathias Fiedler", "zip": "10997", "country":
47
- "DE", "state": "B", "address": "Oranienstra\u00dfe 6", "email": "<<USERNAME>>",
48
- "identity": "test-identity"}'
49
- http_version: '1.1'
50
- - !ruby/struct:VCR::HTTPInteraction
51
- request: !ruby/struct:VCR::Request
52
- method: :post
53
- uri: https://sendgrid.com:443/api/newsletter/identity/delete.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&identity=test-identity
54
- body: !!null
55
- headers: !!null
56
- response: !ruby/struct:VCR::Response
57
- status: !ruby/struct:VCR::ResponseStatus
58
- code: 200
59
- message: OK
60
- headers:
61
- server:
62
- - nginx/0.7.65
63
- date:
64
- - Tue, 20 Sep 2011 14:26:58 GMT
65
- content-type:
66
- - text/html
67
- transfer-encoding:
68
- - chunked
69
- connection:
70
- - keep-alive
71
- body: ! '{"message": "success"}'
72
- http_version: '1.1'
@@ -1,24 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :post
5
- uri: https://sendgrid.com:443/api/newsletter/identity/list.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>
6
- body: !!null
7
- headers: !!null
8
- response: !ruby/struct:VCR::Response
9
- status: !ruby/struct:VCR::ResponseStatus
10
- code: 200
11
- message: OK
12
- headers:
13
- server:
14
- - nginx/0.7.65
15
- date:
16
- - Tue, 20 Sep 2011 14:26:55 GMT
17
- content-type:
18
- - text/html
19
- transfer-encoding:
20
- - chunked
21
- connection:
22
- - keep-alive
23
- body: ! '[{"identity": "da9febf06480f7bb88264fc907f75995"}]'
24
- http_version: '1.1'
@@ -1,118 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :post
5
- uri: https://sendgrid.com:443/api/newsletter/identity/add.json?address=Oranienstra%C3%9Fe%206&api_key=<<PASSWORD>>&api_user=<<USERNAME>>&city=Berlin&country=DE&email=<<USERNAME>>&identity=test-identity&name=Mathias%20Fiedler&state=B&zip=10997
6
- body: !!null
7
- headers: !!null
8
- response: !ruby/struct:VCR::Response
9
- status: !ruby/struct:VCR::ResponseStatus
10
- code: 200
11
- message: OK
12
- headers:
13
- server:
14
- - nginx/0.7.65
15
- date:
16
- - Tue, 20 Sep 2011 14:27:07 GMT
17
- content-type:
18
- - text/html
19
- transfer-encoding:
20
- - chunked
21
- connection:
22
- - keep-alive
23
- body: ! '{"message": "success"}'
24
- http_version: '1.1'
25
- - !ruby/struct:VCR::HTTPInteraction
26
- request: !ruby/struct:VCR::Request
27
- method: :post
28
- uri: https://sendgrid.com:443/api/newsletter/add.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&html=%3Chtml%3E%3Cbody%3E%3Ch1%3EA%20rendered%20Headline%3C/h1%3E%3C/body%3E%3C/html%3E&identity=test-identity&name=test&subject=A%20letter%20to%20the%20world!&text=An%20unrendered%20Headline
29
- body: !!null
30
- headers: !!null
31
- response: !ruby/struct:VCR::Response
32
- status: !ruby/struct:VCR::ResponseStatus
33
- code: 200
34
- message: OK
35
- headers:
36
- server:
37
- - nginx/0.7.65
38
- date:
39
- - Tue, 20 Sep 2011 14:27:08 GMT
40
- content-type:
41
- - text/html
42
- transfer-encoding:
43
- - chunked
44
- connection:
45
- - keep-alive
46
- body: ! '{"message": "success"}'
47
- http_version: '1.1'
48
- - !ruby/struct:VCR::HTTPInteraction
49
- request: !ruby/struct:VCR::Request
50
- method: :post
51
- uri: https://sendgrid.com:443/api/newsletter/get.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&name=test
52
- body: !!null
53
- headers: !!null
54
- response: !ruby/struct:VCR::Response
55
- status: !ruby/struct:VCR::ResponseStatus
56
- code: 200
57
- message: OK
58
- headers:
59
- server:
60
- - nginx/0.7.65
61
- date:
62
- - Tue, 20 Sep 2011 14:27:09 GMT
63
- content-type:
64
- - text/html
65
- transfer-encoding:
66
- - chunked
67
- connection:
68
- - keep-alive
69
- body: ! '{"name": "test", "text": "An unrendered Headline", "html": "<html><body><h1>A
70
- rendered Headline</h1></body></html>", "identity": "test-identity", "subject":
71
- "A letter to the world!"}'
72
- http_version: '1.1'
73
- - !ruby/struct:VCR::HTTPInteraction
74
- request: !ruby/struct:VCR::Request
75
- method: :post
76
- uri: https://sendgrid.com:443/api/newsletter/identity/delete.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&identity=test-identity
77
- body: !!null
78
- headers: !!null
79
- response: !ruby/struct:VCR::Response
80
- status: !ruby/struct:VCR::ResponseStatus
81
- code: 200
82
- message: OK
83
- headers:
84
- server:
85
- - nginx/0.7.65
86
- date:
87
- - Tue, 20 Sep 2011 14:27:10 GMT
88
- content-type:
89
- - text/html
90
- transfer-encoding:
91
- - chunked
92
- connection:
93
- - keep-alive
94
- body: ! '{"message": "success"}'
95
- http_version: '1.1'
96
- - !ruby/struct:VCR::HTTPInteraction
97
- request: !ruby/struct:VCR::Request
98
- method: :post
99
- uri: https://sendgrid.com:443/api/newsletter/delete.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&name=test
100
- body: !!null
101
- headers: !!null
102
- response: !ruby/struct:VCR::Response
103
- status: !ruby/struct:VCR::ResponseStatus
104
- code: 200
105
- message: OK
106
- headers:
107
- server:
108
- - nginx/0.7.65
109
- date:
110
- - Tue, 20 Sep 2011 14:27:11 GMT
111
- content-type:
112
- - text/html
113
- transfer-encoding:
114
- - chunked
115
- connection:
116
- - keep-alive
117
- body: ! '{"message": "success"}'
118
- http_version: '1.1'
@@ -1,24 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :post
5
- uri: https://sendgrid.com:443/api/newsletter/list.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>
6
- body: !!null
7
- headers: !!null
8
- response: !ruby/struct:VCR::Response
9
- status: !ruby/struct:VCR::ResponseStatus
10
- code: 200
11
- message: OK
12
- headers:
13
- server:
14
- - nginx/0.7.65
15
- date:
16
- - Tue, 20 Sep 2011 14:27:06 GMT
17
- content-type:
18
- - text/html
19
- transfer-encoding:
20
- - chunked
21
- connection:
22
- - keep-alive
23
- body: ! '[]'
24
- http_version: '1.1'
@@ -1,70 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :post
5
- uri: https://sendgrid.com:443/api/newsletter/lists/add.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&list=test-list
6
- body: !!null
7
- headers: !!null
8
- response: !ruby/struct:VCR::Response
9
- status: !ruby/struct:VCR::ResponseStatus
10
- code: 200
11
- message: OK
12
- headers:
13
- server:
14
- - nginx/0.7.65
15
- date:
16
- - Tue, 20 Sep 2011 14:26:59 GMT
17
- content-type:
18
- - text/html
19
- transfer-encoding:
20
- - chunked
21
- connection:
22
- - keep-alive
23
- body: ! '{"message": "success"}'
24
- http_version: '1.1'
25
- - !ruby/struct:VCR::HTTPInteraction
26
- request: !ruby/struct:VCR::Request
27
- method: :post
28
- uri: https://sendgrid.com:443/api/newsletter/lists/get.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&list=test-list
29
- body: !!null
30
- headers: !!null
31
- response: !ruby/struct:VCR::Response
32
- status: !ruby/struct:VCR::ResponseStatus
33
- code: 200
34
- message: OK
35
- headers:
36
- server:
37
- - nginx/0.7.65
38
- date:
39
- - Tue, 20 Sep 2011 14:27:00 GMT
40
- content-type:
41
- - text/html
42
- transfer-encoding:
43
- - chunked
44
- connection:
45
- - keep-alive
46
- body: ! '[{"list": "test-list"}]'
47
- http_version: '1.1'
48
- - !ruby/struct:VCR::HTTPInteraction
49
- request: !ruby/struct:VCR::Request
50
- method: :post
51
- uri: https://sendgrid.com:443/api/newsletter/lists/delete.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&list=test-list
52
- body: !!null
53
- headers: !!null
54
- response: !ruby/struct:VCR::Response
55
- status: !ruby/struct:VCR::ResponseStatus
56
- code: 200
57
- message: OK
58
- headers:
59
- server:
60
- - nginx/0.7.65
61
- date:
62
- - Tue, 20 Sep 2011 14:27:01 GMT
63
- content-type:
64
- - text/html
65
- transfer-encoding:
66
- - chunked
67
- connection:
68
- - keep-alive
69
- body: ! '{"message": "success"}'
70
- http_version: '1.1'
@@ -1,24 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :post
5
- uri: https://sendgrid.com:443/api/newsletter/lists/get.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>
6
- body: !!null
7
- headers: !!null
8
- response: !ruby/struct:VCR::Response
9
- status: !ruby/struct:VCR::ResponseStatus
10
- code: 200
11
- message: OK
12
- headers:
13
- server:
14
- - nginx/0.7.65
15
- date:
16
- - Tue, 20 Sep 2011 14:26:58 GMT
17
- content-type:
18
- - text/html
19
- transfer-encoding:
20
- - chunked
21
- connection:
22
- - keep-alive
23
- body: ! '[{"list": "testuser"}]'
24
- http_version: '1.1'
@@ -1,117 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :post
5
- uri: https://sendgrid.com:443/api/newsletter/lists/add.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&list=test-list
6
- body: !!null
7
- headers: !!null
8
- response: !ruby/struct:VCR::Response
9
- status: !ruby/struct:VCR::ResponseStatus
10
- code: 200
11
- message: OK
12
- headers:
13
- server:
14
- - nginx/0.7.65
15
- date:
16
- - Tue, 20 Sep 2011 14:27:02 GMT
17
- content-type:
18
- - text/html
19
- transfer-encoding:
20
- - chunked
21
- connection:
22
- - keep-alive
23
- body: ! '{"message": "success"}'
24
- http_version: '1.1'
25
- - !ruby/struct:VCR::HTTPInteraction
26
- request: !ruby/struct:VCR::Request
27
- method: :post
28
- uri: https://sendgrid.com:443/api/newsletter/lists/email/add.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&list=test-list&data%5B0%5D=%7B%22email%22:%22me@lmaa.name%22,%22name%22:%22Lennart%20Melzer%22%7D&data%5B1%5D=%7B%22email%22:%22<<USERNAME>>%22,%22name%22:%22Mathias%20Fiedler%22%7D
29
- body: !!null
30
- headers: !!null
31
- response: !ruby/struct:VCR::Response
32
- status: !ruby/struct:VCR::ResponseStatus
33
- code: 200
34
- message: OK
35
- headers:
36
- server:
37
- - nginx/0.7.65
38
- date:
39
- - Tue, 20 Sep 2011 14:27:03 GMT
40
- content-type:
41
- - text/html
42
- transfer-encoding:
43
- - chunked
44
- connection:
45
- - keep-alive
46
- body: ! '{"inserted": 2}'
47
- http_version: '1.1'
48
- - !ruby/struct:VCR::HTTPInteraction
49
- request: !ruby/struct:VCR::Request
50
- method: :post
51
- uri: https://sendgrid.com:443/api/newsletter/lists/email/get.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&list=test-list
52
- body: !!null
53
- headers: !!null
54
- response: !ruby/struct:VCR::Response
55
- status: !ruby/struct:VCR::ResponseStatus
56
- code: 200
57
- message: OK
58
- headers:
59
- server:
60
- - nginx/0.7.65
61
- date:
62
- - Tue, 20 Sep 2011 14:27:04 GMT
63
- content-type:
64
- - text/html
65
- transfer-encoding:
66
- - chunked
67
- connection:
68
- - keep-alive
69
- body: ! '[{"email": "<<USERNAME>>", "name": "Mathias Fiedler"},{"email": "me@lmaa.name",
70
- "name": "Lennart Melzer"}]'
71
- http_version: '1.1'
72
- - !ruby/struct:VCR::HTTPInteraction
73
- request: !ruby/struct:VCR::Request
74
- method: :post
75
- uri: https://sendgrid.com:443/api/newsletter/lists/email/delete.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&list=test-list&email%5B0%5D=me@lmaa.name&email%5B1%5D=<<USERNAME>>
76
- body: !!null
77
- headers: !!null
78
- response: !ruby/struct:VCR::Response
79
- status: !ruby/struct:VCR::ResponseStatus
80
- code: 200
81
- message: OK
82
- headers:
83
- server:
84
- - nginx/0.7.65
85
- date:
86
- - Tue, 20 Sep 2011 14:27:05 GMT
87
- content-type:
88
- - text/html
89
- transfer-encoding:
90
- - chunked
91
- connection:
92
- - keep-alive
93
- body: ! '{"removed": 2}'
94
- http_version: '1.1'
95
- - !ruby/struct:VCR::HTTPInteraction
96
- request: !ruby/struct:VCR::Request
97
- method: :post
98
- uri: https://sendgrid.com:443/api/newsletter/lists/delete.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&list=test-list
99
- body: !!null
100
- headers: !!null
101
- response: !ruby/struct:VCR::Response
102
- status: !ruby/struct:VCR::ResponseStatus
103
- code: 200
104
- message: OK
105
- headers:
106
- server:
107
- - nginx/0.7.65
108
- date:
109
- - Tue, 20 Sep 2011 14:27:06 GMT
110
- content-type:
111
- - text/html
112
- transfer-encoding:
113
- - chunked
114
- connection:
115
- - keep-alive
116
- body: ! '{"message": "success"}'
117
- http_version: '1.1'
@@ -1,24 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :post
5
- uri: https://sendgrid.com:443/api/newsletter/list.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>
6
- body: !!null
7
- headers: !!null
8
- response: !ruby/struct:VCR::Response
9
- status: !ruby/struct:VCR::ResponseStatus
10
- code: 200
11
- message: OK
12
- headers:
13
- server:
14
- - nginx/0.7.65
15
- date:
16
- - Wed, 21 Sep 2011 07:09:02 GMT
17
- content-type:
18
- - text/html
19
- transfer-encoding:
20
- - chunked
21
- connection:
22
- - keep-alive
23
- body: ! '[{"name": "Superior Soy Beans Discount!"}]'
24
- http_version: '1.1'
@@ -1,25 +0,0 @@
1
- ---
2
- - !ruby/struct:VCR::HTTPInteraction
3
- request: !ruby/struct:VCR::Request
4
- method: :post
5
- uri: https://sendgrid.com:443/api/newsletter/delete.json?api_key=<<PASSWORD>>&api_user=<<USERNAME>>&name=A%20Newsletter%20that%20will%20_hopefully_%20never,%20ever%20exist!
6
- body: !!null
7
- headers: !!null
8
- response: !ruby/struct:VCR::Response
9
- status: !ruby/struct:VCR::ResponseStatus
10
- code: 401
11
- message: Unauthorized
12
- headers:
13
- server:
14
- - nginx/0.7.65
15
- date:
16
- - Wed, 21 Sep 2011 07:09:03 GMT
17
- content-type:
18
- - text/html
19
- transfer-encoding:
20
- - chunked
21
- connection:
22
- - keep-alive
23
- body: ! '{"error": "A Newsletter that will _hopefully_ never, ever exist! does
24
- not exist"}'
25
- http_version: '1.1'