contactology 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.infinity_test +1 -1
- data/.travis.yml +5 -0
- data/Gemfile +3 -0
- data/README.markdown +64 -0
- data/Rakefile +4 -0
- data/contactology.gemspec +1 -0
- data/lib/contactology.rb +2 -0
- data/lib/contactology/api.rb +2 -0
- data/lib/contactology/basic_object.rb +2 -0
- data/lib/contactology/campaign.rb +2 -0
- data/lib/contactology/campaign/preview.rb +2 -0
- data/lib/contactology/campaigns.rb +2 -0
- data/lib/contactology/campaigns/standard.rb +2 -0
- data/lib/contactology/campaigns/transactional.rb +2 -0
- data/lib/contactology/configuration.rb +2 -0
- data/lib/contactology/contact.rb +2 -0
- data/lib/contactology/errors.rb +2 -0
- data/lib/contactology/issue.rb +2 -0
- data/lib/contactology/issues.rb +2 -0
- data/lib/contactology/list.rb +2 -0
- data/lib/contactology/list_proxy.rb +2 -0
- data/lib/contactology/parser.rb +35 -0
- data/lib/contactology/send_result.rb +2 -0
- data/lib/contactology/stash.rb +2 -0
- data/lib/contactology/transactional_message.rb +2 -0
- data/lib/contactology/version.rb +3 -1
- data/spec/contactology.example.yml +1 -0
- data/spec/factories/campaigns.rb +2 -0
- data/spec/factories/contacts.rb +2 -0
- data/spec/factories/issues.rb +2 -0
- data/spec/factories/lists.rb +2 -0
- data/spec/factories/transactional_messages.rb +2 -0
- data/spec/fixtures/net/campaign/destroy.yml +170 -168
- data/spec/fixtures/net/campaign/find/success.yml +227 -120
- data/spec/fixtures/net/campaign/find_by_name/success.yml +215 -143
- data/spec/fixtures/net/campaign/preview.yml +136 -61
- data/spec/models/contactology/api_spec.rb +2 -0
- data/spec/models/contactology/campaign_spec.rb +6 -3
- data/spec/models/contactology/campaigns/standard_spec.rb +2 -0
- data/spec/models/contactology/campaigns/transactional_spec.rb +2 -0
- data/spec/models/contactology/configuration_spec.rb +2 -0
- data/spec/models/contactology/contact_spec.rb +2 -0
- data/spec/models/contactology/issues_spec.rb +2 -0
- data/spec/models/contactology/list_spec.rb +2 -0
- data/spec/models/contactology/send_result_spec.rb +2 -0
- data/spec/models/contactology/stash_spec.rb +2 -0
- data/spec/models/contactology/transactional_message_spec.rb +2 -0
- data/spec/models/contactology_spec.rb +2 -0
- data/spec/requests/contacts_spec.rb +2 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/support/contactology.rb +2 -0
- data/spec/support/factory_girl.rb +2 -0
- data/spec/support/vcr.rb +2 -0
- metadata +98 -87
data/.infinity_test
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
infinity_test do
|
4
4
|
notifications :growl
|
5
|
-
use :rubies => %w(1.9.2-p180 1.8.7-p334), :gemset => 'contactology', :test_framework => :rspec
|
5
|
+
use :rubies => %w(1.9.2-p180 1.9.2-p290 1.8.7-p334), :gemset => 'contactology', :test_framework => :rspec
|
6
6
|
|
7
7
|
before_run do
|
8
8
|
clear :terminal
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/README.markdown
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
# Contactology [![Build status][ci-image]][ci]
|
2
|
+
|
3
|
+
This library provides a Ruby interface to the [Contactology email marketing
|
4
|
+
API][api].
|
5
|
+
|
6
|
+
## Quick start
|
7
|
+
|
8
|
+
```ruby
|
9
|
+
require 'contactology'
|
10
|
+
|
11
|
+
Contactology.key = 'aBcDeFg12345'
|
12
|
+
|
13
|
+
list = Contactology::List.find(4)
|
14
|
+
# => #<Contactology::List:0x000... @list_id="4" @name="test list" ...>
|
15
|
+
|
16
|
+
list.subscribe('joe@example.local')
|
17
|
+
# => true
|
18
|
+
|
19
|
+
contact = Contactology::Contact.find('joe@example.local')
|
20
|
+
# => #<Contactology::Contact:0x000... @email="joe@example.local" ...>
|
21
|
+
|
22
|
+
contact.lists
|
23
|
+
# => [#<Contactology::List:0x000... @list_id="4" ...>]
|
24
|
+
|
25
|
+
campaign = Contactology::Campaign.find_by_name('test campaign')
|
26
|
+
# => #<Contactology::Campaign:0x000... @name="test campaign" ...>
|
27
|
+
|
28
|
+
result = campaign.send_campaign
|
29
|
+
# => #<Contactology::SendResult:0x000... @success=true @issues=[]>
|
30
|
+
|
31
|
+
result.successful?
|
32
|
+
# => true
|
33
|
+
|
34
|
+
result.issues
|
35
|
+
# => []
|
36
|
+
```
|
37
|
+
|
38
|
+
## API support
|
39
|
+
|
40
|
+
This library supports the Contactology V2, or "REST," API.
|
41
|
+
|
42
|
+
### Intentions
|
43
|
+
|
44
|
+
This library is not currently intended to fully implement all of the API
|
45
|
+
methods which Contactology makes available. Instead, it will focus on those
|
46
|
+
methods which are of immediate practical use in production applications. This
|
47
|
+
should ensure that the interface is well exercised and continuously updated.
|
48
|
+
|
49
|
+
Feel free to fork and submit pull requests to expand the feature set to meet
|
50
|
+
your needs.
|
51
|
+
|
52
|
+
## Ruby compatibility
|
53
|
+
|
54
|
+
This library uses [Travis CI][ci] to continuously test and remain compatible
|
55
|
+
with the following Rubies:
|
56
|
+
|
57
|
+
* MRI Ruby 1.8.7,
|
58
|
+
* MRI Ruby 1.9.2, and
|
59
|
+
* REE 1.8.7
|
60
|
+
|
61
|
+
|
62
|
+
[api]: http://www.contactology.com/email-marketing-api/ (Contactology API Documentation)
|
63
|
+
[ci]: http://travis-ci.org/nbibler/contactology
|
64
|
+
[ci-image]: https://secure.travis-ci.org/nbibler/contactology.png
|
data/Rakefile
CHANGED
data/contactology.gemspec
CHANGED
data/lib/contactology.rb
CHANGED
data/lib/contactology/api.rb
CHANGED
data/lib/contactology/contact.rb
CHANGED
data/lib/contactology/errors.rb
CHANGED
data/lib/contactology/issue.rb
CHANGED
data/lib/contactology/issues.rb
CHANGED
data/lib/contactology/list.rb
CHANGED
data/lib/contactology/parser.rb
CHANGED
@@ -1,5 +1,40 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
# To be removed when Crack is updated, see below.
|
4
|
+
require 'multi_json'
|
5
|
+
|
1
6
|
module Contactology
|
2
7
|
class Parser < HTTParty::Parser
|
3
8
|
SupportedFormats.merge!({'text/plain' => :json})
|
9
|
+
|
10
|
+
|
11
|
+
protected
|
12
|
+
|
13
|
+
|
14
|
+
##
|
15
|
+
# Private: This was put in place entirely to appease Ruby 1.9.2-p290's more
|
16
|
+
# strict YAML parsing, which breaks Crack 0.1.8's JSON decoding.
|
17
|
+
#
|
18
|
+
# This will be removed when Crack supports decoding the API's returned
|
19
|
+
# values.
|
20
|
+
#
|
21
|
+
def json
|
22
|
+
decode_json(body)
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# Private: This was put in place entirely to appease Ruby 1.9.2-p290's more
|
27
|
+
# strict YAML parsing, which breaks Crack 0.1.8's JSON decoding.
|
28
|
+
#
|
29
|
+
# This will be removed when Crack supports decoding the API's returned
|
30
|
+
# values.
|
31
|
+
#
|
32
|
+
def decode_json(body)
|
33
|
+
if body.to_s =~ /^(?:[\d]+|null|true|false)$/
|
34
|
+
MultiJson.decode("[#{body}]").first
|
35
|
+
else
|
36
|
+
MultiJson.decode body
|
37
|
+
end
|
38
|
+
end
|
4
39
|
end
|
5
40
|
end
|
data/lib/contactology/stash.rb
CHANGED
data/lib/contactology/version.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
key: 'testkey'
|
data/spec/factories/campaigns.rb
CHANGED
data/spec/factories/contacts.rb
CHANGED
data/spec/factories/issues.rb
CHANGED
data/spec/factories/lists.rb
CHANGED
@@ -1,246 +1,248 @@
|
|
1
|
-
---
|
2
|
-
- !ruby/struct:VCR::HTTPInteraction
|
3
|
-
request: !ruby/struct:VCR::Request
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
5
|
uri: https://api.emailcampaigns.net:443/2/REST/?key=%{API_KEY}&method=List_Add_Public&name=Factory%20List
|
6
|
-
body:
|
7
|
-
headers:
|
8
|
-
accept:
|
6
|
+
body: !!null
|
7
|
+
headers:
|
8
|
+
accept:
|
9
9
|
- application/json
|
10
|
-
user-agent:
|
11
|
-
- contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.
|
12
|
-
response: !ruby/struct:VCR::Response
|
13
|
-
status: !ruby/struct:VCR::ResponseStatus
|
10
|
+
user-agent:
|
11
|
+
- contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
|
12
|
+
response: !ruby/struct:VCR::Response
|
13
|
+
status: !ruby/struct:VCR::ResponseStatus
|
14
14
|
code: 200
|
15
15
|
message: OK
|
16
|
-
headers:
|
17
|
-
x-powered-by:
|
16
|
+
headers:
|
17
|
+
x-powered-by:
|
18
18
|
- PHP/5.2.10
|
19
|
-
set-cookie:
|
20
|
-
- PHPSESSID=
|
21
|
-
expires:
|
19
|
+
set-cookie:
|
20
|
+
- PHPSESSID=5858560ae94afdfbcd5c06280a207988; path=/
|
21
|
+
expires:
|
22
22
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
23
|
-
cache-control:
|
23
|
+
cache-control:
|
24
24
|
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
25
|
-
pragma:
|
25
|
+
pragma:
|
26
26
|
- no-cache
|
27
|
-
content-type:
|
27
|
+
content-type:
|
28
28
|
- text/plain;charset=UTF-8
|
29
|
-
transfer-encoding:
|
29
|
+
transfer-encoding:
|
30
30
|
- chunked
|
31
|
-
date:
|
32
|
-
-
|
33
|
-
server:
|
31
|
+
date:
|
32
|
+
- Thu, 04 Aug 2011 02:38:47 GMT
|
33
|
+
server:
|
34
34
|
- lighttpd/1.4.28
|
35
|
-
body:
|
36
|
-
http_version:
|
37
|
-
- !ruby/struct:VCR::HTTPInteraction
|
38
|
-
request: !ruby/struct:VCR::Request
|
35
|
+
body: '57'
|
36
|
+
http_version: '1.1'
|
37
|
+
- !ruby/struct:VCR::HTTPInteraction
|
38
|
+
request: !ruby/struct:VCR::Request
|
39
39
|
method: :get
|
40
|
-
uri: https://api.emailcampaigns.net:443/2/REST/?key=%{API_KEY}&listId=
|
41
|
-
body:
|
42
|
-
headers:
|
43
|
-
accept:
|
40
|
+
uri: https://api.emailcampaigns.net:443/2/REST/?key=%{API_KEY}&listId=57&method=List_Get_Info
|
41
|
+
body: !!null
|
42
|
+
headers:
|
43
|
+
accept:
|
44
44
|
- application/json
|
45
|
-
user-agent:
|
46
|
-
- contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.
|
47
|
-
response: !ruby/struct:VCR::Response
|
48
|
-
status: !ruby/struct:VCR::ResponseStatus
|
45
|
+
user-agent:
|
46
|
+
- contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
|
47
|
+
response: !ruby/struct:VCR::Response
|
48
|
+
status: !ruby/struct:VCR::ResponseStatus
|
49
49
|
code: 200
|
50
50
|
message: OK
|
51
|
-
headers:
|
52
|
-
x-powered-by:
|
51
|
+
headers:
|
52
|
+
x-powered-by:
|
53
53
|
- PHP/5.2.10
|
54
|
-
set-cookie:
|
55
|
-
- PHPSESSID=
|
56
|
-
expires:
|
54
|
+
set-cookie:
|
55
|
+
- PHPSESSID=73c27e19065b5c49a29940c5d0019e5a; path=/
|
56
|
+
expires:
|
57
57
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
58
|
-
cache-control:
|
58
|
+
cache-control:
|
59
59
|
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
60
|
-
pragma:
|
60
|
+
pragma:
|
61
61
|
- no-cache
|
62
|
-
content-type:
|
62
|
+
content-type:
|
63
63
|
- text/plain;charset=UTF-8
|
64
|
-
transfer-encoding:
|
64
|
+
transfer-encoding:
|
65
65
|
- chunked
|
66
|
-
date:
|
67
|
-
-
|
68
|
-
server:
|
66
|
+
date:
|
67
|
+
- Thu, 04 Aug 2011 02:38:37 GMT
|
68
|
+
server:
|
69
69
|
- lighttpd/1.4.28
|
70
|
-
body:
|
71
|
-
http_version:
|
72
|
-
- !ruby/struct:VCR::HTTPInteraction
|
73
|
-
request: !ruby/struct:VCR::Request
|
70
|
+
body: ! '{"listId":"57","name":"Factory List","description":null,"type":"public","optIn":false}'
|
71
|
+
http_version: '1.1'
|
72
|
+
- !ruby/struct:VCR::HTTPInteraction
|
73
|
+
request: !ruby/struct:VCR::Request
|
74
74
|
method: :get
|
75
|
-
uri: https://api.emailcampaigns.net:443/2/REST/?campaignName=factory%20campaign&key=%{API_KEY}&method=Campaign_Create_Standard&senderEmail=nate@envylabs.com&senderName=Nate%20Bibler&subject=Factory%20Campaign%20Message&content%5Btext%5D=This%20is%20a%20good%20message!%20%7BCOMPANY_ADDRESS%7D&recipients%5Blist%5D=
|
76
|
-
body:
|
77
|
-
headers:
|
78
|
-
accept:
|
75
|
+
uri: https://api.emailcampaigns.net:443/2/REST/?campaignName=factory%20campaign&key=%{API_KEY}&method=Campaign_Create_Standard&senderEmail=nate@envylabs.com&senderName=Nate%20Bibler&subject=Factory%20Campaign%20Message&content%5Btext%5D=This%20is%20a%20good%20message!%20%7BCOMPANY_ADDRESS%7D&recipients%5Blist%5D=57
|
76
|
+
body: !!null
|
77
|
+
headers:
|
78
|
+
accept:
|
79
79
|
- application/json
|
80
|
-
user-agent:
|
81
|
-
- contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.
|
82
|
-
response: !ruby/struct:VCR::Response
|
83
|
-
status: !ruby/struct:VCR::ResponseStatus
|
80
|
+
user-agent:
|
81
|
+
- contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
|
82
|
+
response: !ruby/struct:VCR::Response
|
83
|
+
status: !ruby/struct:VCR::ResponseStatus
|
84
84
|
code: 200
|
85
85
|
message: OK
|
86
|
-
headers:
|
87
|
-
x-powered-by:
|
86
|
+
headers:
|
87
|
+
x-powered-by:
|
88
88
|
- PHP/5.2.10
|
89
|
-
set-cookie:
|
90
|
-
- PHPSESSID=
|
91
|
-
expires:
|
89
|
+
set-cookie:
|
90
|
+
- PHPSESSID=24befcb3d91865ee60c2babd985e22f0; path=/
|
91
|
+
expires:
|
92
92
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
93
|
-
cache-control:
|
93
|
+
cache-control:
|
94
94
|
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
95
|
-
pragma:
|
95
|
+
pragma:
|
96
96
|
- no-cache
|
97
|
-
content-type:
|
97
|
+
content-type:
|
98
98
|
- text/plain;charset=UTF-8
|
99
|
-
transfer-encoding:
|
99
|
+
transfer-encoding:
|
100
100
|
- chunked
|
101
|
-
date:
|
102
|
-
-
|
103
|
-
server:
|
101
|
+
date:
|
102
|
+
- Thu, 04 Aug 2011 02:38:48 GMT
|
103
|
+
server:
|
104
104
|
- lighttpd/1.4.28
|
105
|
-
body:
|
106
|
-
http_version:
|
107
|
-
- !ruby/struct:VCR::HTTPInteraction
|
108
|
-
request: !ruby/struct:VCR::Request
|
105
|
+
body: '49'
|
106
|
+
http_version: '1.1'
|
107
|
+
- !ruby/struct:VCR::HTTPInteraction
|
108
|
+
request: !ruby/struct:VCR::Request
|
109
109
|
method: :get
|
110
|
-
uri: https://api.emailcampaigns.net:443/2/REST/?campaignId=
|
111
|
-
body:
|
112
|
-
headers:
|
113
|
-
accept:
|
110
|
+
uri: https://api.emailcampaigns.net:443/2/REST/?campaignId=49&key=%{API_KEY}&method=Campaign_Get_Info
|
111
|
+
body: !!null
|
112
|
+
headers:
|
113
|
+
accept:
|
114
114
|
- application/json
|
115
|
-
user-agent:
|
116
|
-
- contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.
|
117
|
-
response: !ruby/struct:VCR::Response
|
118
|
-
status: !ruby/struct:VCR::ResponseStatus
|
115
|
+
user-agent:
|
116
|
+
- contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
|
117
|
+
response: !ruby/struct:VCR::Response
|
118
|
+
status: !ruby/struct:VCR::ResponseStatus
|
119
119
|
code: 200
|
120
120
|
message: OK
|
121
|
-
headers:
|
122
|
-
x-powered-by:
|
121
|
+
headers:
|
122
|
+
x-powered-by:
|
123
123
|
- PHP/5.2.10
|
124
|
-
set-cookie:
|
125
|
-
- PHPSESSID=
|
126
|
-
expires:
|
124
|
+
set-cookie:
|
125
|
+
- PHPSESSID=f5497edf3ec9b967c0151e4895e28ef2; path=/
|
126
|
+
expires:
|
127
127
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
128
|
-
cache-control:
|
128
|
+
cache-control:
|
129
129
|
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
130
|
-
pragma:
|
130
|
+
pragma:
|
131
131
|
- no-cache
|
132
|
-
content-type:
|
132
|
+
content-type:
|
133
133
|
- text/plain;charset=UTF-8
|
134
|
-
transfer-encoding:
|
134
|
+
transfer-encoding:
|
135
135
|
- chunked
|
136
|
-
date:
|
137
|
-
-
|
138
|
-
server:
|
136
|
+
date:
|
137
|
+
- Thu, 04 Aug 2011 02:38:49 GMT
|
138
|
+
server:
|
139
139
|
- lighttpd/1.4.28
|
140
|
-
body:
|
141
|
-
|
142
|
-
|
143
|
-
|
140
|
+
body: ! '{"campaignId":"49","campaignName":"factory campaign","type":"standard","contentType":"standard","status":"draft","recipients":{"list":["57"]},"subject":"Factory
|
141
|
+
Campaign Message","senderName":"Nate Bibler","senderEmail":"nate@envylabs.com","recipientName":"","replyToName":"","replyToEmail":null,"content":{"html":"","text":"This
|
142
|
+
is a good message! {COMPANY_ADDRESS}"},"startTime":"2011-08-04 02:38:48","authenticate":false,"trackReplies":false,"showInArchive":false,"viewInBrowser":false,"trackOpens":true,"trackClickThruHTML":true,"trackClickThruText":true,"googleAnalyticsName":null,"automaticTweet":false,"clickTaleName":null,"clickTaleCustomFields":[""],"useCustomUrlParameters":null,"customUrlParameters":null}'
|
143
|
+
http_version: '1.1'
|
144
|
+
- !ruby/struct:VCR::HTTPInteraction
|
145
|
+
request: !ruby/struct:VCR::Request
|
144
146
|
method: :get
|
145
|
-
uri: https://api.emailcampaigns.net:443/2/REST/?key=%{API_KEY}&
|
146
|
-
body:
|
147
|
-
headers:
|
148
|
-
accept:
|
147
|
+
uri: https://api.emailcampaigns.net:443/2/REST/?campaignId=49&key=%{API_KEY}&method=Campaign_Delete
|
148
|
+
body: !!null
|
149
|
+
headers:
|
150
|
+
accept:
|
149
151
|
- application/json
|
150
|
-
user-agent:
|
151
|
-
- contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.
|
152
|
-
response: !ruby/struct:VCR::Response
|
153
|
-
status: !ruby/struct:VCR::ResponseStatus
|
152
|
+
user-agent:
|
153
|
+
- contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
|
154
|
+
response: !ruby/struct:VCR::Response
|
155
|
+
status: !ruby/struct:VCR::ResponseStatus
|
154
156
|
code: 200
|
155
157
|
message: OK
|
156
|
-
headers:
|
157
|
-
x-powered-by:
|
158
|
+
headers:
|
159
|
+
x-powered-by:
|
158
160
|
- PHP/5.2.10
|
159
|
-
set-cookie:
|
160
|
-
- PHPSESSID=
|
161
|
-
expires:
|
161
|
+
set-cookie:
|
162
|
+
- PHPSESSID=dd081190a0c5ba1fa334956b95b1bba8; path=/
|
163
|
+
expires:
|
162
164
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
163
|
-
cache-control:
|
165
|
+
cache-control:
|
164
166
|
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
165
|
-
pragma:
|
167
|
+
pragma:
|
166
168
|
- no-cache
|
167
|
-
content-type:
|
169
|
+
content-type:
|
168
170
|
- text/plain;charset=UTF-8
|
169
|
-
transfer-encoding:
|
171
|
+
transfer-encoding:
|
170
172
|
- chunked
|
171
|
-
date:
|
172
|
-
-
|
173
|
-
server:
|
173
|
+
date:
|
174
|
+
- Thu, 04 Aug 2011 02:38:49 GMT
|
175
|
+
server:
|
174
176
|
- lighttpd/1.4.28
|
175
|
-
body:
|
176
|
-
http_version:
|
177
|
-
- !ruby/struct:VCR::HTTPInteraction
|
178
|
-
request: !ruby/struct:VCR::Request
|
177
|
+
body: 'true'
|
178
|
+
http_version: '1.1'
|
179
|
+
- !ruby/struct:VCR::HTTPInteraction
|
180
|
+
request: !ruby/struct:VCR::Request
|
179
181
|
method: :get
|
180
|
-
uri: https://api.emailcampaigns.net:443/2/REST/?campaignId=
|
181
|
-
body:
|
182
|
-
headers:
|
183
|
-
accept:
|
182
|
+
uri: https://api.emailcampaigns.net:443/2/REST/?campaignId=49&key=%{API_KEY}&method=Campaign_Get_Info
|
183
|
+
body: !!null
|
184
|
+
headers:
|
185
|
+
accept:
|
184
186
|
- application/json
|
185
|
-
user-agent:
|
186
|
-
- contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.
|
187
|
-
response: !ruby/struct:VCR::Response
|
188
|
-
status: !ruby/struct:VCR::ResponseStatus
|
187
|
+
user-agent:
|
188
|
+
- contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
|
189
|
+
response: !ruby/struct:VCR::Response
|
190
|
+
status: !ruby/struct:VCR::ResponseStatus
|
189
191
|
code: 200
|
190
192
|
message: OK
|
191
|
-
headers:
|
192
|
-
x-powered-by:
|
193
|
+
headers:
|
194
|
+
x-powered-by:
|
193
195
|
- PHP/5.2.10
|
194
|
-
set-cookie:
|
195
|
-
- PHPSESSID=
|
196
|
-
expires:
|
196
|
+
set-cookie:
|
197
|
+
- PHPSESSID=ab6ba24d376779e315a7801139c2c492; path=/
|
198
|
+
expires:
|
197
199
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
198
|
-
cache-control:
|
200
|
+
cache-control:
|
199
201
|
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
200
|
-
pragma:
|
202
|
+
pragma:
|
201
203
|
- no-cache
|
202
|
-
content-type:
|
204
|
+
content-type:
|
203
205
|
- text/plain;charset=UTF-8
|
204
|
-
transfer-encoding:
|
206
|
+
transfer-encoding:
|
205
207
|
- chunked
|
206
|
-
date:
|
207
|
-
-
|
208
|
-
server:
|
208
|
+
date:
|
209
|
+
- Thu, 04 Aug 2011 02:38:50 GMT
|
210
|
+
server:
|
209
211
|
- lighttpd/1.4.28
|
210
|
-
body: "
|
211
|
-
http_version:
|
212
|
-
- !ruby/struct:VCR::HTTPInteraction
|
213
|
-
request: !ruby/struct:VCR::Request
|
212
|
+
body: ! '{"result":"error","message":"Input Error: campaignId 49 not found","code":601}'
|
213
|
+
http_version: '1.1'
|
214
|
+
- !ruby/struct:VCR::HTTPInteraction
|
215
|
+
request: !ruby/struct:VCR::Request
|
214
216
|
method: :get
|
215
|
-
uri: https://api.emailcampaigns.net:443/2/REST/?
|
216
|
-
body:
|
217
|
-
headers:
|
218
|
-
accept:
|
217
|
+
uri: https://api.emailcampaigns.net:443/2/REST/?key=%{API_KEY}&listId=57&method=List_Delete
|
218
|
+
body: !!null
|
219
|
+
headers:
|
220
|
+
accept:
|
219
221
|
- application/json
|
220
|
-
user-agent:
|
221
|
-
- contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.
|
222
|
-
response: !ruby/struct:VCR::Response
|
223
|
-
status: !ruby/struct:VCR::ResponseStatus
|
222
|
+
user-agent:
|
223
|
+
- contactology/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin10.8.0)
|
224
|
+
response: !ruby/struct:VCR::Response
|
225
|
+
status: !ruby/struct:VCR::ResponseStatus
|
224
226
|
code: 200
|
225
227
|
message: OK
|
226
|
-
headers:
|
227
|
-
x-powered-by:
|
228
|
+
headers:
|
229
|
+
x-powered-by:
|
228
230
|
- PHP/5.2.10
|
229
|
-
set-cookie:
|
230
|
-
- PHPSESSID=
|
231
|
-
expires:
|
231
|
+
set-cookie:
|
232
|
+
- PHPSESSID=42601b1b60dbde7b4fa5d4aa177f3bbd; path=/
|
233
|
+
expires:
|
232
234
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
233
|
-
cache-control:
|
235
|
+
cache-control:
|
234
236
|
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
235
|
-
pragma:
|
237
|
+
pragma:
|
236
238
|
- no-cache
|
237
|
-
content-type:
|
239
|
+
content-type:
|
238
240
|
- text/plain;charset=UTF-8
|
239
|
-
transfer-encoding:
|
241
|
+
transfer-encoding:
|
240
242
|
- chunked
|
241
|
-
date:
|
242
|
-
-
|
243
|
-
server:
|
243
|
+
date:
|
244
|
+
- Thu, 04 Aug 2011 02:38:50 GMT
|
245
|
+
server:
|
244
246
|
- lighttpd/1.4.28
|
245
|
-
body:
|
246
|
-
http_version:
|
247
|
+
body: 'true'
|
248
|
+
http_version: '1.1'
|