Sha256: 00332dbf2a7ebd9b9d72e1a74d639e2c20e33109f57407338accd1716a465452

Contents?: true

Size: 1.09 KB

Versions: 6

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

6 entries across 6 versions & 1 rubygems

Version Path
backlog_kit-0.19.0 lib/backlog_kit/client/notification.rb
backlog_kit-0.18.0 lib/backlog_kit/client/notification.rb
backlog_kit-0.17.0 lib/backlog_kit/client/notification.rb
backlog_kit-0.16.0 lib/backlog_kit/client/notification.rb
backlog_kit-0.15.0 lib/backlog_kit/client/notification.rb
backlog_kit-0.14.0 lib/backlog_kit/client/notification.rb