GameSnacks Partner SDK
Stay organized with collections
Save and categorize content based on your preferences.
For example, in a JS file:
import {createGameSnacks} from 'https://sdks.gamesnacks.com/partner-v1.js';
// Create GameSnacks Game Center.
const gamesnacks = createGameSnacks('iframe-id', 'my-game-center');
// Register API callbacks.
gamesnacks.game.onReady(...);
gamesnacks.audio.update(...);
// Initialise GameSnacks.
await gamesnacks.init();
Or, in an HTML file:
<script src="https://sdks.gamesnacks.com/partner-v1.js"></script>
<script>
// Create Snacks Game Center.
const gamesnacks = window.createGameSnacks('iframe-id', 'my-game-center');
// Register API callbacks.
gamesnacks.game.onReady(...);
gamesnacks.audio.update(...);
// Initialise GameSnacks.
await gamesnacks.init();
</script>
Interfaces
Name |
Description |
Audio |
Audio controls and events. |
Game |
Game lifecycle events. |
GameSnacks |
GameSnacks partner SDK. |
Page |
Page lifecycle events. |
Score |
Score controls and events. |
Storage |
Storage controls and events. |
UserActivity |
User activity events. |
Functions
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-03 UTC."],[[["GameSnacks Partner SDK enables integration of GameSnacks Game Center into webpages using JavaScript or HTML."],["Developers can utilize the SDK to manage game lifecycle, audio, score, storage, user activity, and page events through various interfaces like `Game`, `Audio`, `Score`, and more."],["The `createGameSnacks` function initiates an embedded GameSnacks Game Center within a specified iframe."],["Initialization of GameSnacks and registration of API callbacks are essential steps for successful integration."]]],[]]