Skip to Content
defold-typescript libraries
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
    1. Pick a release from megalanthus/defold-gamepush 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 core_documents from "gamepush.core.documents"

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.

On this page