kannon.js 0.2.0-beta1 → 0.2.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.
Files changed (2) hide show
  1. package/README.md +32 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,32 @@
1
+ ## kannon.js is the official node client library for Kannon Email Sender
2
+
3
+ #### Usage
4
+
5
+ Instantiate kannon cli
6
+
7
+ ```ts
8
+ const kannon = new KannonCli(
9
+ '<YOUR DONMAIN>',
10
+ '<API KEY>',
11
+ {
12
+ email: 'sender@kannon.dev',
13
+ alias: 'Kannon',
14
+ },
15
+ {
16
+ host: '<YOU KANNON API HOST>',
17
+ },
18
+ );
19
+ ```
20
+
21
+ Usage
22
+
23
+ ```ts
24
+ async function sendEmail(html: string) {
25
+ return await kannon.sendMail(
26
+ [{ email: 'test@email.com', fields: {} }],
27
+ 'This is an email kannon.js',
28
+ 'email html',
29
+ new Date(), // <- This can be used to chedule email, default now
30
+ );
31
+ }
32
+ ```
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "https://github.com/kannon-email/kannon.js"
7
7
  },
8
- "version": "0.2.0-beta1",
8
+ "version": "0.2.0",
9
9
  "description": "Kannon node client libreary",
10
10
  "main": "lib/kannon.js",
11
11
  "types": "lib/kannon.d.ts",