Skip to Content
defold-typescript libraries
widgrensitasobi-defold

widgrensit/asobi-defold/asobi.api.notifications

asobi notifications over REST. A project reaches it as client.notifications.

  • GitHub: widgrensit/asobi-defold — pinned to v1.18.1
    1. Pick a release from widgrensit/asobi-defold releases and add its Source code (zip) URL (or a packaged .zip asset, if the library ships one) to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. Run bunx @defold-typescript/cli resolve to materialize its types.
    3. Import it under a namespace alias of your choice:
      import * as api_notifications from "asobi.api.notifications"

Functions

list(client: Client, opts?: NotificationListOptions, callback?: HttpCallback)

Fetches the signed-in player's notifications.

Parameters

  • client: Client — The client.
  • opts?: NotificationListOptions — The filters.
  • callback?: HttpCallback — Receives the notifications, or the error.

mark_read(client: Client, notification_id: string, callback?: HttpCallback)

Marks a notification read.

Parameters

  • client: Client — The client.
  • notification_id: string — The notification's id.
  • callback?: HttpCallback — Receives the server's answer, or the error.

delete(client: Client, notification_id: string, callback?: HttpCallback)

Deletes a notification.

Parameters

  • client: Client — The client.
  • notification_id: string — The notification's id.
  • callback?: HttpCallback — Receives the server's answer, or the error.

Types

NotificationListOptions

NotificationListOptions.read?: boolean

Only read, or only unread, notifications.

NotificationListOptions.limit?: number

The most notifications to return.

On this page