mailersend-ruby 0.1.1 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/README.md +18 -30
- data/lib/mailersend/activity/activity.rb +1 -1
- data/lib/mailersend/domains/domains.rb +13 -2
- data/lib/mailersend/tokens/tokens.rb +2 -2
- data/lib/mailersend/version.rb +1 -1
- data/mailersend-ruby.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a66c4f7f88e98bd6821f116955e8b9f32f62f85b2854a994ddc0c1d388b4b0cf
|
4
|
+
data.tar.gz: 2613c660cf0d502576cde414c1d2eeebeabd004c9dd152734cc7dae681bfd035
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35a475e87db0310862be164d3e77d412ecc9e7544ca411906c47888fc71dcd2d56596c49168025bf8a9f3580977e7c51b5dc13acea4d12bd257ae54ca4913735
|
7
|
+
data.tar.gz: fe1d0b0830ac2dd2cc7a7df895a97d83bb50563c234781b3ab9d21638f297e273b250e4556647c77acce3cfe3be0f1ae60269d1686d9f250f7951c51a84bc5e5
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,29 @@
|
|
1
1
|
## [Released]
|
2
2
|
|
3
|
+
## [0.1.6] - 2021-06-15
|
4
|
+
|
5
|
+
- Fixed small issues in Domains
|
6
|
+
|
7
|
+
## [0.1.5] - 2021-06-15
|
8
|
+
|
9
|
+
- Fixed arguments error in Domains list
|
10
|
+
|
11
|
+
## [0.1.4] - 2021-06-15
|
12
|
+
|
13
|
+
- Fixed Domains init
|
14
|
+
|
15
|
+
## [0.1.3] - 2021-06-14
|
16
|
+
|
17
|
+
- Updated gem description
|
18
|
+
|
19
|
+
## [0.1.2] - 2021-06-14
|
20
|
+
|
21
|
+
- Fixed activity and tokens endpoints.
|
22
|
+
|
23
|
+
## [0.1.1] - 2021-06-14
|
24
|
+
|
25
|
+
- Updated token format so you don't have to include `Bearer` in env variable.
|
26
|
+
|
3
27
|
## [0.1.0] - 2021-06-14
|
4
28
|
|
5
29
|
- Initial release
|
data/README.md
CHANGED
@@ -137,7 +137,7 @@ ms_tokens.create(name: "Very nice token", scopes: %w[ email_full domains_read ])
|
|
137
137
|
require "mailersend-ruby"
|
138
138
|
|
139
139
|
ms_tokens = Mailersend::Tokens.new
|
140
|
-
ms_tokens.update(token_id: "d2220fx04",
|
140
|
+
ms_tokens.update(token_id: "d2220fx04", status: "paused")
|
141
141
|
```
|
142
142
|
|
143
143
|
### Delete a token
|
@@ -158,26 +158,15 @@ ms_email = Mailersend::Email.new
|
|
158
158
|
|
159
159
|
# Add parameters
|
160
160
|
ms_email.add_recipients("email" => "ron@parksandrec.com", "name" => "Ron")
|
161
|
-
ms_email.add_recipients("email" => "leslie@parksandrec.com", "name" => "Leslie")
|
162
161
|
ms_email.add_from("email" => "april@parksandrec.com", "name" => "April")
|
163
|
-
ms_email.add_subject("Time")
|
164
|
-
ms_email.add_text("Time is money, money is power, power is pizza, and pizza is knowledge. Let's go.")
|
165
|
-
ms_email.add_html("<b>Time is money, money is power, power is pizza, and pizza is knowledge. Let's go.</b>")
|
162
|
+
ms_email.add_subject("Time {{ test }}")
|
163
|
+
ms_email.add_text("{{ test }}Time is money, money is power, power is pizza, and pizza is knowledge. Let's go.")
|
164
|
+
ms_email.add_html("<b>{{ test }}Time is money, money is power, power is pizza, and pizza is knowledge. Let's go.</b>")
|
166
165
|
|
167
166
|
personalization = {
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
"boolean": true,
|
172
|
-
"object": {
|
173
|
-
"key": "object-value"
|
174
|
-
},
|
175
|
-
"number": 2,
|
176
|
-
"array": [
|
177
|
-
1,
|
178
|
-
2,
|
179
|
-
3
|
180
|
-
]
|
167
|
+
email: 'ron@parksandrec.com',
|
168
|
+
data: {
|
169
|
+
test: 'Test Value'
|
181
170
|
}
|
182
171
|
}
|
183
172
|
|
@@ -196,18 +185,17 @@ ms_email = Mailersend::Email.new
|
|
196
185
|
|
197
186
|
# Add parameters
|
198
187
|
ms_email.add_recipients("email" => "ron@parksandrec.com", "name" => "Ron")
|
199
|
-
ms_email.add_recipients("email" => "leslie@parksandrec.com", "name" => "Leslie")
|
200
188
|
ms_email.add_from("email" => "april@parksandrec.com", "name" => "April")
|
201
|
-
ms_email.add_subject("Time")
|
202
|
-
ms_email.add_text("Time is money, money is power, power is pizza, and pizza is knowledge. Let's go.")
|
203
|
-
ms_email.add_html("<b>Time is money, money is power, power is pizza, and pizza is knowledge. Let's go.</b>")
|
189
|
+
ms_email.add_subject("Time {$test}")
|
190
|
+
ms_email.add_text("{$test} Time is money, money is power, power is pizza, and pizza is knowledge. Let's go.")
|
191
|
+
ms_email.add_html("<b>{$test} Time is money, money is power, power is pizza, and pizza is knowledge. Let's go.</b>")
|
204
192
|
|
205
193
|
variables = {
|
206
|
-
|
207
|
-
|
194
|
+
email: 'ron@parksandrec.com',
|
195
|
+
substitutions: [
|
208
196
|
{
|
209
|
-
|
210
|
-
|
197
|
+
var: 'test',
|
198
|
+
value: 'Test Value'
|
211
199
|
}
|
212
200
|
]
|
213
201
|
}
|
@@ -261,7 +249,7 @@ ms_activity.get(domain_id: "xxx2241ll", page: 3, limit: 5, date_from: 1620643567
|
|
261
249
|
require "mailersend-ruby"
|
262
250
|
|
263
251
|
ms_analytics = Mailersend::Analytics.new
|
264
|
-
ms_analytics.date(date_from: 1620643567, date_to: 1623321967, events: %w[sent queued])
|
252
|
+
ms_analytics.date(date_from: 1620643567, date_to: 1623321967, events: %w[sent queued])
|
265
253
|
```
|
266
254
|
|
267
255
|
### Opens by country
|
@@ -308,7 +296,7 @@ ms_domains.list
|
|
308
296
|
require "mailersend-ruby"
|
309
297
|
|
310
298
|
ms_domains = Mailersend::Domains.new
|
311
|
-
ms_domains.
|
299
|
+
ms_domains.single(domain_id: "idofdomain12412")
|
312
300
|
```
|
313
301
|
|
314
302
|
### Delete a domain
|
@@ -393,7 +381,7 @@ ms_webhooks.list(domain_id: "xxx2241ll")
|
|
393
381
|
require "mailersend-ruby"
|
394
382
|
|
395
383
|
ms_webhooks = Mailersend::Webhooks.new
|
396
|
-
ms_webhooks.
|
384
|
+
ms_webhooks.single(webhook_id: "zzz2241ll")
|
397
385
|
```
|
398
386
|
|
399
387
|
### Create a webhook
|
@@ -424,4 +412,4 @@ The official documentation is at [https://developers.mailersend.com](https://dev
|
|
424
412
|
|
425
413
|
# License
|
426
414
|
|
427
|
-
[The MIT License (MIT)](LICENSE)
|
415
|
+
[The MIT License (MIT)](LICENSE)
|
@@ -27,7 +27,7 @@ module Mailersend
|
|
27
27
|
date_to: date_to
|
28
28
|
}
|
29
29
|
|
30
|
-
response = client.http.get(URI::HTTPS.build(host: API_BASE_HOST, path: "/v1/
|
30
|
+
response = client.http.get(URI::HTTPS.build(host: API_BASE_HOST, path: "/v1/activity/#{domain_id}",
|
31
31
|
query: URI.encode_www_form(hash.compact)))
|
32
32
|
puts response
|
33
33
|
end
|
@@ -9,7 +9,7 @@ module Mailersend
|
|
9
9
|
:limit,
|
10
10
|
:verified
|
11
11
|
|
12
|
-
def initialize(client = Mailersend.
|
12
|
+
def initialize(client = Mailersend::Client.new)
|
13
13
|
@client = client
|
14
14
|
@domain_id = domain_id
|
15
15
|
@page = page
|
@@ -17,7 +17,18 @@ module Mailersend
|
|
17
17
|
@verified = verified
|
18
18
|
end
|
19
19
|
|
20
|
-
def list
|
20
|
+
def list(page: nil, limit: nil, verified: nil)
|
21
|
+
hash = {
|
22
|
+
"page" => page,
|
23
|
+
"limit" => limit,
|
24
|
+
"verified" => verified
|
25
|
+
}
|
26
|
+
response = client.http.get(URI::HTTPS.build(host: API_BASE_HOST, path: "/v1/domains",
|
27
|
+
query: URI.encode_www_form(hash.compact)))
|
28
|
+
puts response
|
29
|
+
end
|
30
|
+
|
31
|
+
def single(domain_id:, page: nil, limit: nil, verified: nil)
|
21
32
|
hash = {
|
22
33
|
"page" => page,
|
23
34
|
"limit" => limit,
|
data/lib/mailersend/version.rb
CHANGED
data/mailersend-ruby.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.email = ["info@mailersend.com"]
|
12
12
|
|
13
13
|
spec.summary = "MailerSend's official Ruby SDK"
|
14
|
-
spec.description = "MailerSend's official Ruby SDK. Interacts
|
14
|
+
spec.description = "MailerSend's official Ruby SDK. Interacts with all endpoints at MailerSend API."
|
15
15
|
spec.homepage = "https://www.mailersend.com"
|
16
16
|
spec.license = "MIT"
|
17
17
|
spec.required_ruby_version = ">= 2.5.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailersend-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikola Milojević
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06-
|
11
|
+
date: 2021-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -108,7 +108,7 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 0.10.1
|
111
|
-
description: MailerSend's official Ruby SDK. Interacts
|
111
|
+
description: MailerSend's official Ruby SDK. Interacts with all endpoints at MailerSend
|
112
112
|
API.
|
113
113
|
email:
|
114
114
|
- info@mailersend.com
|