lib/backlog_kit/client/notification.rb in backlog_kit-0.12.1 vs lib/backlog_kit/client/notification.rb in backlog_kit-0.13.0
- old
+ new
@@ -1,19 +1,37 @@
module BacklogKit
class Client
+
+ # Methods for the Notification API
module Notification
+
+ # Get list of own notifications
+ #
+ # @param params [Hash] Request parameters
+ # @return [BacklogKit::Response] List of notifications
def get_notifications(params = {})
get('notifications', params)
end
+ # Get number of own notifications
+ #
+ # @param params [Hash] Request parameters
+ # @return [BacklogKit::Response] Number of notifications
def get_notification_count(params = {})
get('notifications/count', params)
end
- def reset_already_read_notification_count
+ # Reset unread notification count
+ #
+ # @return [BacklogKit::Response] Number of notifications
+ def reset_unread_notification_count
post('notifications/markAsRead')
end
+ # Mark a notification as read
+ #
+ # @param notification_id [Integer, String] Notification id
+ # @return [BacklogKit::Response] No content response
def mark_as_read_notification(notification_id)
post("notifications/#{notification_id}/markAsRead")
end
end
end