Module: Tacokit::Client::Notifications
- Included in:
- Tacokit::Client
- Defined in:
- lib/tacokit/client/notifications.rb
Overview
Methods for the Notifications API
Instance Method Summary collapse
-
#mark_notification_read(notification_id) ⇒ Object
Mark a notification as read.
-
#mark_notification_unread(notification_id) ⇒ Object
Mark a notification as unread.
-
#notification(notification_id, options = nil) ⇒ Tacokit::Resource
Retrieve a notification.
-
#update_notification(notification_id, options = {}) ⇒ Object
Update read/unread status of notification.
Instance Method Details
#mark_notification_read(notification_id) ⇒ Object
Mark a notification as read
31 32 33 |
# File 'lib/tacokit/client/notifications.rb', line 31 def mark_notification_read(notification_id) update_notification notification_id, unread: false end |
#mark_notification_unread(notification_id) ⇒ Object
Mark a notification as unread
22 23 24 |
# File 'lib/tacokit/client/notifications.rb', line 22 def mark_notification_unread(notification_id) update_notification notification_id, unread: true end |
#notification(notification_id, options = nil) ⇒ Tacokit::Resource
Retrieve a notification
13 14 15 |
# File 'lib/tacokit/client/notifications.rb', line 13 def notification(notification_id, = nil) get notification_path(notification_id), end |
#update_notification(notification_id, options = {}) ⇒ Object
Update read/unread status of notification
41 42 43 |
# File 'lib/tacokit/client/notifications.rb', line 41 def update_notification(notification_id, = {}) put notification_path(notification_id), end |