Skip to content

Latest commit

 

History

History
113 lines (76 loc) · 5.28 KB

README.md

File metadata and controls

113 lines (76 loc) · 5.28 KB

Notifications

(notifications)

Overview

Available Operations

  • get - Get notification
  • list - Get notifications

get

Get notification

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use novu;

$sdk = novu\Novu::builder()
    ->setSecurity(
        '<YOUR_API_KEY_HERE>'
    )
    ->build();



$response = $sdk->notifications->get(
    notificationId: '<id>',
    idempotencyKey: '<value>'

);

if ($response->activityNotificationResponseDto !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
notificationId string ✔️ N/A
idempotencyKey ?string A header for idempotency purposes

Response

?Operations\NotificationsControllerGetNotificationResponse

Errors

Error Type Status Code Content Type
Errors\ErrorDto 414 application/json
Errors\ErrorDto 400, 401, 403, 404, 405, 409, 413, 415 application/json
Errors\ValidationErrorDto 422 application/json
Errors\ErrorDto 500 application/json
Errors\APIException 4XX, 5XX */*

list

Get notifications

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use novu;
use novu\Models\Operations;

$sdk = novu\Novu::builder()
    ->setSecurity(
        '<YOUR_API_KEY_HERE>'
    )
    ->build();

$request = new Operations\NotificationsControllerListNotificationsRequest();

$response = $sdk->notifications->list(
    request: $request
);

if ($response->activitiesResponseDto !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\NotificationsControllerListNotificationsRequest ✔️ The request object to use for the request.

Response

?Operations\NotificationsControllerListNotificationsResponse

Errors

Error Type Status Code Content Type
Errors\ErrorDto 414 application/json
Errors\ErrorDto 400, 401, 403, 404, 405, 409, 413, 415 application/json
Errors\ValidationErrorDto 422 application/json
Errors\ErrorDto 500 application/json
Errors\APIException 4XX, 5XX */*