Sha256: fb5c3aa34e5da4881f903558c7f8120c1a0b982c44a616f9a8aa12d1bb3e9e67

Contents?: true

Size: 1.09 KB

Versions: 1

Compression:

Stored size: 1.09 KB

Contents

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

      # 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
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
backlog_kit-0.13.0 lib/backlog_kit/client/notification.rb