module Mastodon::REST::Notifications
Public Instance Methods
clear_notifications()
click to toggle source
Clear all notifications
# File lib/mastodon/rest/notifications.rb, line 29 def clear_notifications perform_request(:post, '/api/v1/notifications/clear') end
dismiss_notification(id)
click to toggle source
Dismiss a notification @param id [Integer]
# File lib/mastodon/rest/notifications.rb, line 24 def dismiss_notification(id) perform_request(:post, "/api/v1/notifications/#{id}/dismiss") end
notifications(options = {})
click to toggle source
Get a list of notifications for the authenticated user @param options [Hash] @option options :max_id [Integer] @option options :since_id [Integer] @option options :min_id [Integer] @option options :limit [Integer] @option options :exclude_types [Array<String>] @return [Mastodon::Collection<Mastodon::Notification>]
# File lib/mastodon/rest/notifications.rb, line 17 def notifications(options = {}) options[:'exclude_types[]'] = options.delete(:exclude_types) if options.key?(:exclude_types) perform_request_with_collection(:get, '/api/v1/notifications', options, Mastodon::Notification) end