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

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

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



29
30
31
# File 'lib/bwapi/client/user/notifications.rb', line 29

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



12
13
14
# File 'lib/bwapi/client/user/notifications.rb', line 12

def notifications opts={}
  get "user/notifications", opts
end

#update_notification(opts) ⇒ Hashie::Mash

Update users existing notifications

Parameters:

  • opts (Hash)

    options Hash of parameters

Options Hash (opts):

  • list (Array)

    User notifications to be edited

Returns:

  • (Hashie::Mash)

    Updated user notifications



21
22
23
# File 'lib/bwapi/client/user/notifications.rb', line 21

def update_notification opts
  put "user/notifications", opts
end