enveloop 0.1.2 → 0.1.3
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/CHANGELOG.md +5 -1
- data/Gemfile.lock +1 -1
- data/README.md +6 -6
- data/lib/enveloop/client.rb +2 -2
- data/lib/enveloop/version.rb +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: 0c04cdee8d0a0fc537a9270f9bbb29417eae1bb2c70edd2b6a9d9b985c50f91c
|
|
4
|
+
data.tar.gz: 730ad713a4258f0f418ed383006073f9a98e861258abd198b7c60ef5d15f5530
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 80fe49dc8664b0317b9a7f6f81b603abcedbe38f89b3f8c444bc0cd73536ba06cc9740a02aa23b3e5b70c74af6dc3dc910c0d7a156f1f75841048f41eef90d24
|
|
7
|
+
data.tar.gz: db4ead56d96c4567ab983c99c34a65a7d659aff8b71ed8889631669e9a83e6372385fc93c43987dbb99345da415f608d0f20f3574c5705e2442a7ed4ac2d27e6
|
data/CHANGELOG.md
CHANGED
|
@@ -11,4 +11,8 @@
|
|
|
11
11
|
|
|
12
12
|
> ## Version 0.1.2
|
|
13
13
|
|
|
14
|
-
* add `template_info` to fetch the template body and see waht variables are defined on a template
|
|
14
|
+
* add `template_info` to fetch the template body and see waht variables are defined on a template
|
|
15
|
+
|
|
16
|
+
> ## Version 0.1.3
|
|
17
|
+
|
|
18
|
+
* change `user_variables` to `template_variables` in API call
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -20,19 +20,23 @@ Or install it yourself as:
|
|
|
20
20
|
|
|
21
21
|
## Usage
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Setup the client connection:
|
|
24
24
|
|
|
25
25
|
```ruby
|
|
26
26
|
require 'enveloop'
|
|
27
27
|
|
|
28
28
|
enveloop = Enveloop::Client.new(api_key: ENV['ENVELOOP_API_TOKEN'])
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Send a message:
|
|
29
32
|
|
|
33
|
+
```ruby
|
|
30
34
|
enveloop.send_message(
|
|
31
35
|
template: 'welcome-email',
|
|
32
36
|
to: 'user@email.com',
|
|
33
37
|
from: 'welcome@myapp.com',
|
|
34
38
|
subject: 'Welcome to MyApp',
|
|
35
|
-
|
|
39
|
+
template_variables: {
|
|
36
40
|
first_name: 'John',
|
|
37
41
|
}
|
|
38
42
|
)
|
|
@@ -41,10 +45,6 @@ enveloop.send_message(
|
|
|
41
45
|
Get information about a template (variables and body html):
|
|
42
46
|
|
|
43
47
|
```ruby
|
|
44
|
-
require 'enveloop'
|
|
45
|
-
|
|
46
|
-
enveloop = Enveloop::Client.new(api_key: ENV['ENVELOOP_API_TOKEN'])
|
|
47
|
-
|
|
48
48
|
enveloop.template_info(template: 'welcome-email')
|
|
49
49
|
```
|
|
50
50
|
|
data/lib/enveloop/client.rb
CHANGED
|
@@ -5,12 +5,12 @@ module Enveloop
|
|
|
5
5
|
@api_key = api_key
|
|
6
6
|
end
|
|
7
7
|
|
|
8
|
-
def send_message(template:, to:, from:, subject:,
|
|
8
|
+
def send_message(template:, to:, from:, subject:, template_variables: {})
|
|
9
9
|
data = {
|
|
10
10
|
to: to,
|
|
11
11
|
from: from,
|
|
12
12
|
subject: subject,
|
|
13
|
-
|
|
13
|
+
templateVariables: template_variables
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
conn = Faraday.new(
|
data/lib/enveloop/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: enveloop
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ben Wyrosdick
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-10-
|
|
11
|
+
date: 2022-10-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
70
70
|
- !ruby/object:Gem::Version
|
|
71
71
|
version: '0'
|
|
72
72
|
requirements: []
|
|
73
|
-
rubygems_version: 3.1.
|
|
73
|
+
rubygems_version: 3.1.4
|
|
74
74
|
signing_key:
|
|
75
75
|
specification_version: 4
|
|
76
76
|
summary: Envelope API wrapper
|