Module: BWAPI::Client::User::Notifications

Included in:
BWAPI::Client::User
Defined in:
lib/bwapi/client/user/notifications.rb

Overview

Notifications module for projects/notifications endpoints

Instance Method Summary collapse

Instance Method Details

#delete_notification(notification_id) ⇒ Hashie::Mash

Delete a users existing notification

Parameters:

  • notification_id (Integer)

    Id of notification

Returns:

  • (Hashie::Mash)

    Deleted user notifications



31
32
33
# File 'lib/bwapi/client/user/notifications.rb', line 31

def delete_notification(notification_id)
  delete "user/notifications/#{notification_id}"
end

#notifications(opts = {}) ⇒ Hashie::Mash

Get the current user notifications

Parameters:

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

    options hash of parameters

Options Hash (opts):

  • page (Integer)

    Page of projects to retrieve

  • pageSize (Integer)

    Results per page of results

Returns:

  • (Hashie::Mash)

    User notifications



14
15
16
# File 'lib/bwapi/client/user/notifications.rb', line 14

def notifications(opts = {})
  get 'user/notifications', opts
end

#update_notification(opts = {}) ⇒ Hashie::Mash

Update users existing notifications

Parameters:

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

    options Hash of parameters

Options Hash (opts):

  • list (Array)

    User notifications to be edited

Returns:

  • (Hashie::Mash)

    Updated user notifications



23
24
25
# File 'lib/bwapi/client/user/notifications.rb', line 23

def update_notification(opts = {})
  put 'user/notifications', opts
end