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)
-
- (Object) mark_notification_read(notification_id)
Mark a notification as read.
-
- (Object) mark_notification_unread(notification_id)
Mark a notification as unread.
-
- (Tacokit::Resource) notification(notification_id, options = nil)
Retrieve a notification.
-
- (Object) update_notification(notification_id, options = {})
Update read/unread status of notification.
Instance Method Details
- (Object) mark_notification_read(notification_id)
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 |
- (Object) mark_notification_unread(notification_id)
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 |
- (Tacokit::Resource) notification(notification_id, options = nil)
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 |
- (Object) update_notification(notification_id, options = {})
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 |