magicbell 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ccd683f0bcd9d88443ef5d1ff1ccf869df5c2fe0f5ea1ab79f9338bc09a6d81
|
4
|
+
data.tar.gz: '0056372079d706665429081e7f9df9d6570d1f8b72a6e2287c88d839960e9be0'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6204b83549f58e878e8f93af5d5aeb77606f70e1f62bbf9be31c07d6b54728fa3af4b096615990ce62b09307cc292b42e612f5dc57a5f1989160cbe9ad3abf2e
|
7
|
+
data.tar.gz: e2799647fc11454b05e2f6c463b08a24fab00838ccebcf3850b6c872b90fc5bf63f9d050fd68809c617bf07858ff1099ba36725086802caec8c7e609f331686e
|
data/README.md
CHANGED
@@ -234,6 +234,10 @@ hmac = MagicBell.hmac(user_email)
|
|
234
234
|
See https://developer.magicbell.io/docs/turn-on-hmac-authentication for more information on turning on HMAC Authentication for your MagicBell Project
|
235
235
|
|
236
236
|
|
237
|
-
##
|
237
|
+
## API docs
|
238
238
|
|
239
|
-
Please visit our
|
239
|
+
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
|
240
|
+
|
241
|
+
## Contact Us
|
242
|
+
|
243
|
+
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
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require "active_support/inflector"
|
2
|
+
require "active_support/core_ext/object/blank"
|
2
3
|
require "json"
|
3
4
|
|
4
5
|
module MagicBell
|
@@ -8,6 +9,12 @@ module MagicBell
|
|
8
9
|
new(client, attributes).create
|
9
10
|
end
|
10
11
|
|
12
|
+
def find(client, id)
|
13
|
+
api_resource = new(client, "id" => id)
|
14
|
+
api_resource.retrieve
|
15
|
+
api_resource
|
16
|
+
end
|
17
|
+
|
11
18
|
def name
|
12
19
|
to_s.demodulize.underscore
|
13
20
|
end
|
@@ -109,7 +116,7 @@ module MagicBell
|
|
109
116
|
|
110
117
|
def parse_response(response)
|
111
118
|
@response = response
|
112
|
-
unless response.body.
|
119
|
+
unless response.body.blank?
|
113
120
|
@response_hash = JSON.parse(@response.body)
|
114
121
|
@attributes = @response_hash[name]
|
115
122
|
end
|
@@ -15,6 +15,11 @@ module MagicBell
|
|
15
15
|
MagicBell::UserNotifications.new(client, query_params)
|
16
16
|
end
|
17
17
|
|
18
|
+
def find_notification(notification_id)
|
19
|
+
client = self
|
20
|
+
MagicBell::UserNotification.find(client, notification_id)
|
21
|
+
end
|
22
|
+
|
18
23
|
def mark_all_notifications_as_read
|
19
24
|
client = self
|
20
25
|
MagicBell::UserNotificationsRead.new(client).create
|
data/lib/magicbell/version.rb
CHANGED