Type Function Return value none Revision Release 2025.3721 Keywords ads, advertising, Appodeal, getRewardParameters See also appodeal.*
Returns the reward parameters for the specified placement ID with an event.phase of "dataReceived". The data returned is formatted as a JSON string in event.data.
appodeal.getRewardParameters( [placementId] )
String. The placement ID for which to return reward parameters. If no placement ID is given, the default placement will be used.
local appodeal = require( "plugin.appodeal" )
local function adListener( event )
if ( event.phase == "init" ) then
-- Successful initialization
elseif ( event.phase == "failed" ) then -- The ad failed to load
print( event.type )
print( event.isError )
print( event.response )
elseif ( event.phase == "dataReceived" ) then -- Event data received
print( event.type )
print( event.data )
end
end
-- Initialize the Appodeal plugin
appodeal.init( adListener, { appKey="YOUR_APP_KEY" } )
-- Sometime later, get the reward parameters for the default placement
appodeal.getRewardParameters()