peanutlabs.show()

Type Function
Return value none
Revision Release 2022.3683
Keywords ads, advertising, Peanut Labs, show
See also peanutlabs.init()
peanutlabs.*

Overview

Shows a Peanut Labs survey.

Syntax

peanutlabs.show()

Example

local peanutlabs = require( "plugin.peanutlabs" )

local function adListener( event )

    if ( event.phase == "init" ) then  -- Successful initialization
        -- Show a survey
        peanutlabs.show()
    end
end

-- Initialize the Peanut Labs plugin
peanutlabs.init( adListener,
    {
        userId = "x1",
        appKey = "YOUR_APP_KEY",
        appId = 2222
    }
)