constantcontact 2.2.1 → 3.0.0
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.
- checksums.yaml +4 -4
- data/.rspec +2 -2
- data/README.md +56 -1
- data/constantcontact.gemspec +1 -1
- data/lib/constantcontact/api.rb +111 -97
- data/lib/constantcontact/services/account_service.rb +20 -22
- data/lib/constantcontact/services/activity_service.rb +98 -100
- data/lib/constantcontact/services/base_service.rb +46 -44
- data/lib/constantcontact/services/campaign_schedule_service.rb +72 -74
- data/lib/constantcontact/services/campaign_tracking_service.rb +103 -105
- data/lib/constantcontact/services/contact_service.rb +73 -75
- data/lib/constantcontact/services/contact_tracking_service.rb +103 -105
- data/lib/constantcontact/services/email_marketing_service.rb +64 -66
- data/lib/constantcontact/services/event_spot_service.rb +356 -358
- data/lib/constantcontact/services/library_service.rb +228 -230
- data/lib/constantcontact/services/list_service.rb +55 -57
- data/lib/constantcontact/version.rb +1 -1
- data/spec/constantcontact/api_spec.rb +2 -4
- data/spec/constantcontact/services/account_service_spec.rb +3 -2
- data/spec/constantcontact/services/activity_service_spec.rb +10 -9
- data/spec/constantcontact/services/base_service_spec.rb +7 -5
- data/spec/constantcontact/services/campaign_schedule_service_spec.rb +7 -6
- data/spec/constantcontact/services/campaign_tracking_service_spec.rb +8 -7
- data/spec/constantcontact/services/contact_service_spec.rb +8 -7
- data/spec/constantcontact/services/contact_tracking_service_spec.rb +8 -7
- data/spec/constantcontact/services/email_marketing_spec.rb +7 -6
- data/spec/constantcontact/services/event_spot_spec.rb +28 -27
- data/spec/constantcontact/services/library_service_spec.rb +17 -16
- data/spec/constantcontact/services/list_service_spec.rb +6 -5
- metadata +20 -20
@@ -9,6 +9,7 @@ require 'spec_helper'
|
|
9
9
|
describe ConstantContact::Services::ListService do
|
10
10
|
before(:each) do
|
11
11
|
@request = double('http request', :user => nil, :password => nil, :url => 'http://example.com', :redirection_history => nil)
|
12
|
+
@client = ConstantContact::Api.new('explicit_api_key', "access_token")
|
12
13
|
end
|
13
14
|
|
14
15
|
describe "#get_lists" do
|
@@ -19,7 +20,7 @@ describe ConstantContact::Services::ListService do
|
|
19
20
|
response = RestClient::Response.create(json_response, net_http_resp, {}, @request)
|
20
21
|
RestClient.stub(:get).and_return(response)
|
21
22
|
|
22
|
-
lists = ConstantContact::Services::ListService.get_lists()
|
23
|
+
lists = ConstantContact::Services::ListService.new(@client).get_lists()
|
23
24
|
lists.should be_kind_of(Array)
|
24
25
|
lists.first.should be_kind_of(ConstantContact::Components::ContactList)
|
25
26
|
lists.first.name.should eq('General Interest')
|
@@ -34,7 +35,7 @@ describe ConstantContact::Services::ListService do
|
|
34
35
|
response = RestClient::Response.create(json, net_http_resp, {}, @request)
|
35
36
|
RestClient.stub(:get).and_return(response)
|
36
37
|
|
37
|
-
list = ConstantContact::Services::ListService.get_list(1)
|
38
|
+
list = ConstantContact::Services::ListService.new(@client).get_list(1)
|
38
39
|
list.should be_kind_of(ConstantContact::Components::ContactList)
|
39
40
|
list.name.should eq('Monthly Specials')
|
40
41
|
end
|
@@ -49,7 +50,7 @@ describe ConstantContact::Services::ListService do
|
|
49
50
|
RestClient.stub(:post).and_return(response)
|
50
51
|
new_list = ConstantContact::Components::ContactList.create(JSON.parse(json))
|
51
52
|
|
52
|
-
list = ConstantContact::Services::ListService.add_list(new_list)
|
53
|
+
list = ConstantContact::Services::ListService.new(@client).add_list(new_list)
|
53
54
|
list.should be_kind_of(ConstantContact::Components::ContactList)
|
54
55
|
list.status.should eq('ACTIVE')
|
55
56
|
end
|
@@ -64,7 +65,7 @@ describe ConstantContact::Services::ListService do
|
|
64
65
|
RestClient.stub(:put).and_return(response)
|
65
66
|
list = ConstantContact::Components::ContactList.create(JSON.parse(json))
|
66
67
|
|
67
|
-
result = ConstantContact::Services::ListService.update_list(list)
|
68
|
+
result = ConstantContact::Services::ListService.new(@client).update_list(list)
|
68
69
|
result.should be_kind_of(ConstantContact::Components::ContactList)
|
69
70
|
result.status.should eq('ACTIVE')
|
70
71
|
end
|
@@ -80,7 +81,7 @@ describe ConstantContact::Services::ListService do
|
|
80
81
|
RestClient.stub(:get).and_return(response)
|
81
82
|
list = ConstantContact::Components::ContactList.create(JSON.parse(json_list))
|
82
83
|
|
83
|
-
contacts = ConstantContact::Services::ListService.get_contacts_from_list(list)
|
84
|
+
contacts = ConstantContact::Services::ListService.new(@client).get_contacts_from_list(list)
|
84
85
|
contacts.should be_kind_of(ConstantContact::Components::ResultSet)
|
85
86
|
contacts.results.first.should be_kind_of(ConstantContact::Components::Contact)
|
86
87
|
contacts.results.first.fax.should eq('318-978-7575')
|
metadata
CHANGED
@@ -1,87 +1,87 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: constantcontact
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ConstantContact
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.6'
|
20
|
-
- -
|
20
|
+
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 1.6.7
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - ~>
|
27
|
+
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '1.6'
|
30
|
-
- -
|
30
|
+
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.6.7
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: json
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - ~>
|
37
|
+
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: '1.8'
|
40
|
-
- -
|
40
|
+
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: 1.8.1
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- - ~>
|
47
|
+
- - "~>"
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: '1.8'
|
50
|
-
- -
|
50
|
+
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: 1.8.1
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: mime-types
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
|
-
- - ~>
|
57
|
+
- - "~>"
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: '2.4'
|
60
|
-
- -
|
60
|
+
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: 2.4.1
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- - ~>
|
67
|
+
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '2.4'
|
70
|
-
- -
|
70
|
+
- - ">="
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: 2.4.1
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
74
|
name: rspec
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
|
-
- - ~>
|
77
|
+
- - "~>"
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: '2.14'
|
80
80
|
type: :development
|
81
81
|
prerelease: false
|
82
82
|
version_requirements: !ruby/object:Gem::Requirement
|
83
83
|
requirements:
|
84
|
-
- - ~>
|
84
|
+
- - "~>"
|
85
85
|
- !ruby/object:Gem::Version
|
86
86
|
version: '2.14'
|
87
87
|
description: Ruby library for interactions with Constant Contact v2 API
|
@@ -90,7 +90,7 @@ executables: []
|
|
90
90
|
extensions: []
|
91
91
|
extra_rdoc_files: []
|
92
92
|
files:
|
93
|
-
- .rspec
|
93
|
+
- ".rspec"
|
94
94
|
- README.md
|
95
95
|
- constantcontact.gemspec
|
96
96
|
- lib/constantcontact.rb
|
@@ -205,17 +205,17 @@ require_paths:
|
|
205
205
|
- lib
|
206
206
|
required_ruby_version: !ruby/object:Gem::Requirement
|
207
207
|
requirements:
|
208
|
-
- -
|
208
|
+
- - ">="
|
209
209
|
- !ruby/object:Gem::Version
|
210
210
|
version: '0'
|
211
211
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
|
-
- -
|
213
|
+
- - ">="
|
214
214
|
- !ruby/object:Gem::Version
|
215
215
|
version: '0'
|
216
216
|
requirements: []
|
217
217
|
rubyforge_project:
|
218
|
-
rubygems_version: 2.6.
|
218
|
+
rubygems_version: 2.6.10
|
219
219
|
signing_key:
|
220
220
|
specification_version: 4
|
221
221
|
summary: Constant Contact SDK for Ruby
|