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- Pick a release from widgrensit/asobi-defold releases and add its Source code (zip) URL (or a packaged
.zipasset, if the library ships one) togame.projectunder[project]dependencies, then Fetch Libraries in the Defold editor. - Run
bunx @defold-typescript/cli resolveto materialize its types. - Import it under a namespace alias of your choice:
import * as api_notifications from "asobi.api.notifications"
- Pick a release from widgrensit/asobi-defold releases and add its Source code (zip) URL (or a packaged
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.