mailjet 1.5.4 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +293 -189
- data/Rakefile +19 -14
- data/lib/mailjet/api_error.rb +19 -20
- data/lib/mailjet/configuration.rb +1 -0
- data/lib/mailjet/connection.rb +11 -3
- data/lib/mailjet/mailer.rb +40 -8
- data/lib/mailjet/resource.rb +33 -29
- data/lib/mailjet/resources/campaigndraft.rb +1 -1
- data/lib/mailjet/resources/campaigndraft_detailcontent.rb +1 -1
- data/lib/mailjet/resources/campaigndraft_schedule.rb +1 -1
- data/lib/mailjet/resources/campaigndraft_send.rb +1 -1
- data/lib/mailjet/resources/campaigndraft_status.rb +1 -1
- data/lib/mailjet/resources/campaigndraft_test.rb +1 -1
- data/lib/mailjet/resources/contact_getcontactslists.rb +17 -0
- data/lib/mailjet/resources/messagehistory.rb +16 -0
- data/lib/mailjet/resources/newsletter.rb +1 -2
- data/lib/mailjet/resources/statcounters.rb +33 -0
- data/lib/mailjet/resources/template_detailcontent.rb +18 -2
- data/lib/mailjet/version.rb +1 -1
- metadata +10 -121
@@ -4,7 +4,6 @@ module Mailjet
|
|
4
4
|
self.resource_path = 'REST/newsletter'
|
5
5
|
self.public_operations = [:get, :put, :post]
|
6
6
|
self.filters = [:campaign, :contacts_list, :delivered_at, :edit_mode, :is_archived, :is_campaign, :is_deleted, :is_handled, :is_starred, :modified, :news_letter_template, :segmentation, :status, :subject]
|
7
|
-
self.resourceprop = [:callback, :campaign, :contacts_list, :created_at, :delivered_at, :edit_mode, :edit_type, :footer, :footer_address, :footer_wysiwyg_type, :header_filename, :header_link, :header_text, :header_url, :id, :ip, :is_handled, :is_starred, :is_text_part_included, :locale, :modified_at, :permalink, :permalink_host, :permalink_wysiwyg_type, :politeness_mode, :reply_email, :segmentation, :sender, :sender_email, :sender_name, :status, :subject, :template, :test_address, :title, :url, 'CampaignID', 'CampaignALT', 'ContactsListID', 'ContactsListALT', 'SegmentationID', 'SegmentationALT', :contacts_list_id]
|
8
|
-
|
7
|
+
self.resourceprop = [:callback, :campaign, :contacts_list, :created_at, :delivered_at, :edit_mode, :edit_type, :footer, :footer_address, :footer_wysiwyg_type, :header_filename, :header_link, :header_text, :header_url, :id, :ip, :is_handled, :is_starred, :is_text_part_included, :locale, :modified_at, :permalink, :permalink_host, :permalink_wysiwyg_type, :politeness_mode, :reply_email, :segmentation, :segmentation_id, :sender, :sender_email, :sender_name, :status, :subject, :template, :test_address, :title, :url, 'CampaignID', 'CampaignALT', 'ContactsListID', 'ContactsListALT', 'SegmentationID', 'SegmentationALT', :contacts_list_id]
|
9
8
|
end
|
10
9
|
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Mailjet
|
2
|
+
class Statcounters
|
3
|
+
include Mailjet::Resource
|
4
|
+
self.resource_path = 'REST/statcounters'
|
5
|
+
self.public_operations = [:get]
|
6
|
+
self.filters = [:source_id, :counter_resolution, :counter_source, :counter_timing]
|
7
|
+
self.resourceprop = [
|
8
|
+
:api_key_id,
|
9
|
+
:event_click_delay,
|
10
|
+
:event_clicked_count,
|
11
|
+
:event_open_delay,
|
12
|
+
:event_opened_count,
|
13
|
+
:event_spam_count,
|
14
|
+
:event_unsubscribed_count,
|
15
|
+
:event_workflow_exited_count,
|
16
|
+
:message_blocked_count,
|
17
|
+
:message_clicked_count,
|
18
|
+
:message_deferred_count,
|
19
|
+
:message_hard_bounced_count,
|
20
|
+
:message_opened_count,
|
21
|
+
:message_queued_count,
|
22
|
+
:message_sent_count,
|
23
|
+
:message_soft_bounced_count,
|
24
|
+
:message_spam_count,
|
25
|
+
:message_unsubscribed_count,
|
26
|
+
:message_work_flow_exited_count,
|
27
|
+
:source_id,
|
28
|
+
:timeslice,
|
29
|
+
:total,
|
30
|
+
]
|
31
|
+
self.read_only = true
|
32
|
+
end
|
33
|
+
end
|
@@ -1,10 +1,26 @@
|
|
1
1
|
module Mailjet
|
2
2
|
class Template_detailcontent
|
3
3
|
include Mailjet::Resource
|
4
|
-
self.
|
5
|
-
self.
|
4
|
+
self.action = 'detailcontent'
|
5
|
+
self.resource_path = "REST/template/id/#{self.action}"
|
6
|
+
self.public_operations = [:get,:post]
|
6
7
|
self.filters = [:api_key, :categories, :categories_selection_method, :edit_mode, :name, :owner_type, :purposes, :purposes_selection_method, :user]
|
7
8
|
self.resourceprop = [:author, :categories, :copyright, :description, :edit_mode, :is_starred, :name, :owner_type, :presets, :purposes]
|
8
9
|
|
10
|
+
def self.find(id, options = {})
|
11
|
+
self.resource_path = create_action_resource_path(id)
|
12
|
+
|
13
|
+
opts = define_options(options)
|
14
|
+
response = connection(opts).get(default_headers)
|
15
|
+
attributes = parse_api_json(response).first
|
16
|
+
|
17
|
+
instanciate_from_api(attributes)
|
18
|
+
rescue Mailjet::ApiError => e
|
19
|
+
if e.code == 404
|
20
|
+
nil
|
21
|
+
else
|
22
|
+
raise e
|
23
|
+
end
|
24
|
+
end
|
9
25
|
end
|
10
26
|
end
|
data/lib/mailjet/version.rb
CHANGED
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailjet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tyler Nappy
|
8
8
|
- Jean-Baptiste Escoyez
|
9
9
|
- Aurélien AMILIN
|
10
10
|
- Benoit Bénézech
|
11
|
-
autorequire:
|
11
|
+
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2021-01-21 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|
@@ -47,14 +47,14 @@ dependencies:
|
|
47
47
|
requirements:
|
48
48
|
- - ">="
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version:
|
50
|
+
version: 2.0.0
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
55
|
- - ">="
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version:
|
57
|
+
version: 2.0.0
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: actionmailer
|
60
60
|
requirement: !ruby/object:Gem::Requirement
|
@@ -69,62 +69,6 @@ dependencies:
|
|
69
69
|
- - ">="
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: 3.0.9
|
72
|
-
- !ruby/object:Gem::Dependency
|
73
|
-
name: minitest
|
74
|
-
requirement: !ruby/object:Gem::Requirement
|
75
|
-
requirements:
|
76
|
-
- - ">="
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version: '0'
|
79
|
-
type: :development
|
80
|
-
prerelease: false
|
81
|
-
version_requirements: !ruby/object:Gem::Requirement
|
82
|
-
requirements:
|
83
|
-
- - ">="
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: '0'
|
86
|
-
- !ruby/object:Gem::Dependency
|
87
|
-
name: minitest-matchers
|
88
|
-
requirement: !ruby/object:Gem::Requirement
|
89
|
-
requirements:
|
90
|
-
- - ">="
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
version: '0'
|
93
|
-
type: :development
|
94
|
-
prerelease: false
|
95
|
-
version_requirements: !ruby/object:Gem::Requirement
|
96
|
-
requirements:
|
97
|
-
- - ">="
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
version: '0'
|
100
|
-
- !ruby/object:Gem::Dependency
|
101
|
-
name: minitest-spec-context
|
102
|
-
requirement: !ruby/object:Gem::Requirement
|
103
|
-
requirements:
|
104
|
-
- - ">="
|
105
|
-
- !ruby/object:Gem::Version
|
106
|
-
version: '0'
|
107
|
-
type: :development
|
108
|
-
prerelease: false
|
109
|
-
version_requirements: !ruby/object:Gem::Requirement
|
110
|
-
requirements:
|
111
|
-
- - ">="
|
112
|
-
- !ruby/object:Gem::Version
|
113
|
-
version: '0'
|
114
|
-
- !ruby/object:Gem::Dependency
|
115
|
-
name: turn
|
116
|
-
requirement: !ruby/object:Gem::Requirement
|
117
|
-
requirements:
|
118
|
-
- - ">="
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
version: '0'
|
121
|
-
type: :development
|
122
|
-
prerelease: false
|
123
|
-
version_requirements: !ruby/object:Gem::Requirement
|
124
|
-
requirements:
|
125
|
-
- - ">="
|
126
|
-
- !ruby/object:Gem::Version
|
127
|
-
version: '0'
|
128
72
|
- !ruby/object:Gem::Dependency
|
129
73
|
name: rake
|
130
74
|
requirement: !ruby/object:Gem::Requirement
|
@@ -153,20 +97,6 @@ dependencies:
|
|
153
97
|
- - ">="
|
154
98
|
- !ruby/object:Gem::Version
|
155
99
|
version: '0'
|
156
|
-
- !ruby/object:Gem::Dependency
|
157
|
-
name: mocha
|
158
|
-
requirement: !ruby/object:Gem::Requirement
|
159
|
-
requirements:
|
160
|
-
- - ">="
|
161
|
-
- !ruby/object:Gem::Version
|
162
|
-
version: '0'
|
163
|
-
type: :development
|
164
|
-
prerelease: false
|
165
|
-
version_requirements: !ruby/object:Gem::Requirement
|
166
|
-
requirements:
|
167
|
-
- - ">="
|
168
|
-
- !ruby/object:Gem::Version
|
169
|
-
version: '0'
|
170
100
|
- !ruby/object:Gem::Dependency
|
171
101
|
name: webmock
|
172
102
|
requirement: !ruby/object:Gem::Requirement
|
@@ -195,34 +125,6 @@ dependencies:
|
|
195
125
|
- - ">="
|
196
126
|
- !ruby/object:Gem::Version
|
197
127
|
version: '0'
|
198
|
-
- !ruby/object:Gem::Dependency
|
199
|
-
name: guard
|
200
|
-
requirement: !ruby/object:Gem::Requirement
|
201
|
-
requirements:
|
202
|
-
- - ">="
|
203
|
-
- !ruby/object:Gem::Version
|
204
|
-
version: '0'
|
205
|
-
type: :development
|
206
|
-
prerelease: false
|
207
|
-
version_requirements: !ruby/object:Gem::Requirement
|
208
|
-
requirements:
|
209
|
-
- - ">="
|
210
|
-
- !ruby/object:Gem::Version
|
211
|
-
version: '0'
|
212
|
-
- !ruby/object:Gem::Dependency
|
213
|
-
name: guard-minitest
|
214
|
-
requirement: !ruby/object:Gem::Requirement
|
215
|
-
requirements:
|
216
|
-
- - ">="
|
217
|
-
- !ruby/object:Gem::Version
|
218
|
-
version: '0'
|
219
|
-
type: :development
|
220
|
-
prerelease: false
|
221
|
-
version_requirements: !ruby/object:Gem::Requirement
|
222
|
-
requirements:
|
223
|
-
- - ">="
|
224
|
-
- !ruby/object:Gem::Version
|
225
|
-
version: '0'
|
226
128
|
- !ruby/object:Gem::Dependency
|
227
129
|
name: rspec
|
228
130
|
requirement: !ruby/object:Gem::Requirement
|
@@ -237,20 +139,6 @@ dependencies:
|
|
237
139
|
- - ">="
|
238
140
|
- !ruby/object:Gem::Version
|
239
141
|
version: '0'
|
240
|
-
- !ruby/object:Gem::Dependency
|
241
|
-
name: rspec-expectations
|
242
|
-
requirement: !ruby/object:Gem::Requirement
|
243
|
-
requirements:
|
244
|
-
- - ">="
|
245
|
-
- !ruby/object:Gem::Version
|
246
|
-
version: '0'
|
247
|
-
type: :development
|
248
|
-
prerelease: false
|
249
|
-
version_requirements: !ruby/object:Gem::Requirement
|
250
|
-
requirements:
|
251
|
-
- - ">="
|
252
|
-
- !ruby/object:Gem::Version
|
253
|
-
version: '0'
|
254
142
|
- !ruby/object:Gem::Dependency
|
255
143
|
name: dotenv
|
256
144
|
requirement: !ruby/object:Gem::Requirement
|
@@ -364,6 +252,7 @@ files:
|
|
364
252
|
- lib/mailjet/resources/sender.rb
|
365
253
|
- lib/mailjet/resources/sender_validate.rb
|
366
254
|
- lib/mailjet/resources/senderstatistics.rb
|
255
|
+
- lib/mailjet/resources/statcounters.rb
|
367
256
|
- lib/mailjet/resources/template.rb
|
368
257
|
- lib/mailjet/resources/template_detailcontent.rb
|
369
258
|
- lib/mailjet/resources/toplinkclicked.rb
|
@@ -394,19 +283,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
394
283
|
requirements:
|
395
284
|
- - ">="
|
396
285
|
- !ruby/object:Gem::Version
|
397
|
-
version:
|
286
|
+
version: 2.2.0
|
398
287
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
399
288
|
requirements:
|
400
289
|
- - ">="
|
401
290
|
- !ruby/object:Gem::Version
|
402
291
|
version: '0'
|
403
292
|
requirements: []
|
404
|
-
|
405
|
-
|
406
|
-
signing_key:
|
293
|
+
rubygems_version: 3.2.3
|
294
|
+
signing_key:
|
407
295
|
specification_version: 4
|
408
296
|
summary: Mailjet a powerful all-in-one email service provider clients can use to get
|
409
297
|
maximum insight and deliverability results from both their marketing and transactional
|
410
298
|
emails. Our analytics tools and intelligent APIs give senders the best understanding
|
411
299
|
of how to maximize benefits for each individual contact, with each email sent.
|
412
300
|
test_files: []
|
301
|
+
...
|