Files
discoursejs/docs/sdks/notifications

Notifications

(notifications)

Available Operations

getNotifications

Get the notifications that belong to the current user

Example Usage

import { SDK } from "openapi";

async function run() {
  const sdk = new SDK();

  const res = await sdk.notifications.getNotifications();

  if (res.statusCode == 200) {
    // handle response
  }
}

run();

Parameters

Parameter Type Required Description
config AxiosRequestConfig Available config options for making requests.

Response

Promise<operations.GetNotificationsResponse>

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /

markNotificationsAsRead

Mark notifications as read

Example Usage

import { SDK } from "openapi";

async function run() {
  const sdk = new SDK();

  const res = await sdk.notifications.markNotificationsAsRead({});

  if (res.statusCode == 200) {
    // handle response
  }
}

run();

Parameters

Parameter Type Required Description
request operations.MarkNotificationsAsReadRequestBody ✔️ The request object to use for the request.
config AxiosRequestConfig Available config options for making requests.

Response

Promise<operations.MarkNotificationsAsReadResponse>

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /