fuse.getProperty()

Type Function
Return value (various)
Revision Release 2025.3714
Keywords ads, advertising, monetization, fuse, getProperty
See also fuse.*

Overview

Queries the Fuse engine for various properties.

Syntax

fuse.getProperty( property )
fuse.getProperty( property, params )
property (required)

String. String which specifies the property type. Valid options include:

  • "numGamesPlayed" — The number of times that the user has opened the application. On iOS, this is regarded as the app being opened from either the springboard or the system tray (minimized).
  • "versionString" — The version string of the Fuse engine.
  • "isConnected" — Boolean value of true if the application is connected to the Internet; false otherwise.
  • "rewardedPayload" — The payload of the rewarded object for a specific zone. The zone should be specified within the params table via the zone key. If a params table is not supplied, the payload for the default zone is given.
params (optional)

Table. A table in which to specify the zone for the "rewardedPayload" property. The zone should be specified with the zone key and a string value representing the ad zone.

Example

local fuse = require( "plugin.fuse" )

-- Event listener function
local function adListener( event )

    if ( event.isError ) then
        print( "Fuse error: " .. event.response )
    else
        if ( event.phase == "init" ) then
            -- Fuse system initialized
        end
    end
end

-- Initialize the Fuse service
fuse.init( adListener )

-- Check the number of games played
fuse.getProperty( "numGamesPlayed" )

-- Get the rewarded payload for a specified zone
fuse.getProperty( "rewardedPayload", { zone="Menu" } )