magicbell 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +27 -9
  3. data/lib/magicbell/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ccd683f0bcd9d88443ef5d1ff1ccf869df5c2fe0f5ea1ab79f9338bc09a6d81
4
- data.tar.gz: '0056372079d706665429081e7f9df9d6570d1f8b72a6e2287c88d839960e9be0'
3
+ metadata.gz: 69633fc70e1039d8b54eb3d6a0fbb2639975f881434195d1afae767d478cc0b2
4
+ data.tar.gz: c6f10dc4a264bb5bf25ece9381a008618ff3e52a7f52cc7b2b7a0f6b9921f39a
5
5
  SHA512:
6
- metadata.gz: 6204b83549f58e878e8f93af5d5aeb77606f70e1f62bbf9be31c07d6b54728fa3af4b096615990ce62b09307cc292b42e612f5dc57a5f1989160cbe9ad3abf2e
7
- data.tar.gz: e2799647fc11454b05e2f6c463b08a24fab00838ccebcf3850b6c872b90fc5bf63f9d050fd68809c617bf07858ff1099ba36725086802caec8c7e609f331686e
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
- <img width="415" alt="MagicBell Notification Inbox" src="https://user-images.githubusercontent.com/1789832/28327736-f3503f44-6c01-11e7-9a72-c15023db18c6.png">
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
+ ```
@@ -1,3 +1,3 @@
1
1
  module MagicBell
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
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.1
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: 2020-12-03 00:00:00.000000000 Z
12
+ date: 2021-02-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty