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: 6e077cbab9516c5f39de74e8d751cb7f4c02535d20e607c7a1f114b4871d4162
4
- data.tar.gz: 2178667f6c4a195fabc1b18088de577890b44318b0503d8ab22ac99b03fdccaf
3
+ metadata.gz: 2ccd683f0bcd9d88443ef5d1ff1ccf869df5c2fe0f5ea1ab79f9338bc09a6d81
4
+ data.tar.gz: '0056372079d706665429081e7f9df9d6570d1f8b72a6e2287c88d839960e9be0'
5
5
  SHA512:
6
- metadata.gz: 9115a61e4752213c1a8fa196bfeec81dfbd0238f9f6726f7aa8d6b8298150883388fed947938bf7208b503c5828dce30d0976b27d2b607bd0fad3e6a2018d365
7
- data.tar.gz: 412d96624b8c875f2ebbf422d6891d444ea933ed891ad8fe51bd39dfead821599a87f5a5bcd0bb18f8e63cb7cc68be2638fc6bda085eec1b6a325dbed3c20625
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
- ## Developer Hub
237
+ ## API docs
238
238
 
239
- Please visit our [Developer Hub](https://developer.magicbell.io) for documentation on MagicBell's API and MagicBell's embeddable Notification Inbox
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.empty?
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
@@ -1,5 +1,5 @@
1
1
  module MagicBell
2
- class UserNotificationRead < SingletonApiResource
2
+ class UserNotificationUnread < SingletonApiResource
3
3
  attr_reader :user_notification
4
4
 
5
5
  def initialize(client, attributes)
@@ -1,3 +1,3 @@
1
1
  module MagicBell
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
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.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hana Mohan