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:



17
18
19
# File 'lib/backlog_kit/client/notification.rb', line 17

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:



9
10
11
# File 'lib/backlog_kit/client/notification.rb', line 9

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:



32
33
34
# File 'lib/backlog_kit/client/notification.rb', line 32

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

#reset_unread_notification_countBacklogKit::Response

Reset unread notification count

Returns:



24
25
26
# File 'lib/backlog_kit/client/notification.rb', line 24

def reset_unread_notification_count
  post('notifications/markAsRead')
end