@fyno/node 1.1.1 → 1.1.2
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.
- package/.github/workflows/npm-publish.yml +1 -1
- package/README.md +43 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,3 +55,46 @@ fyno.fire("<EventName>", {
|
|
|
55
55
|
},
|
|
56
56
|
})
|
|
57
57
|
```
|
|
58
|
+
|
|
59
|
+
The snippet above lets you fire notifications to a single user. If you wish to fire notifications to multiple users, see the code snippet below.
|
|
60
|
+
|
|
61
|
+
# Sending Bulk Notifications
|
|
62
|
+
To fire an event to multiple users, use the following code snippet:
|
|
63
|
+
|
|
64
|
+
``` js
|
|
65
|
+
fyno.fire("<EventName>", [
|
|
66
|
+
{
|
|
67
|
+
to: {
|
|
68
|
+
// User 1 details
|
|
69
|
+
sms: "", // Enter number with country code
|
|
70
|
+
whatsapp: "", // Enter WhatsApp number with country code
|
|
71
|
+
email: "", // Enter email address
|
|
72
|
+
slack: "", // Enter slack ID or email address
|
|
73
|
+
discord: "", // Enter discord ID
|
|
74
|
+
teams: "", // Enter channel name
|
|
75
|
+
push: "", // Enter push token
|
|
76
|
+
},
|
|
77
|
+
data: {
|
|
78
|
+
// Enter data here
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
to: {
|
|
83
|
+
// User 2 details
|
|
84
|
+
sms: "", // Enter number with country code
|
|
85
|
+
whatsapp: "", // Enter WhatsApp number with country code
|
|
86
|
+
email: "", // Enter email address
|
|
87
|
+
slack: "", // Enter slack ID or email address
|
|
88
|
+
discord: "", // Enter discord ID
|
|
89
|
+
teams: "", // Enter channel name
|
|
90
|
+
push: "", // Enter push token
|
|
91
|
+
},
|
|
92
|
+
data: {
|
|
93
|
+
// Enter data here
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
]);
|
|
97
|
+
```
|
|
98
|
+
**Caution:** The maximum accepted payload size (for bulk send) is 10 MB.
|
|
99
|
+
|
|
100
|
+
For more details, please visit our [API Reference guide](https://docs.fyno.io/reference).
|