### Initialize and Get Platform Info - JavaScript Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Automatically initializes the SDK on game start. Provides functions to check initialization status, retrieve the current platform ID, language, payload, and top-level domain. ```javascript // Check if SDK is initialized // Condition: Is Initialized // Returns true when Playgama Bridge is ready // Get current platform information // Expression: PlaygamaBridge::PlatformId() // Returns: "playgama", "crazy_games", "yandex", "vk", "telegram", etc. // Expression: PlaygamaBridge::PlatformLanguage() // Returns: "en", "ru", "es", etc. // Expression: PlaygamaBridge::PlatformPayload() // Returns platform-specific payload data // Expression: PlaygamaBridge::PlatformTld() // Returns top-level domain: "com", "ru", etc. ``` -------------------------------- ### Server Time API Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Get synchronized server time for time-based game mechanics. ```APIDOC ## Server Time API ### Description Get synchronized server time for time-based game mechanics. ### Method Action & Expression ### Endpoint Get Server Time, PlaygamaBridge::ServerTime() ### Parameters None ### Request Example None ### Response #### Success Response (200) - **serverTime** (integer) - Unix timestamp in milliseconds. #### Response Example 1678886400000 ### Description Triggers an event when the server time has been successfully retrieved. ### Method Event ### Endpoint On Get Server Time Completed ### Parameters None ### Request Example None ### Response None ### Description Checks if the server time is available. ### Method Condition ### Endpoint Has Server Time ### Parameters None ### Request Example None ### Response #### Success Response (200) - **hasServerTime** (boolean) - True if server time is available, false otherwise. #### Response Example True ### Description Checks if the last server time action was completed successfully. ### Method Condition ### Endpoint Is Last Action Completed Successfully ### Parameters None ### Request Example None ### Response #### Success Response (200) - **actionCompleted** (boolean) - True if the last action was successful, false otherwise. #### Response Example True ``` -------------------------------- ### Initialization API Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Information on how the SDK initializes automatically and how to check its status and retrieve platform-specific details. ```APIDOC ## Initialization The SDK initializes automatically when the game starts. You can check if initialization is complete and detect the current platform. ### Conditions - **Is Initialized** (boolean) - Returns true when Playgama Bridge is ready. ### Expressions - **PlaygamaBridge::PlatformId()** (string) - Returns the current platform ID (e.g., "playgama", "crazy_games", "yandex"). - **PlaygamaBridge::PlatformLanguage()** (string) - Returns the current platform language (e.g., "en", "ru", "es"). - **PlaygamaBridge::PlatformPayload()** (any) - Returns platform-specific payload data. - **PlaygamaBridge::PlatformTld()** (string) - Returns the top-level domain of the platform (e.g., "com", "ru"). ``` -------------------------------- ### Manage Platform Storage Data in GDevelop Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Demonstrates how to save, load, and delete key-value pairs using platform-native storage. Includes checks for storage availability and retrieval of recommended storage types. ```GDevelop Events // Saving Data Append Parameter "playerLevel" : "15" to Storage Data Set Request Append Parameter "highScore" : "5000" to Storage Data Set Request Send Storage Data Set Request "platform" // Loading Data Append Parameter "playerLevel" to Storage Data Get Request Send Storage Data Get Request "platform" // Expressions PlaygamaBridge::StorageData("playerLevel") PlaygamaBridge::StorageDataAsJSON("inventory") PlaygamaBridge::DefaultStorageType() ``` -------------------------------- ### Manage Remote Configuration with Playgama Bridge Source: https://context7.com/playgama/bridge-gdevelop/llms.txt This snippet demonstrates how to fetch remote configuration values, check for the existence of a specific value, and retrieve configuration values for A/B testing and dynamic game settings. ```javascript // Check if remote config is supported // Condition: Is Remote Config Supported // Fetch remote configuration // Action: Send Remote Config Get Request // Condition: On Remote Config Got Completed // Condition: Is Last Action Completed Successfully // Check if value exists // Condition: Has Remote Config Value "feature_enabled" // Get configuration value // Expression: PlaygamaBridge::RemoteConfigValue("daily_reward_amount") // Expression: PlaygamaBridge::RemoteConfigValue("special_offer_text") ``` -------------------------------- ### Implement Leaderboards and Rankings Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Provides methods to submit scores, retrieve leaderboard entries, and display native leaderboard popups. ```GDevelop Events // Submit score Leaderboards Set Score "main_leaderboard" : 5000 // Get entries Leaderboards Get Entries "main_leaderboard" // Access entry data PlaygamaBridge::LeaderboardEntryName(0) PlaygamaBridge::LeaderboardEntryScore(0) // Show UI Leaderboards Show Native Popup "main_leaderboard" ``` -------------------------------- ### Send Messaging and Custom Actions Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Communicate custom events to the platform and build structured parameters for platform-specific features using the action parameter builder. ```GDevelop /* Send Message */ Send Message "custom_event_name" /* Build Parameters */ Add Action Parameter "options.difficulty" : "hard" Add Bool Action Parameter "options.sound" : true ``` -------------------------------- ### Handle Game Visibility States Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Manage game lifecycle during tab switching or minimization. Use the visibility state event to pause game logic and mute audio when the game becomes hidden. ```GDevelop /* Condition */ On Visibility State Changed /* Expression */ PlaygamaBridge::VisibilityState() // Returns "visible" or "hidden" ``` -------------------------------- ### Manage In-App Purchases with Playgama Bridge Source: https://context7.com/playgama/bridge-gdevelop/llms.txt This snippet demonstrates how to check payment support, retrieve product catalogs, initiate purchases, and handle purchase completion. It also covers restoring existing purchases and consuming consumable items. ```javascript // Check if payments are supported // Condition: Is Payments Supported // Get product catalog // Action: Payments Get Catalog // Condition: On Payments Get Catalog Completed // Condition: Is Last Action Completed Successfully // -> Read catalog items: // Expression: PlaygamaBridge::PaymentsCatalogItemsCount() // Expression: PlaygamaBridge::PaymentsCatalogItemPropertyValue(0, "id") // Expression: PlaygamaBridge::PaymentsCatalogItemPropertyValue(0, "title") // Expression: PlaygamaBridge::PaymentsCatalogItemPropertyValue(0, "price") // Expression: PlaygamaBridge::PaymentsCatalogItemPropertiesCount() // Expression: PlaygamaBridge::PaymentsCatalogItemPropertyName(0) // Find product by filtering // Expression: PlaygamaBridge::PaymentsFirstCatalogItemPropertyValue("id", "premium_bundle", "price") // Make a purchase // Action: Payments Purchase "premium_bundle" // Condition: On Payments Purchase Completed // Condition: Is Last Action Completed Successfully // -> Grant purchased item to player // Expression: PlaygamaBridge::PaymentsLastPurchasePropertyValue("id") // Expression: PlaygamaBridge::PaymentsLastPurchasePropertiesCount() // Expression: PlaygamaBridge::PaymentsLastPurchasePropertyName(0) // Get existing purchases (for restoring) // Action: Payments Get Purchases // Condition: On Payments Get Purchases Completed // Expression: PlaygamaBridge::PaymentsPurchasesCount() // Expression: PlaygamaBridge::PaymentsPurchasePropertyValue(0, "id") // Consume a purchase (for consumable items like coins) // Action: Payments Consume Purchase "coin_pack" // Condition: On Payments Consume Purchase Completed ``` -------------------------------- ### Manage Platform Audio and Pause States Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Respond to platform-level requests to mute audio or pause the game. These conditions ensure the game respects the platform's requirements for backgrounding and focus. ```GDevelop /* Audio */ Platform On Audio State Changed Platform Is Audio Enabled /* Pause */ Platform On Pause State Changed Platform Is Paused ``` -------------------------------- ### Remote Configuration API Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Retrieve remote configuration values for A/B testing and dynamic game settings. ```APIDOC ## Remote Configuration ### Description Retrieve remote configuration values for A/B testing and dynamic game settings. ### Check Remote Config Support #### Condition `Is Remote Config Supported` ### Fetch Remote Configuration #### Action `Send Remote Config Get Request` #### Condition: On Remote Config Got Completed ##### Check Success `Is Last Action Completed Successfully` ### Check if Value Exists #### Condition `Has Remote Config Value "config_key"` ### Get Configuration Value #### Expression `PlaygamaBridge::RemoteConfigValue("config_key")` ``` -------------------------------- ### Handle Player Authorization Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Manages the player login flow, checking for authorization support and handling the completion of the authorization request. ```GDevelop Events // Check status Is Player Authorized // Request auth Authorize Player // Handle result On Authorize Player Completed Is Last Action Completed Successfully ``` -------------------------------- ### Detect Device Type in GDevelop Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Use device detection to optimize UI and controls for different hardware. The SDK provides a string expression and boolean conditions to identify if the player is on mobile, tablet, desktop, or TV. ```GDevelop /* Expression */ PlaygamaBridge::DeviceType() /* Conditions */ Is Mobile Is Tablet Is Desktop Is Tv ``` -------------------------------- ### Rewarded Ads API Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Instructions for implementing rewarded video ads, including handling rewards and managing ad events. ```APIDOC ## Advertisement - Rewarded Ads Display rewarded video ads that give players in-game rewards upon completion. ### Actions - **Show Rewarded** (string placement) - Shows a rewarded video ad with optional placement tracking. ### Conditions - **Is Rewarded Supported** (boolean) - Checks if rewarded ads are supported on the current platform. - **On Rewarded Rewarded** - Triggered when a rewarded ad is successfully completed. IMPORTANT: Only grant reward on this event. - **On Rewarded Opened** - Triggered when a rewarded ad is opened. Recommended: Pause game, mute audio. - **On Rewarded Closed** - Triggered when a rewarded ad is closed. Recommended: Resume game (reward already granted if completed). - **On Rewarded Failed** - Triggered when a rewarded ad fails to load or display. Recommended: Show error message, don't grant reward. ### Expressions - **PlaygamaBridge::RewardedPlacement()** (string) - Returns the placement string passed to the 'Show Rewarded' action, useful for conditional rewards. ``` -------------------------------- ### Synchronize Server Time Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Retrieve accurate server-side timestamps for time-sensitive mechanics like daily rewards or timed events. Requires checking for completion and availability before use. ```GDevelop /* Action */ Get Server Time /* Condition */ On Get Server Time Completed Has Server Time /* Expression */ PlaygamaBridge::ServerTime() ``` -------------------------------- ### Messaging and Custom Actions API Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Send custom messages to the platform and build dynamic action parameters. ```APIDOC ## Messaging and Custom Actions API ### Description Send custom messages to the platform and build dynamic action parameters. ### Method Action ### Endpoint Send Message, Add Action Parameter, Add Bool Action Parameter ### Parameters - **messageName** (string) - The name of the custom event or message. - **parameterName** (string) - The name of the action parameter. - **parameterValue** (any) - The value of the action parameter. - **boolParameterValue** (boolean) - The boolean value of the action parameter. ### Request Example ```json { "action": "Send Message", "messageName": "custom_event_name" } ``` ```json { "action": "Add Action Parameter", "parameterName": "options.difficulty", "parameterValue": "hard" } ``` ```json { "action": "Add Bool Action Parameter", "parameterName": "options.sound", "boolParameterValue": true } ``` ### Response None ``` -------------------------------- ### Game Visibility State API Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Handle game visibility changes when players switch tabs or minimize the browser. ```APIDOC ## Game Visibility State API ### Description Handle game visibility changes when players switch tabs or minimize the browser. ### Method Condition & Expression ### Endpoint On Visibility State Changed, PlaygamaBridge::VisibilityState() ### Parameters None ### Request Example None ### Response #### Success Response (200) - **visibilityState** (string) - The current visibility state: "visible" or "hidden". #### Response Example "hidden" ### Description Triggers an event when the game's visibility state changes. ### Method Event ### Endpoint On Visibility State Changed ### Parameters None ### Request Example None ### Response None ``` -------------------------------- ### Rewarded Ads Management - JavaScript Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Facilitates the display of rewarded video ads, offering players in-game rewards upon completion. Includes actions to show ads, check support, handle reward grants, and manage ad lifecycle events. ```javascript // Action: Show Rewarded with placement "extra_life" // Shows a rewarded video ad // Check if rewarded ads are supported // Condition: Is Rewarded Supported // Handle reward grant - IMPORTANT: Only grant reward on this event // Condition: On Rewarded Rewarded // -> Grant player the reward (extra life, coins, etc.) // Condition: On Rewarded Opened // -> Pause game, mute audio // Condition: On Rewarded Closed // -> Resume game (reward already granted if completed) // Condition: On Rewarded Failed // -> Show error message, don't grant reward // Get last rewarded placement for conditional rewards // Expression: PlaygamaBridge::RewardedPlacement() // Returns the placement string passed to Show Rewarded ``` -------------------------------- ### Implement Social Features with Playgama Bridge Source: https://context7.com/playgama/bridge-gdevelop/llms.txt This snippet covers various social features such as sharing, inviting friends, joining communities, creating posts, adding to home screen, and rating the game. It also includes a check for external link permissions. ```javascript // Share game // Condition: Is Share Supported // Action: Share // Condition: On Share Completed // Invite friends to play // Condition: Is Invite Friends Supported // Action: Invite Friends // Condition: On Invite Friends Completed // Join game community/group // Condition: Is Join Community Supported // Action: Join Community // Condition: On Join Community Completed // Create social post // Condition: Is Create Post Supported // Action: Create Post // Condition: On Create Post Completed // Add game to home screen (PWA) // Condition: Is Add To Home Screen Supported // Action: Add To Home Screen // Condition: On Add To Home Screen Completed // Add to favorites // Condition: Is Add To Favorites Supported // Action: Add To Favorites // Condition: On Add To Favorites Completed // Rate the game // Condition: Is Rate Supported // Action: Rate // Condition: On Rate Completed // Check if external links are allowed // Condition: Is External Links Allowed ``` -------------------------------- ### Access Player Profile Information Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Retrieves unique player identifiers, display names, and profile photo URLs. Also allows access to platform-specific extra properties. ```GDevelop Events // Expressions PlaygamaBridge::PlayerId() PlaygamaBridge::PlayerName() PlaygamaBridge::PlayerPhoto(0) PlaygamaBridge::PlayerExtraPropertyValue("property_name") ``` -------------------------------- ### In-App Payments API Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Implement in-app purchases for premium content, virtual currency, and subscriptions using the Payments API. ```APIDOC ## In-App Payments ### Description Implement in-app purchases for premium content, virtual currency, and subscriptions. ### Check Payments Support #### Condition `Is Payments Supported` ### Get Product Catalog #### Action `Payments Get Catalog` #### Condition: On Payments Get Catalog Completed ##### Check Success `Is Last Action Completed Successfully` #### Expressions to Read Catalog Items: - `PlaygamaBridge::PaymentsCatalogItemsCount()` - `PlaygamaBridge::PaymentsCatalogItemPropertyValue(index, "id")` - `PlaygamaBridge::PaymentsCatalogItemPropertyValue(index, "title")` - `PlaygamaBridge::PaymentsCatalogItemPropertyValue(index, "price")` - `PlaygamaBridge::PaymentsCatalogItemPropertiesCount()` - `PlaygamaBridge::PaymentsCatalogItemPropertyName(index)` ### Find Product by Filtering #### Expression `PlaygamaBridge::PaymentsFirstCatalogItemPropertyValue("id", "premium_bundle", "price")` ### Make a Purchase #### Action `Payments Purchase "product_id"` #### Condition: On Payments Purchase Completed ##### Check Success `Is Last Action Completed Successfully` #### Expressions to Read Purchase Details: - `PlaygamaBridge::PaymentsLastPurchasePropertyValue("id")` - `PlaygamaBridge::PaymentsLastPurchasePropertiesCount()` - `PlaygamaBridge::PaymentsLastPurchasePropertyName(index)` ### Get Existing Purchases (for restoring) #### Action `Payments Get Purchases` #### Condition: On Payments Get Purchases Completed #### Expressions to Read Purchases: - `PlaygamaBridge::PaymentsPurchasesCount()` - `PlaygamaBridge::PaymentsPurchasePropertyValue(index, "id")` ### Consume a Purchase (for consumable items) #### Action `Payments Consume Purchase "product_id"` #### Condition: On Payments Consume Purchase Completed ``` -------------------------------- ### Access Platform Games Catalog Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Fetch and display information about other games on the platform for cross-promotion. Supports retrieving all games or specific game details by ID. ```GDevelop /* Actions */ Platform Get All Games Platform Get Game By Id /* Expressions */ PlaygamaBridge::PlatformAllGamesCount() PlaygamaBridge::PlatformAllGamesPropertyValue(0, "title") ``` -------------------------------- ### Platform Audio and Pause States API Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Respond to platform-requested audio muting and pause states. ```APIDOC ## Platform Audio and Pause States API ### Description Respond to platform-requested audio muting and pause states. ### Method Condition ### Endpoint Platform On Audio State Changed, Platform Is Audio Enabled, Platform On Pause State Changed, Platform Is Paused ### Parameters None ### Request Example None ### Response #### Success Response (200) - **audioEnabled** (boolean) - True if audio is enabled, false otherwise. - **isPaused** (boolean) - True if the game is paused, false otherwise. #### Response Example True ### Description Triggers an event when the platform requests an audio state change. ### Method Event ### Endpoint Platform On Audio State Changed ### Parameters None ### Request Example None ### Response None ### Description Triggers an event when the platform requests a pause state change. ### Method Event ### Endpoint Platform On Pause State Changed ### Parameters None ### Request Example None ### Response None ``` -------------------------------- ### Ad Block Detection - JavaScript Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Detects if users are employing ad blockers. Includes an action to initiate detection and events to handle the completion of the check, allowing for alternative monetization strategies. ```javascript // Action: Check AdBlock // Initiates ad block detection // Condition: On Check AdBlock Completed // -> Check result and respond accordingly // Condition: Is Ad Block Detected // -> Show message asking user to disable ad blocker // -> Offer alternative purchase options ``` -------------------------------- ### Device Detection API Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Detect the player's device type (mobile, tablet, desktop, tv) to optimize UI and controls. ```APIDOC ## Device Detection API ### Description Detect the player's device type to optimize UI and controls. ### Method Expression ### Endpoint PlaygamaBridge::DeviceType() ### Parameters None ### Request Example None ### Response #### Success Response (200) - **deviceType** (string) - The detected device type: "mobile", "tablet", "desktop", or "tv". #### Response Example "mobile" ## Device Type Conditions ### Description Provides boolean conditions to check for specific device types. ### Method Condition ### Endpoint Is Mobile, Is Tablet, Is Desktop, Is Tv ### Parameters None ### Request Example None ### Response #### Success Response (200) - **isDeviceType** (boolean) - True if the device matches the condition, false otherwise. #### Response Example True ``` -------------------------------- ### Ad Block Detection API Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Information on detecting ad blockers to implement alternative monetization strategies. ```APIDOC ## Advertisement - Ad Block Detection Detect if users have ad blockers installed to show alternative monetization options. ### Actions - **Check AdBlock** - Initiates the ad block detection process. ### Conditions - **On Check AdBlock Completed** - Triggered after ad block detection is complete. Check the result and respond accordingly. - **Is Ad Block Detected** (boolean) - Returns true if an ad block is detected. Recommended: Show a message asking the user to disable their ad blocker or offer alternative purchase options. ``` -------------------------------- ### Manage Achievements with Playgama Bridge Source: https://context7.com/playgama/bridge-gdevelop/llms.txt This snippet shows how to check achievement support, unlock achievements, and retrieve the list of achievements. It also covers displaying a native achievements popup. ```javascript // Check if achievements are supported // Condition: Is Achievements Supported // Condition: Is Achievements Get List Supported // Condition: Is Achievements Native Popup Supported // Unlock an achievement // Action: Achievements Unlock "first_victory" // Condition: On Achievements Unlock Completed // Condition: Is Last Action Completed Successfully // -> Achievement unlocked // Get list of achievements // Action: Achievements Get List // Condition: On Achievements Get List Completed // Expression: PlaygamaBridge::AchievementsCount() // Expression: PlaygamaBridge::AchievementPropertiesCount() // Expression: PlaygamaBridge::AchievementPropertyName(0) // Expression: PlaygamaBridge::AchievementPropertyValue(0, "id") // Expression: PlaygamaBridge::AchievementPropertyValue(0, "name") // Expression: PlaygamaBridge::AchievementPropertyValue(0, "unlocked") // Show native achievements popup // Action: Achievements Show Native Popup // Condition: On Achievements Show Native Popup Completed ``` -------------------------------- ### Banner Ads API Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Details on how to display and hide banner advertisements, including placement options and event handling. ```APIDOC ## Advertisement - Banner Ads Display banner advertisements at the top or bottom of the screen. ### Actions - **Show Banner** (string position, string placement) - Displays a banner ad. Position options: "top", "bottom". - **Hide Banner** - Hides the currently displayed banner. ### Conditions - **Is Banner Supported** (boolean) - Checks if banner ads are supported on the current platform. - **On Banner Shown** - Triggered when a banner ad is successfully shown. Recommended: Adjust game UI to accommodate banner. - **On Banner Hidden** - Triggered when a banner ad is hidden. Recommended: Restore full-screen UI. ### Expressions - **PlaygamaBridge::BannerState()** (string) - Returns the current state of the banner ad ("loading", "shown", "hidden", "failed"). ``` -------------------------------- ### Achievements API Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Unlock achievements and display achievement lists using platform-native systems. ```APIDOC ## Achievements ### Description Unlock achievements and display achievement lists using platform-native systems. ### Check Achievements Support #### Conditions - `Is Achievements Supported` - `Is Achievements Get List Supported` - `Is Achievements Native Popup Supported` ### Unlock an Achievement #### Action `Achievements Unlock "achievement_id"` #### Condition: On Achievements Unlock Completed ##### Check Success `Is Last Action Completed Successfully` ### Get List of Achievements #### Action `Achievements Get List` #### Condition: On Achievements Get List Completed #### Expressions to Read Achievements: - `PlaygamaBridge::AchievementsCount()` - `PlaygamaBridge::AchievementPropertiesCount()` - `PlaygamaBridge::AchievementPropertyName(index)` - `PlaygamaBridge::AchievementPropertyValue(index, "id")` - `PlaygamaBridge::AchievementPropertyValue(index, "name")` - `PlaygamaBridge::AchievementPropertyValue(index, "unlocked")` ### Show Native Achievements Popup #### Action `Achievements Show Native Popup` #### Condition: On Achievements Show Native Popup Completed ``` -------------------------------- ### Interstitial Ads API Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Guidance on displaying interstitial advertisements, managing their lifecycle, and checking support. ```APIDOC ## Advertisement - Interstitial Ads Display fullscreen interstitial advertisements between game levels or at natural break points. The SDK handles preloading automatically. ### Actions - **Show Interstitial** (string placement) - Shows an interstitial ad with optional placement tracking. - **Set Minimum Delay Between Interstitial** (number seconds) - Sets the minimum delay in seconds between interstitial ads. ### Conditions - **Is Interstitial Supported** (boolean) - Checks if interstitials are supported on the current platform. - **On Interstitial Opened** - Triggered when an interstitial ad is opened. Recommended: Pause game, mute audio. - **On Interstitial Closed** - Triggered when an interstitial ad is closed. Recommended: Resume game, restore audio. - **On Interstitial Failed** - Triggered when an interstitial ad fails to load or display. Recommended: Continue gameplay without ad. ### Expressions - **PlaygamaBridge::InterstitialState()** (string) - Returns the current state of the interstitial ad ("loading", "opened", "closed", "failed"). ``` -------------------------------- ### Platform Games Catalog API Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Access information about other games on the platform for cross-promotion. ```APIDOC ## Platform Games Catalog API ### Description Access information about other games on the platform for cross-promotion. ### Method Condition & Action ### Endpoint Is Get All Games Supported, Is Get Game By Id Supported, Platform Get All Games, Platform Get Game By Id ### Parameters None ### Request Example None ### Response None ### Description Triggers an event when the list of all games has been retrieved. ### Method Event ### Endpoint On Get All Games Completed ### Parameters None ### Request Example None ### Response None ### Description Triggers an event when a specific game by ID has been retrieved. ### Method Event ### Endpoint On Get Game By Id Completed ### Parameters None ### Request Example None ### Response None ### Description Provides expressions to access properties of games from the platform catalog. ### Method Expression ### Endpoint PlaygamaBridge::PlatformAllGamesCount(), PlaygamaBridge::PlatformAllGamePropertiesCount(), PlaygamaBridge::PlatformAllGamesPropertyName(index), PlaygamaBridge::PlatformAllGamesPropertyValue(index, propertyName), PlaygamaBridge::PlatformGameByIdPropertyValue(propertyName) ### Parameters - **index** (integer) - The index of the game in the catalog. - **propertyName** (string) - The name of the property to retrieve (e.g., "id", "title", "url"). ### Request Example None ### Response #### Success Response (200) - **count** (integer) - The number of games or properties. - **propertyName** (string) - The name of the property. - **propertyValue** (any) - The value of the specified property. #### Response Example 10 ``` -------------------------------- ### Interstitial Ads Management - JavaScript Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Manages the display of fullscreen interstitial advertisements. Handles preloading, setting delays, checking support, and responding to ad lifecycle events like opening, closing, and failure. ```javascript // Action: Show Interstitial with placement "level_complete" // Shows an interstitial ad with optional placement tracking // Set minimum delay between ads (in seconds) // Action: Set Minimum Delay Between Interstitial 60 // Check if interstitials are supported on current platform // Condition: Is Interstitial Supported // Handle ad lifecycle events // Condition: On Interstitial Opened // -> Pause game, mute audio // Condition: On Interstitial Closed // -> Resume game, restore audio // Condition: On Interstitial Failed // -> Continue gameplay without ad // Expression: PlaygamaBridge::InterstitialState() // Returns: "loading", "opened", "closed", "failed" ``` -------------------------------- ### Banner Ads Management - JavaScript Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Enables the display of banner advertisements at the top or bottom of the screen. Provides actions to show and hide banners, check for support, and handle banner lifecycle events. ```javascript // Action: Show Banner on "bottom" with placement "main_menu" // Position options: "top", "bottom" // Action: Hide Banner // Hides the currently displayed banner // Check if banners are supported // Condition: Is Banner Supported // Handle banner events // Condition: On Banner Shown // -> Adjust game UI to accommodate banner // Condition: On Banner Hidden // -> Restore full-screen UI // Expression: PlaygamaBridge::BannerState() // Returns: "loading", "shown", "hidden", "failed" ``` -------------------------------- ### Social Features API Source: https://context7.com/playgama/bridge-gdevelop/llms.txt Enable social interactions including sharing, inviting friends, and community engagement. ```APIDOC ## Social Features ### Description Enable social interactions including sharing, inviting friends, and community engagement. ### Share Game #### Condition `Is Share Supported` #### Action `Share` #### Condition: On Share Completed ### Invite Friends #### Condition `Is Invite Friends Supported` #### Action `Invite Friends` #### Condition: On Invite Friends Completed ### Join Community #### Condition `Is Join Community Supported` #### Action `Join Community` #### Condition: On Join Community Completed ### Create Social Post #### Condition `Is Create Post Supported` #### Action `Create Post` #### Condition: On Create Post Completed ### Add to Home Screen (PWA) #### Condition `Is Add To Home Screen Supported` #### Action `Add To Home Screen` #### Condition: On Add To Home Screen Completed ### Add to Favorites #### Condition `Is Add To Favorites Supported` #### Action `Add To Favorites` #### Condition: On Add To Favorites Completed ### Rate the Game #### Condition `Is Rate Supported` #### Action `Rate` #### Condition: On Rate Completed ### Check External Links Allowed #### Condition `Is External Links Allowed` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.