Skip to content

Latest commit

 

History

History
94 lines (63 loc) · 6.03 KB

README.md

File metadata and controls

94 lines (63 loc) · 6.03 KB

Notifications

(notifications)

Overview

Available Operations

list

Get notifications

Example Usage

from novu_py import Novu
import os

with Novu(
    secret_key=os.getenv("NOVU_SECRET_KEY", ""),
) as novu:

    res = novu.notifications.list(request={})

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
request models.NotificationsControllerListNotificationsRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.NotificationsControllerListNotificationsResponse

Errors

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

retrieve

Get notification

Example Usage

from novu_py import Novu
import os

with Novu(
    secret_key=os.getenv("NOVU_SECRET_KEY", ""),
) as novu:

    res = novu.notifications.retrieve(notification_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
notification_id str ✔️ N/A
idempotency_key Optional[str] A header for idempotency purposes
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.NotificationsControllerGetNotificationResponse

Errors

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