megalanthusdefold-gamepush
megalanthus/defold-gamepush/gamepush.core.documents
GamePush documents: open and fetch the privacy policy, with their events.
- GitHub: megalanthus/defold-gamepush — pinned to
v1.4.1- Pick a release from megalanthus/defold-gamepush 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 core_documents from "gamepush.core.documents"
- Pick a release from megalanthus/defold-gamepush releases and add its Source code (zip) URL (or a packaged
Functions
open(parameters: Record<string, unknown>)
Opens the privacy policy. Raises when the table is missing.
Parameters
parameters:Record<string, unknown>— The document, for example{ type: "PLAYER_PRIVACY_POLICY" }.
fetch(parameters: Record<string, unknown>, callback?: (document: unknown) => void)
Fetches the privacy policy. Raises when the table is missing.
Parameters
parameters:Record<string, unknown>— The document and its format, for example{ type: "PLAYER_PRIVACY_POLICY", format: "TXT" }.callback?:(document: unknown) => void— Receives the document.
Variables
callbacks: DocumentsCallbacks
The event handlers.
Types
DocumentsCallbacks
DocumentsCallbacks.open?: () => void
The privacy policy opened.
DocumentsCallbacks.close?: () => void
The privacy policy closed.
DocumentsCallbacks.fetch?: (document: unknown) => void
The privacy policy was fetched.
DocumentsCallbacks.error_fetch?: (error: unknown) => void
Fetching the privacy policy failed.