magicbell 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +27 -9
- data/lib/magicbell/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69633fc70e1039d8b54eb3d6a0fbb2639975f881434195d1afae767d478cc0b2
|
4
|
+
data.tar.gz: c6f10dc4a264bb5bf25ece9381a008618ff3e52a7f52cc7b2b7a0f6b9921f39a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93536189c55d619230780a13d51f835bfb17cee46b7e5b1e8e62b06b88a73e74017fb0febb6e3e727dc1ddbc08b72f0d0e9f4cc1f4dbedf384769234eb381323
|
7
|
+
data.tar.gz: 773c2e66fc79342fc91a1954453e4c89ff5f7500515c73565acb00ae6c9cd9f1796aa6e854c8f65e4b9f4c9653198c91c104333bb44f0dc02b6c5eed6aef3a36
|
data/README.md
CHANGED
@@ -1,18 +1,22 @@
|
|
1
1
|
# magicbell-ruby
|
2
2
|
|
3
|
-
[MagicBell](https://magicbell.io) is an embeddable Notification Inbox for web applications.
|
3
|
+
[MagicBell](https://magicbell.io) is an embeddable Notification Inbox for web & mobile applications.
|
4
|
+
|
5
|
+
Please familiarlize yourself with the [core concepts of MagicBell](https://developer.magicbell.io/docs/core-concepts) before using this gem.
|
4
6
|
|
5
7
|
This gem
|
6
8
|
|
7
9
|
1. Makes it easy to interact with [MagicBell's REST API](https://developer.magicbell.io/reference) from Ruby.
|
8
10
|
|
9
11
|
You can use it to create a notification in your MagicBell project etc.
|
10
|
-
3. Can BCC your ActionMailer email notifications to MagicBell if you rather not use MagicBell's API in your Rails application.
|
11
|
-
|
12
|
-
MagicBell will create an in-app notification from any email notification that's blind copied to it.
|
13
|
-
3. Helps you calculate the HMAC for a user's email when you turn on HMAC Authentication for your MagicBell project
|
14
12
|
|
15
|
-
|
13
|
+
2. Can BCC your ActionMailer email notifications to MagicBell if you rather not use MagicBell's API in your Rails application.
|
14
|
+
|
15
|
+
MagicBell will create an in-app notification from any email notification that's blind copied to it.
|
16
|
+
|
17
|
+
3. Helps you calculate the HMAC for a user's email or external_id when you turn on [HMAC Authentication](https://developer.magicbell.io/docs/turn-on-hmac-authentication) for your MagicBell project
|
18
|
+
|
19
|
+
<img width="415" alt="MagicBell Notification Inbox" src="https://files.readme.io/c09b21a-image1.png">
|
16
20
|
|
17
21
|
## Installation
|
18
22
|
|
@@ -51,7 +55,7 @@ This gem makes it easy to interact with MagicBell's REST API https://developer.m
|
|
51
55
|
|
52
56
|
### Create a notification
|
53
57
|
|
54
|
-
Send a notification to one or many users
|
58
|
+
Send a notification to one or many users by identifying them with their email address
|
55
59
|
|
56
60
|
```ruby
|
57
61
|
magicbell = MagicBell::Client.new
|
@@ -65,6 +69,17 @@ magicbell.create_notification(
|
|
65
69
|
)
|
66
70
|
```
|
67
71
|
|
72
|
+
You can also identify users with their `external_id`, which is their ID in your database. That way, if their email address changes, they'd still have access to their notifications. You'll need to make sure you identify them with their `externalID` [in your frontend](https://developer.magicbell.io/docs/browser-js#identifying-users).
|
73
|
+
|
74
|
+
```ruby
|
75
|
+
magicbell.create_notification(
|
76
|
+
title: "Welcome to Muziboo",
|
77
|
+
recipients: [{
|
78
|
+
external_id: "id_in_your_database"
|
79
|
+
}]
|
80
|
+
)
|
81
|
+
```
|
82
|
+
|
68
83
|
You can even provide content for the notification and a URL to redirect the user to when they click on the notification the MagicBell Notification Inbox
|
69
84
|
|
70
85
|
```ruby
|
@@ -162,7 +177,7 @@ class NotificationMailer < ActionMailer::Base
|
|
162
177
|
def new_comment
|
163
178
|
# ...
|
164
179
|
end
|
165
|
-
|
180
|
+
|
166
181
|
# This is another email notification in your app
|
167
182
|
def mentioned
|
168
183
|
# ...
|
@@ -233,7 +248,6 @@ hmac = MagicBell.hmac(user_email)
|
|
233
248
|
|
234
249
|
See https://developer.magicbell.io/docs/turn-on-hmac-authentication for more information on turning on HMAC Authentication for your MagicBell Project
|
235
250
|
|
236
|
-
|
237
251
|
## API docs
|
238
252
|
|
239
253
|
Please visit our website https://magicbell.io and our API docs https://developer.magicbell.io for more information MagicBell's embeddable notification inbox and MagicBell's REST API
|
@@ -241,3 +255,7 @@ Please visit our website https://magicbell.io and our API docs https://developer
|
|
241
255
|
## Contact Us
|
242
256
|
|
243
257
|
Have a query or hit upon a problem? Create a post in our Developer Community https://community.magicbell.io or contact us at hello@magicbell.io
|
258
|
+
|
259
|
+
```
|
260
|
+
|
261
|
+
```
|
data/lib/magicbell/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: magicbell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hana Mohan
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-02-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|