Module: Mastodon::REST::Notifications
Instance Method Summary collapse
-
#clear_notifications ⇒ Object
Clear all notifications.
-
#dismiss_notification(id) ⇒ Object
Dismiss a notification.
-
#notifications(options = {}) ⇒ Mastodon::Collection<Mastodon::Notification>
Get a list of notifications for the authenticated user.
Methods included from Utils
#array_param, #perform_request, #perform_request_with_collection, #perform_request_with_object
Instance Method Details
#clear_notifications ⇒ Object
Clear all notifications
29 30 31 |
# File 'lib/mastodon/rest/notifications.rb', line 29 def clear_notifications perform_request(:post, '/api/v1/notifications/clear') end |
#dismiss_notification(id) ⇒ Object
Dismiss a notification
24 25 26 |
# File 'lib/mastodon/rest/notifications.rb', line 24 def dismiss_notification(id) perform_request(:post, "/api/v1/notifications/#{id}/dismiss") end |
#notifications(options = {}) ⇒ Mastodon::Collection<Mastodon::Notification>
Get a list of notifications for the authenticated user
17 18 19 20 |
# File 'lib/mastodon/rest/notifications.rb', line 17 def notifications( = {}) [:'exclude_types[]'] = .delete(:exclude_types) if .key?(:exclude_types) perform_request_with_collection(:get, '/api/v1/notifications', , Mastodon::Notification) end |