Module: BacklogKit::Client::Notification

Included in:
BacklogKit::Client
Defined in:
lib/backlog_kit/client/notification.rb

Overview

Methods for the Notification API

Instance Method Summary collapse

Instance Method Details

#get_notification_count(params = {}) ⇒ BacklogKit::Response

Get number of own notifications

Parameters:

  • params (Hash) (defaults to: {})

    Request parameters

Returns:



19
20
21
# File 'lib/backlog_kit/client/notification.rb', line 19

def get_notification_count(params = {})
  get('notifications/count', params)
end

#get_notifications(params = {}) ⇒ BacklogKit::Response

Get list of own notifications

Parameters:

  • params (Hash) (defaults to: {})

    Request parameters

Returns:



11
12
13
# File 'lib/backlog_kit/client/notification.rb', line 11

def get_notifications(params = {})
  get('notifications', params)
end

#mark_as_read_notification(notification_id) ⇒ BacklogKit::Response

Mark a notification as read

Parameters:

  • notification_id (Integer, String)

    Notification id

Returns:



34
35
36
# File 'lib/backlog_kit/client/notification.rb', line 34

def mark_as_read_notification(notification_id)
  post("notifications/#{notification_id}/markAsRead")
end

#reset_unread_notification_countBacklogKit::Response

Reset unread notification count

Returns:



26
27
28
# File 'lib/backlog_kit/client/notification.rb', line 26

def reset_unread_notification_count
  post('notifications/markAsRead')
end