contactology 0.1.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +16 -2
- data/.rspec +0 -1
- data/.rvmrc +34 -23
- data/.travis.yml +9 -3
- data/CHANGELOG.markdown +46 -0
- data/Gemfile +0 -7
- data/README.markdown +5 -3
- data/contactology.gemspec +10 -10
- data/lib/contactology/version.rb +1 -1
- data/spec/cassettes/campaign/destroy.yml +293 -0
- data/spec/cassettes/campaign/find/failure.yml +45 -0
- data/spec/cassettes/campaign/find/success.yml +252 -0
- data/spec/cassettes/campaign/find_by_name/failure.yml +44 -0
- data/spec/cassettes/campaign/find_by_name/success.yml +252 -0
- data/spec/cassettes/campaign/preview.yml +135 -0
- data/spec/cassettes/campaigns/standard/create/failure.yml +127 -0
- data/spec/cassettes/campaigns/standard/create/invalid.yml +169 -0
- data/spec/cassettes/campaigns/standard/create/success.yml +209 -0
- data/spec/cassettes/campaigns/standard/send_campaign/failure.yml +374 -0
- data/spec/cassettes/campaigns/standard/send_campaign/failure_missing_attributes.yml +373 -0
- data/spec/cassettes/campaigns/standard/send_campaign/success.yml +374 -0
- data/spec/cassettes/campaigns/transactional/create/failure.yml +44 -0
- data/spec/cassettes/campaigns/transactional/create/success.yml +85 -0
- data/spec/cassettes/campaigns/transactional/send_campaign/failure.yml +127 -0
- data/spec/cassettes/campaigns/transactional/send_campaign/success.yml +208 -0
- data/spec/cassettes/contact/active.yml +127 -0
- data/spec/cassettes/contact/change_email/success.yml +210 -0
- data/spec/cassettes/contact/change_email/unknown.yml +45 -0
- data/spec/cassettes/contact/create.yml +127 -0
- data/spec/cassettes/contact/destroy.yml +85 -0
- data/spec/cassettes/contact/find/active.yml +127 -0
- data/spec/cassettes/contact/find/suppressed.yml +168 -0
- data/spec/cassettes/contact/find/unknown.yml +44 -0
- data/spec/cassettes/contact/lists/empty.yml +126 -0
- data/spec/cassettes/contact/lists/full.yml +333 -0
- data/spec/cassettes/contact/lists/unknown.yml +86 -0
- data/spec/cassettes/contact/suppress.yml +168 -0
- data/spec/cassettes/list/all.yml +168 -0
- data/spec/cassettes/list/create.yml +127 -0
- data/spec/cassettes/list/destroy.yml +210 -0
- data/spec/cassettes/list/find/success.yml +169 -0
- data/spec/cassettes/list/find/unknown.yml +45 -0
- data/spec/cassettes/list/import/success.yml +251 -0
- data/spec/cassettes/list/subscribe/success.yml +250 -0
- data/spec/cassettes/list/unsubscribe/success.yml +291 -0
- data/spec/cassettes/transactional_message/send_message/failure.yml +209 -0
- data/spec/cassettes/transactional_message/send_message/success.yml +208 -0
- data/spec/factories/campaigns.rb +18 -16
- data/spec/factories/contacts.rb +6 -2
- data/spec/factories/issues.rb +12 -8
- data/spec/factories/lists.rb +6 -2
- data/spec/factories/transactional_messages.rb +8 -4
- data/spec/models/contactology/campaign_spec.rb +16 -22
- data/spec/models/contactology/campaigns/standard_spec.rb +31 -27
- data/spec/models/contactology/campaigns/transactional_spec.rb +26 -16
- data/spec/models/contactology/contact_spec.rb +28 -35
- data/spec/models/contactology/issues_spec.rb +2 -2
- data/spec/models/contactology/list_spec.rb +12 -20
- data/spec/models/contactology/transactional_message_spec.rb +13 -15
- data/spec/spec_helper.rb +9 -5
- data/spec/support/factory_girl.rb +4 -18
- data/spec/support/vcr.rb +9 -6
- metadata +208 -177
- data/.infinity_test +0 -16
- data/.watchr +0 -36
- data/Changelog.markdown +0 -30
- data/spec/fixtures/net/campaign/destroy.yml +0 -248
- data/spec/fixtures/net/campaign/find/failure.yml +0 -36
- data/spec/fixtures/net/campaign/find/success.yml +0 -283
- data/spec/fixtures/net/campaign/find_by_name/failure.yml +0 -36
- data/spec/fixtures/net/campaign/find_by_name/success.yml +0 -283
- data/spec/fixtures/net/campaign/preview.yml +0 -181
- data/spec/fixtures/net/campaigns/standard/create/failure.yml +0 -106
- data/spec/fixtures/net/campaigns/standard/create/invalid.yml +0 -141
- data/spec/fixtures/net/campaigns/standard/create/success.yml +0 -176
- data/spec/fixtures/net/campaigns/standard/send_campaign/failure.yml +0 -316
- data/spec/fixtures/net/campaigns/standard/send_campaign/failure_missing_attributes.yml +0 -316
- data/spec/fixtures/net/campaigns/standard/send_campaign/success.yml +0 -316
- data/spec/fixtures/net/campaigns/transactional/create/failure.yml +0 -36
- data/spec/fixtures/net/campaigns/transactional/create/success.yml +0 -71
- data/spec/fixtures/net/campaigns/transactional/send_campaign/failure.yml +0 -106
- data/spec/fixtures/net/campaigns/transactional/send_campaign/success.yml +0 -176
- data/spec/fixtures/net/contact/active.yml +0 -106
- data/spec/fixtures/net/contact/change_email/success.yml +0 -176
- data/spec/fixtures/net/contact/change_email/unknown.yml +0 -36
- data/spec/fixtures/net/contact/create.yml +0 -106
- data/spec/fixtures/net/contact/destroy.yml +0 -141
- data/spec/fixtures/net/contact/find/active.yml +0 -106
- data/spec/fixtures/net/contact/find/suppressed.yml +0 -141
- data/spec/fixtures/net/contact/find/unknown.yml +0 -36
- data/spec/fixtures/net/contact/lists/empty.yml +0 -106
- data/spec/fixtures/net/contact/lists/full.yml +0 -246
- data/spec/fixtures/net/contact/lists/unknown.yml +0 -71
- data/spec/fixtures/net/contact/suppress.yml +0 -141
- data/spec/fixtures/net/list/all.yml +0 -141
- data/spec/fixtures/net/list/create.yml +0 -106
- data/spec/fixtures/net/list/destroy.yml +0 -176
- data/spec/fixtures/net/list/find/success.yml +0 -141
- data/spec/fixtures/net/list/find/unknown.yml +0 -36
- data/spec/fixtures/net/list/import/success.yml +0 -351
- data/spec/fixtures/net/list/subscribe/success.yml +0 -211
- data/spec/fixtures/net/list/unsubscribe/success.yml +0 -246
- data/spec/fixtures/net/transactional_message/send_message/failure.yml +0 -176
- data/spec/fixtures/net/transactional_message/send_message/success.yml +0 -176
- data/spec/requests/contacts_spec.rb +0 -6
data/.gitignore
CHANGED
@@ -1,5 +1,19 @@
|
|
1
|
+
spec/contactology.yml
|
2
|
+
|
1
3
|
*.gem
|
4
|
+
*.rbc
|
2
5
|
.bundle
|
6
|
+
.config
|
7
|
+
.yardoc
|
3
8
|
Gemfile.lock
|
4
|
-
|
5
|
-
|
9
|
+
InstalledFiles
|
10
|
+
_yardoc
|
11
|
+
coverage
|
12
|
+
doc/
|
13
|
+
lib/bundler/man
|
14
|
+
pkg
|
15
|
+
rdoc
|
16
|
+
spec/reports
|
17
|
+
test/tmp
|
18
|
+
test/version_tmp
|
19
|
+
tmp
|
data/.rspec
CHANGED
data/.rvmrc
CHANGED
@@ -3,39 +3,50 @@
|
|
3
3
|
# This is an RVM Project .rvmrc file, used to automatically load the ruby
|
4
4
|
# development environment upon cd'ing into the directory
|
5
5
|
|
6
|
-
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional
|
7
|
-
|
6
|
+
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
|
7
|
+
# Only full ruby name is supported here, for short names use:
|
8
|
+
# echo "rvm use 1.9.3" > .rvmrc
|
9
|
+
environment_id="ruby-1.9.3-p385@contactology"
|
10
|
+
|
11
|
+
# Uncomment the following lines if you want to verify rvm version per project
|
12
|
+
# rvmrc_rvm_version="1.18.8 (stable)" # 1.10.1 seams as a safe start
|
13
|
+
# eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
|
14
|
+
# echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
|
15
|
+
# return 1
|
16
|
+
# }
|
8
17
|
|
9
|
-
#
|
10
18
|
# First we attempt to load the desired environment directly from the environment
|
11
|
-
# file. This is very fast and
|
19
|
+
# file. This is very fast and efficient compared to running through the entire
|
12
20
|
# CLI and selector. If you want feedback on which environment was used then
|
13
21
|
# insert the word 'use' after --create as this triggers verbose mode.
|
14
|
-
|
15
|
-
if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
|
22
|
+
if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
|
16
23
|
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
|
17
24
|
then
|
18
25
|
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
26
|
+
[[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] &&
|
27
|
+
\. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true
|
28
|
+
if [[ $- == *i* ]] # check for interactive shells
|
29
|
+
then echo "Using: $(tput setaf 2)$GEM_HOME$(tput sgr0)" # show the user the ruby and gemset they are using in green
|
30
|
+
else echo "Using: $GEM_HOME" # don't use colors in non-interactive shells
|
23
31
|
fi
|
24
32
|
else
|
25
33
|
# If the environment file has not yet been created, use the RVM CLI to select.
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
34
|
+
rvm --create use "$environment_id" || {
|
35
|
+
echo "Failed to create RVM environment '${environment_id}'."
|
36
|
+
return 1
|
37
|
+
}
|
30
38
|
fi
|
31
39
|
|
32
|
-
#
|
33
|
-
#
|
34
|
-
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
+
# If you use bundler, this might be useful to you:
|
41
|
+
# if [[ -s Gemfile ]] && {
|
42
|
+
# ! builtin command -v bundle >/dev/null ||
|
43
|
+
# builtin command -v bundle | GREP_OPTIONS= \grep $rvm_path/bin/bundle >/dev/null
|
44
|
+
# }
|
45
|
+
# then
|
46
|
+
# printf "%b" "The rubygem 'bundler' is not installed. Installing it now.\n"
|
47
|
+
# gem install bundler
|
48
|
+
# fi
|
49
|
+
# if [[ -s Gemfile ]] && builtin command -v bundle >/dev/null
|
50
|
+
# then
|
51
|
+
# bundle install | GREP_OPTIONS= \grep -vE '^Using|Your bundle is complete'
|
40
52
|
# fi
|
41
|
-
|
data/.travis.yml
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
rvm:
|
2
|
-
- ree
|
3
|
-
- 1.8.7
|
4
2
|
- 1.9.2
|
5
|
-
|
3
|
+
- 1.9.3
|
4
|
+
before_script:
|
5
|
+
- cp spec/contactology.example.yml spec/contactology.yml
|
6
|
+
script:
|
7
|
+
- bundle exec rspec spec
|
8
|
+
notifications:
|
9
|
+
email:
|
10
|
+
on_success: change
|
11
|
+
on_failure: always
|
data/CHANGELOG.markdown
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# contactology changelog
|
2
|
+
|
3
|
+
## [Unreleased][unreleased]
|
4
|
+
|
5
|
+
No significant changes.
|
6
|
+
|
7
|
+
## [1.0.0][v1.0.0] / 2013-02-22
|
8
|
+
|
9
|
+
* Enhancement
|
10
|
+
* Updated and/or loosened dependent library versions in runtime and
|
11
|
+
development. This, though, means that **testing is no longer maintained for
|
12
|
+
MRI 1.8.7 or REE**. Currently, the library does support them, but
|
13
|
+
development dependencies will not install and therefore cannot be
|
14
|
+
explicitly tested in those environments.
|
15
|
+
* Removed json\_pure, watchr, and infinity\_test development dependencies.
|
16
|
+
|
17
|
+
## [0.1.2][v0.1.2] / 2011-08-25
|
18
|
+
|
19
|
+
* Enhancement
|
20
|
+
* Campaign.find\_by\_name now returns the newest, matching campaign
|
21
|
+
* Campaign#start\_time is now returned as a Time instance
|
22
|
+
|
23
|
+
* Bug fixes
|
24
|
+
* SendResult now captures generic API errors
|
25
|
+
* Campaign children now have proper reference of their parent properties
|
26
|
+
|
27
|
+
## [0.1.1][v0.1.1] / 2011-08-25
|
28
|
+
|
29
|
+
* Bug fixes
|
30
|
+
* Return the correct campaign class from Campaign#find and
|
31
|
+
Campaign#find\_by\_name
|
32
|
+
|
33
|
+
## [0.1.0][v0.1.0] / 2011-08-25
|
34
|
+
|
35
|
+
* Enhancements
|
36
|
+
* Add Contactology::Campaigns::Transactional#send\_campaign
|
37
|
+
* Allow Issues to be created from Hash-derived instances
|
38
|
+
* Restrict versions of HTTParty and MultiJson
|
39
|
+
|
40
|
+
* Bug fixes
|
41
|
+
* Fix failure messages for Campaign#create request timeouts
|
42
|
+
|
43
|
+
[unreleased]: http://github.com/nbibler/contactology/compare/v0.1.2...master
|
44
|
+
[v0.1.2]: http://github.com/nbibler/contactology/compare/v0.1.1...v0.1.2
|
45
|
+
[v0.1.1]: http://github.com/nbibler/contactology/compare/v0.1.0...v0.1.1
|
46
|
+
[v0.1.0]: http://github.com/nbibler/contactology/compare/v0.0.2...v0.1.0
|
data/Gemfile
CHANGED
data/README.markdown
CHANGED
@@ -54,10 +54,12 @@ your needs.
|
|
54
54
|
This library uses [Travis CI][ci] to continuously test and remain compatible
|
55
55
|
with the following Rubies:
|
56
56
|
|
57
|
-
* MRI Ruby 1.
|
58
|
-
* MRI Ruby 1.9.
|
59
|
-
* REE 1.8.7
|
57
|
+
* MRI Ruby 1.9.2,
|
58
|
+
* MRI Ruby 1.9.3
|
60
59
|
|
60
|
+
Currently, the library should also work with MRI 1.8.7 and REE, but the
|
61
|
+
development dependencies (factory_girl) are no longer compatible and therefore
|
62
|
+
have been removed from continuous integration.
|
61
63
|
|
62
64
|
[api]: http://www.contactology.com/email-marketing-api/ (Contactology API Documentation)
|
63
65
|
[ci]: http://travis-ci.org/nbibler/contactology
|
data/contactology.gemspec
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
4
|
require 'contactology/version'
|
4
5
|
|
5
6
|
Gem::Specification.new do |s|
|
@@ -11,19 +12,18 @@ Gem::Specification.new do |s|
|
|
11
12
|
s.summary = %q{A Ruby interface to the Contactology email marketing API}
|
12
13
|
s.description = %q{This library provides Ruby calls to interact with the Contactology email marketing API}
|
13
14
|
|
14
|
-
s.files = `git ls-files`.split(
|
15
|
-
s.test_files =
|
16
|
-
s.executables =
|
15
|
+
s.files = `git ls-files`.split($/)
|
16
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
17
|
+
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
18
|
s.require_paths = ['lib']
|
18
19
|
|
19
|
-
s.add_dependency 'hashie', '
|
20
|
-
s.add_dependency 'httparty', '
|
20
|
+
s.add_dependency 'hashie', '>= 1.1', '< 3.0'
|
21
|
+
s.add_dependency 'httparty', '>= 0.7.8', '<= 0.10.2'
|
21
22
|
s.add_dependency 'multi_json', '~> 1.0'
|
22
23
|
|
23
|
-
s.add_development_dependency 'vcr', '~>
|
24
|
+
s.add_development_dependency 'vcr', '~> 2.0'
|
25
|
+
s.add_development_dependency 'webmock', '~> 1.6'
|
24
26
|
s.add_development_dependency 'rspec', '~> 2.0'
|
25
|
-
s.add_development_dependency '
|
26
|
-
s.add_development_dependency 'factory_girl', '~> 2.0'
|
27
|
+
s.add_development_dependency 'factory_girl', '~> 4.0'
|
27
28
|
s.add_development_dependency 'rack', '~> 1.2'
|
28
|
-
s.add_development_dependency 'watchr'
|
29
29
|
end
|
data/lib/contactology/version.rb
CHANGED
@@ -0,0 +1,293 @@
|
|
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=Factory%20List
|
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=87171deb249617176befd9fb28463bcb; 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:18:16 GMT
|
37
|
+
Server:
|
38
|
+
- lighttpd/1.4.28
|
39
|
+
body:
|
40
|
+
encoding: US-ASCII
|
41
|
+
string: '189'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Wed, 20 Feb 2013 05:18:16 GMT
|
44
|
+
- request:
|
45
|
+
method: get
|
46
|
+
uri: https://api.emailcampaigns.net/2/REST/?key=%{API_KEY}&listId=189&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=3330dd1a21f6bfe2350d4face0af3f77; 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:18:16 GMT
|
78
|
+
Server:
|
79
|
+
- lighttpd/1.4.28
|
80
|
+
body:
|
81
|
+
encoding: US-ASCII
|
82
|
+
string: ! '{"listId":"189","name":"Factory List","description":null,"type":"public","created":"2013-02-20
|
83
|
+
05:18:16","optIn":false}'
|
84
|
+
http_version:
|
85
|
+
recorded_at: Wed, 20 Feb 2013 05:18:16 GMT
|
86
|
+
- request:
|
87
|
+
method: get
|
88
|
+
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=189&senderEmail=sender@example.com&senderName=Sender%20Example&subject=Factory%20Campaign%20Message
|
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=79f3c42c233d33f322c8eb26943953ac; 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:18:16 GMT
|
120
|
+
Server:
|
121
|
+
- lighttpd/1.4.28
|
122
|
+
body:
|
123
|
+
encoding: US-ASCII
|
124
|
+
string: '117'
|
125
|
+
http_version:
|
126
|
+
recorded_at: Wed, 20 Feb 2013 05:18:16 GMT
|
127
|
+
- request:
|
128
|
+
method: get
|
129
|
+
uri: https://api.emailcampaigns.net/2/REST/?campaignId=117&key=%{API_KEY}&method=Campaign_Get_Info
|
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=c5916ecd71a3b1f7d8c9f11024c4b63a; 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:18:17 GMT
|
161
|
+
Server:
|
162
|
+
- lighttpd/1.4.28
|
163
|
+
body:
|
164
|
+
encoding: US-ASCII
|
165
|
+
string: ! '{"campaignId":"117","campaignName":"factory campaign","type":"standard","contentType":"standard","status":"draft","recipients":{"list":["189"]},"exclusions":[],"subject":"Factory
|
166
|
+
Campaign Message","senderName":"Sender Example","senderEmail":"sender@example.com","recipientName":"","replyToName":"","replyToEmail":null,"content":{"html":"","text":"This
|
167
|
+
is a good message! {COMPANY_ADDRESS}"},"startTime":"2013-02-20 05:18:16","authenticate":false,"trackReplies":false,"showInArchive":false,"viewInBrowser":false,"trackOpens":true,"trackClickThruHTML":true,"trackClickThruText":true,"googleAnalyticsName":null,"clickTaleName":null,"clickTaleCustomFields":[""],"useCustomUrlParameters":null,"customUrlParameters":null,"footerId":"0","facebookAutopost":{"facebookAccount":null,"facebookLocation":null,"facebookName":null,"facebookDescription":null,"facebookPicture":null},"twitterAutopost":{"twitterAccount":null}}'
|
168
|
+
http_version:
|
169
|
+
recorded_at: Wed, 20 Feb 2013 05:18:17 GMT
|
170
|
+
- request:
|
171
|
+
method: get
|
172
|
+
uri: https://api.emailcampaigns.net/2/REST/?campaignId=117&key=%{API_KEY}&method=Campaign_Delete
|
173
|
+
body:
|
174
|
+
encoding: US-ASCII
|
175
|
+
string: ''
|
176
|
+
headers:
|
177
|
+
Accept:
|
178
|
+
- application/json
|
179
|
+
User-Agent:
|
180
|
+
- contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
|
181
|
+
response:
|
182
|
+
status:
|
183
|
+
code: 200
|
184
|
+
message: OK
|
185
|
+
headers:
|
186
|
+
X-Powered-By:
|
187
|
+
- PHP/5.2.10
|
188
|
+
Set-Cookie:
|
189
|
+
- PHPSESSID=13447e4859a6a336f5b032af413770a3; path=/
|
190
|
+
Expires:
|
191
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
192
|
+
Cache-Control:
|
193
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
194
|
+
Pragma:
|
195
|
+
- no-cache
|
196
|
+
Content-Type:
|
197
|
+
- text/plain;charset=UTF-8
|
198
|
+
Connection:
|
199
|
+
- close
|
200
|
+
Transfer-Encoding:
|
201
|
+
- chunked
|
202
|
+
Date:
|
203
|
+
- Wed, 20 Feb 2013 05:18:17 GMT
|
204
|
+
Server:
|
205
|
+
- lighttpd/1.4.28
|
206
|
+
body:
|
207
|
+
encoding: US-ASCII
|
208
|
+
string: 'true'
|
209
|
+
http_version:
|
210
|
+
recorded_at: Wed, 20 Feb 2013 05:18:17 GMT
|
211
|
+
- request:
|
212
|
+
method: get
|
213
|
+
uri: https://api.emailcampaigns.net/2/REST/?campaignId=117&key=%{API_KEY}&method=Campaign_Get_Info
|
214
|
+
body:
|
215
|
+
encoding: US-ASCII
|
216
|
+
string: ''
|
217
|
+
headers:
|
218
|
+
Accept:
|
219
|
+
- application/json
|
220
|
+
User-Agent:
|
221
|
+
- contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
|
222
|
+
response:
|
223
|
+
status:
|
224
|
+
code: 200
|
225
|
+
message: OK
|
226
|
+
headers:
|
227
|
+
X-Powered-By:
|
228
|
+
- PHP/5.2.10
|
229
|
+
Set-Cookie:
|
230
|
+
- PHPSESSID=f0fd9412be958c8c61f623fd396810b9; path=/
|
231
|
+
Expires:
|
232
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
233
|
+
Cache-Control:
|
234
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
235
|
+
Pragma:
|
236
|
+
- no-cache
|
237
|
+
Content-Type:
|
238
|
+
- text/plain;charset=UTF-8
|
239
|
+
Connection:
|
240
|
+
- close
|
241
|
+
Transfer-Encoding:
|
242
|
+
- chunked
|
243
|
+
Date:
|
244
|
+
- Wed, 20 Feb 2013 05:18:18 GMT
|
245
|
+
Server:
|
246
|
+
- lighttpd/1.4.28
|
247
|
+
body:
|
248
|
+
encoding: US-ASCII
|
249
|
+
string: ! '{"result":"error","message":"Input Error: campaignId 117 not found","code":601}'
|
250
|
+
http_version:
|
251
|
+
recorded_at: Wed, 20 Feb 2013 05:18:18 GMT
|
252
|
+
- request:
|
253
|
+
method: get
|
254
|
+
uri: https://api.emailcampaigns.net/2/REST/?key=%{API_KEY}&listId=189&method=List_Delete
|
255
|
+
body:
|
256
|
+
encoding: US-ASCII
|
257
|
+
string: ''
|
258
|
+
headers:
|
259
|
+
Accept:
|
260
|
+
- application/json
|
261
|
+
User-Agent:
|
262
|
+
- contactology/0.1.2 (Rubygems; Ruby 1.9.3 x86_64-darwin12.2.0)
|
263
|
+
response:
|
264
|
+
status:
|
265
|
+
code: 200
|
266
|
+
message: OK
|
267
|
+
headers:
|
268
|
+
X-Powered-By:
|
269
|
+
- PHP/5.2.10
|
270
|
+
Set-Cookie:
|
271
|
+
- PHPSESSID=4569538230ace7bfbe824d5815fb50da; path=/
|
272
|
+
Expires:
|
273
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
274
|
+
Cache-Control:
|
275
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
276
|
+
Pragma:
|
277
|
+
- no-cache
|
278
|
+
Content-Type:
|
279
|
+
- text/plain;charset=UTF-8
|
280
|
+
Connection:
|
281
|
+
- close
|
282
|
+
Transfer-Encoding:
|
283
|
+
- chunked
|
284
|
+
Date:
|
285
|
+
- Wed, 20 Feb 2013 05:18:18 GMT
|
286
|
+
Server:
|
287
|
+
- lighttpd/1.4.28
|
288
|
+
body:
|
289
|
+
encoding: US-ASCII
|
290
|
+
string: 'true'
|
291
|
+
http_version:
|
292
|
+
recorded_at: Wed, 20 Feb 2013 05:18:18 GMT
|
293
|
+
recorded_with: VCR 2.4.0
|