active_campaign 0.1.14 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.codeclimate.yml +25 -3
- data/.rubocop.yml +21 -9
- data/.simplecov +9 -0
- data/.travis.yml +32 -12
- data/Changelog.md +14 -3
- data/Gemfile +2 -19
- data/README.md +13 -3
- data/Rakefile +4 -2
- data/active_campaign.gemspec +16 -3
- data/lib/active_campaign.rb +13 -15
- data/lib/active_campaign/client.rb +32 -29
- data/lib/active_campaign/client/campaigns.rb +86 -15
- data/lib/active_campaign/client/contacts.rb +90 -18
- data/lib/active_campaign/client/deals.rb +80 -14
- data/lib/active_campaign/client/forms.rb +7 -7
- data/lib/active_campaign/client/groups.rb +22 -10
- data/lib/active_campaign/client/lists.rb +52 -13
- data/lib/active_campaign/client/messages.rb +62 -14
- data/lib/active_campaign/client/tracks.rb +48 -11
- data/lib/active_campaign/client/users.rb +44 -9
- data/lib/active_campaign/configuration.rb +38 -13
- data/lib/active_campaign/core_ext.rb +8 -3
- data/lib/active_campaign/version.rb +3 -1
- data/spec/lib/active_campaign/client/contacts_spec.rb +2 -1
- data/spec/lib/active_campaign/client/lists_spec.rb +2 -1
- data/spec/lib/active_campaign/client_spec.rb +8 -0
- data/spec/lib/active_campaign_spec.rb +15 -20
- data/spec/spec_helper.rb +6 -5
- data/spec/support/vcr.rb +2 -0
- data/spec/support/webmock.rb +2 -0
- metadata +175 -13
- data/.coveralls.yml +0 -1
- data/lib/active_campaign/method_creator.rb +0 -32
- data/spec/support/coverage.rb +0 -18
@@ -1,21 +1,92 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module ActiveCampaign
|
2
4
|
class Client
|
3
5
|
module Campaigns
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
6
|
+
#
|
7
|
+
# POST methods
|
8
|
+
#
|
9
|
+
def campaign_edit(options = {})
|
10
|
+
post __method__, options
|
11
|
+
end
|
12
|
+
|
13
|
+
def campaign_create(options = {})
|
14
|
+
post __method__, options
|
15
|
+
end
|
16
|
+
|
17
|
+
#
|
18
|
+
# GET methods
|
19
|
+
#
|
20
|
+
def campaign_delete_list(options = {})
|
21
|
+
get __method__, options
|
22
|
+
end
|
23
|
+
|
24
|
+
def campaign_delete(options = {})
|
25
|
+
get __method__, options
|
26
|
+
end
|
27
|
+
|
28
|
+
def campaign_list(options = {})
|
29
|
+
get __method__, options
|
30
|
+
end
|
31
|
+
|
32
|
+
def campaign_paginator(options = {})
|
33
|
+
get __method__, options
|
34
|
+
end
|
35
|
+
|
36
|
+
def campaign_report_bounce_list(options = {})
|
37
|
+
get __method__, options
|
38
|
+
end
|
39
|
+
|
40
|
+
def campaign_report_bounce_totals(options = {})
|
41
|
+
get __method__, options
|
42
|
+
end
|
43
|
+
|
44
|
+
def campaign_report_forward_list(options = {})
|
45
|
+
get __method__, options
|
46
|
+
end
|
47
|
+
|
48
|
+
def campaign_report_forward_totals(options = {})
|
49
|
+
get __method__, options
|
50
|
+
end
|
51
|
+
|
52
|
+
def campaign_report_link_list(options = {})
|
53
|
+
get __method__, options
|
54
|
+
end
|
55
|
+
|
56
|
+
def campaign_report_link_totals(options = {})
|
57
|
+
get __method__, options
|
58
|
+
end
|
59
|
+
|
60
|
+
def campaign_report_open_list(options = {})
|
61
|
+
get __method__, options
|
62
|
+
end
|
63
|
+
|
64
|
+
def campaign_report_open_totals(options = {})
|
65
|
+
get __method__, options
|
66
|
+
end
|
67
|
+
|
68
|
+
def campaign_report_totals(options = {})
|
69
|
+
get __method__, options
|
70
|
+
end
|
71
|
+
|
72
|
+
def campaign_report_unopen_list(options = {})
|
73
|
+
get __method__, options
|
74
|
+
end
|
75
|
+
|
76
|
+
def campaign_report_unsubscription_list(options = {})
|
77
|
+
get __method__, options
|
78
|
+
end
|
79
|
+
|
80
|
+
def campaign_report_unsubscription_totals(options = {})
|
81
|
+
get __method__, options
|
82
|
+
end
|
83
|
+
|
84
|
+
def campaign_send(options = {})
|
85
|
+
get __method__, options
|
86
|
+
end
|
87
|
+
|
88
|
+
def campaign_status(options = {})
|
89
|
+
get __method__, options
|
19
90
|
end
|
20
91
|
end
|
21
92
|
end
|
@@ -1,25 +1,97 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module ActiveCampaign
|
2
4
|
class Client
|
3
5
|
module Contacts
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
)
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
def
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
6
|
+
#
|
7
|
+
# POST methods
|
8
|
+
#
|
9
|
+
def automation_contact_remove(options = {})
|
10
|
+
post __method__, options
|
11
|
+
end
|
12
|
+
|
13
|
+
def contact_add(options = {})
|
14
|
+
post __method__, options
|
15
|
+
end
|
16
|
+
alias subscriber_add contact_add
|
17
|
+
|
18
|
+
def contact_edit(options = {})
|
19
|
+
post __method__, options
|
20
|
+
end
|
21
|
+
alias subscriber_edit contact_edit
|
22
|
+
|
23
|
+
def contact_sync(options = {})
|
24
|
+
post __method__, options
|
25
|
+
end
|
26
|
+
alias subscriber_sync contact_sync
|
27
|
+
|
28
|
+
def contact_tag_add(options = {})
|
29
|
+
post __method__, options
|
30
|
+
end
|
31
|
+
alias subscriber_tag_add contact_tag_add
|
32
|
+
|
33
|
+
def contact_tag_remove(options = {})
|
34
|
+
post __method__, options
|
35
|
+
end
|
36
|
+
alias subscriber_tag_remove contact_tag_remove
|
37
|
+
|
38
|
+
def contact_note_edit(options = {})
|
39
|
+
post __method__, options
|
40
|
+
end
|
41
|
+
alias subscriber_note_edit contact_note_edit
|
42
|
+
|
43
|
+
def contact_note_add(options = {})
|
44
|
+
post __method__, options
|
45
|
+
end
|
46
|
+
alias subscriber_note_add contact_note_add
|
47
|
+
|
48
|
+
#
|
49
|
+
# GET methods
|
50
|
+
#
|
51
|
+
def contact_automation_list(options = {})
|
52
|
+
get __method__, options
|
53
|
+
end
|
54
|
+
alias subscriber_automation_list contact_automation_list
|
55
|
+
|
56
|
+
def contact_delete_list(options = {})
|
57
|
+
get __method__, options
|
58
|
+
end
|
59
|
+
alias subscriber_delete_list contact_delete_list
|
60
|
+
|
61
|
+
def contact_delete(options = {})
|
62
|
+
get __method__, options
|
63
|
+
end
|
64
|
+
alias subscriber_delete contact_delete
|
65
|
+
|
66
|
+
def contact_list(options = {})
|
67
|
+
get __method__, options
|
68
|
+
end
|
69
|
+
alias subscriber_list contact_list
|
70
|
+
|
71
|
+
def contact_paginator(options = {})
|
72
|
+
get __method__, options
|
73
|
+
end
|
74
|
+
alias subscriber_paginator contact_paginator
|
75
|
+
|
76
|
+
def contact_view(options = {})
|
77
|
+
get __method__, options
|
78
|
+
end
|
79
|
+
alias subscriber_view contact_view
|
80
|
+
|
81
|
+
def contact_view_email(options = {})
|
82
|
+
get __method__, options
|
83
|
+
end
|
84
|
+
alias subscriber_view_email contact_view_email
|
85
|
+
|
86
|
+
def contact_view_hash(options = {})
|
87
|
+
get __method__, options
|
88
|
+
end
|
89
|
+
alias subscriber_view_hash contact_view_hash
|
90
|
+
|
91
|
+
def contact_note_delete(options = {})
|
92
|
+
get __method__, options
|
22
93
|
end
|
94
|
+
alias subscriber_note_delete contact_note_delete
|
23
95
|
end
|
24
96
|
end
|
25
97
|
end
|
@@ -1,20 +1,86 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module ActiveCampaign
|
2
4
|
class Client
|
3
5
|
module Deals
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
6
|
+
def deal_get(options = {})
|
7
|
+
get __method__, options
|
8
|
+
end
|
9
|
+
|
10
|
+
def deal_list(options = {})
|
11
|
+
get __method__, options
|
12
|
+
end
|
13
|
+
|
14
|
+
def deal_pipeline_list(options = {})
|
15
|
+
get __method__, options
|
16
|
+
end
|
17
|
+
|
18
|
+
def deal_stage_list(options = {})
|
19
|
+
get __method__, options
|
20
|
+
end
|
21
|
+
|
22
|
+
def deal_add(options = {})
|
23
|
+
post __method__, options
|
24
|
+
end
|
25
|
+
|
26
|
+
def deal_delete(options = {})
|
27
|
+
post __method__, options
|
28
|
+
end
|
29
|
+
|
30
|
+
def deal_edit(options = {})
|
31
|
+
post __method__, options
|
32
|
+
end
|
33
|
+
|
34
|
+
def deal_note_add(options = {})
|
35
|
+
post __method__, options
|
36
|
+
end
|
37
|
+
|
38
|
+
def deal_note_edit(options = {})
|
39
|
+
post __method__, options
|
40
|
+
end
|
41
|
+
|
42
|
+
def deal_pipeline_add(options = {})
|
43
|
+
post __method__, options
|
44
|
+
end
|
45
|
+
|
46
|
+
def deal_pipeline_delete(options = {})
|
47
|
+
post __method__, options
|
48
|
+
end
|
49
|
+
|
50
|
+
def deal_pipeline_edit(options = {})
|
51
|
+
post __method__, options
|
52
|
+
end
|
53
|
+
|
54
|
+
def deal_stage_add(options = {})
|
55
|
+
post __method__, options
|
56
|
+
end
|
57
|
+
|
58
|
+
def deal_stage_delete(options = {})
|
59
|
+
post __method__, options
|
60
|
+
end
|
61
|
+
|
62
|
+
def deal_stage_edit(options = {})
|
63
|
+
post __method__, options
|
64
|
+
end
|
65
|
+
|
66
|
+
def deal_task_add(options = {})
|
67
|
+
post __method__, options
|
68
|
+
end
|
69
|
+
|
70
|
+
def deal_task_edit(options = {})
|
71
|
+
post __method__, options
|
72
|
+
end
|
73
|
+
|
74
|
+
def deal_tasktype_add(options = {})
|
75
|
+
post __method__, options
|
76
|
+
end
|
77
|
+
|
78
|
+
def deal_tasktype_delete(options = {})
|
79
|
+
post __method__, options
|
80
|
+
end
|
81
|
+
|
82
|
+
def deal_tasktype_edit(options = {})
|
83
|
+
post __method__, options
|
18
84
|
end
|
19
85
|
end
|
20
86
|
end
|
@@ -1,14 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module ActiveCampaign
|
2
4
|
class Client
|
3
5
|
module Forms
|
4
|
-
|
6
|
+
def form_getforms(options = {})
|
7
|
+
get(__method__, options)
|
8
|
+
end
|
5
9
|
|
6
|
-
|
7
|
-
|
8
|
-
def self.included(base)
|
9
|
-
base.class_exec do
|
10
|
-
define_api_calls(:form, GET_METHODS)
|
11
|
-
end
|
10
|
+
def form_html(options = {})
|
11
|
+
get(__method__, options)
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -1,18 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module ActiveCampaign
|
2
4
|
class Client
|
3
5
|
module Groups
|
4
|
-
|
5
|
-
|
6
|
-
|
6
|
+
def group_delete(options = {})
|
7
|
+
get __method__, options
|
8
|
+
end
|
7
9
|
|
8
|
-
|
10
|
+
def group_delete_list(options = {})
|
11
|
+
get __method__, options
|
12
|
+
end
|
13
|
+
|
14
|
+
def group_list(options = {})
|
15
|
+
get __method__, options
|
16
|
+
end
|
17
|
+
|
18
|
+
def group_view(options = {})
|
19
|
+
get __method__, options
|
20
|
+
end
|
21
|
+
|
22
|
+
def group_add(options = {})
|
23
|
+
post __method__, options
|
24
|
+
end
|
9
25
|
|
10
|
-
|
11
|
-
|
12
|
-
def self.included(base)
|
13
|
-
base.class_exec do
|
14
|
-
define_api_calls(:group, GET_METHODS, POST_METHODS)
|
15
|
-
end
|
26
|
+
def group_edit(options = {})
|
27
|
+
post __method__, options
|
16
28
|
end
|
17
29
|
end
|
18
30
|
end
|
@@ -1,19 +1,58 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module ActiveCampaign
|
2
4
|
class Client
|
3
5
|
module Lists
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
6
|
+
#
|
7
|
+
# POST methods
|
8
|
+
#
|
9
|
+
|
10
|
+
def list_add(options = {})
|
11
|
+
post __method__, options
|
12
|
+
end
|
13
|
+
|
14
|
+
def list_edit(options = {})
|
15
|
+
post __method__, options
|
16
|
+
end
|
17
|
+
|
18
|
+
def list_field_add(options = {})
|
19
|
+
post __method__, options
|
20
|
+
end
|
21
|
+
|
22
|
+
def list_field_edit(options = {})
|
23
|
+
post __method__, options
|
24
|
+
end
|
25
|
+
|
26
|
+
#
|
27
|
+
# GET methods
|
28
|
+
#
|
29
|
+
|
30
|
+
def list_delete_list(options = {})
|
31
|
+
get __method__, options
|
32
|
+
end
|
33
|
+
|
34
|
+
def list_delete(options = {})
|
35
|
+
get __method__, options
|
36
|
+
end
|
37
|
+
|
38
|
+
def list_field_delete(options = {})
|
39
|
+
get __method__, options
|
40
|
+
end
|
41
|
+
|
42
|
+
def list_field_view(options = {})
|
43
|
+
get __method__, options
|
44
|
+
end
|
45
|
+
|
46
|
+
def list_list(options = {})
|
47
|
+
get __method__, options
|
48
|
+
end
|
49
|
+
|
50
|
+
def list_paginator(options = {})
|
51
|
+
get __method__, options
|
52
|
+
end
|
53
|
+
|
54
|
+
def list_view(options = {})
|
55
|
+
get __method__, options
|
17
56
|
end
|
18
57
|
end
|
19
58
|
end
|