Module: Novu::Api::NotificationGroups

Included in:
Client
Defined in:
lib/novu/api/notification_groups.rb

Overview

Module Novu::Api::NotificationGroups provides an API for managing notification groups in the Novu application.

This module includes methods for creating, retrieving notification groups.

For more information on the Novu API(api.novu.co/api#/Notification%20groups), see docs.novu.co/api/create-notification-group/.

Instance Method Summary collapse

Instance Method Details

#create_notification_group(body) ⇒ Hash, number

Creates a notification group.

@bodyparams:

Parameters:

  • `name` (String)

    User defined custom name and provided by the user that will name the notification group created.

Returns:

  • (Hash)

    The created notification group entity.

  • (number)

    status - The status code. Returns 201 if the notification group has been successfully created.



18
19
20
# File 'lib/novu/api/notification_groups.rb', line 18

def create_notification_group(body)
  post("/notification-groups", body: body)
end

#notification_groupsHash, number

Returns a list of notification groups

Returns:

  • (Hash)

    list of notification groups.

  • (number)

    status

    • Returns 200 if successful



27
28
29
# File 'lib/novu/api/notification_groups.rb', line 27

def notification_groups
  get("/notification-groups")
end