NimbusAdManager

class NimbusAdManager(publisherKey: String? = null, apiKey: String? = null) : RequestManager

The entry point for requesting and rendering an ad from Nimbus.

Parameters

publisherKey

Defaults to the publisherKey used to initialize the SDK. Can be overridden with apiKey to have this NimbusAdManager instance send requests to a different Nimbus environment.

apiKey

Defaults to the apiKey used to initialize the SDK. Can be overridden with publisherKey to have this NimbusAdManager instance send requests to a different Nimbus environment.

Constructors

Link copied to clipboard
constructor(publisherKey: String? = null, apiKey: String? = null)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

A listener for a request made to Nimbus.

Properties

Link copied to clipboard
open override val apiKey: String
Link copied to clipboard
open override val publisherKey: String

Functions

Link copied to clipboard
open suspend fun makeRequest(context: Context, request: NimbusRequest): NimbusResponse
open fun <T : NimbusResponse.Listener, NimbusError.Listener> makeRequest(context: Context, request: NimbusRequest, listener: T)

Make a request to Nimbus.

Link copied to clipboard
fun RequestManager.notifyLoss(nimbusResponse: NimbusResponse, auctionData: AuctionData?, requestHandler: RequestHandler = Tracker.requestHandler, dispatcher: CoroutineDispatcher = Dispatchers.IO)

Notifies Nimbus of an external auction Loss

Link copied to clipboard
fun RequestManager.notifyWin(nimbusResponse: NimbusResponse, auctionData: AuctionData?, requestHandler: RequestHandler = Tracker.requestHandler, dispatcher: CoroutineDispatcher = Dispatchers.IO)

Notifies Nimbus of an external auction Win

Link copied to clipboard
fun showAd(request: NimbusRequest, viewGroup: ViewGroup, listener: NimbusAdManager.Listener)
fun showAd(request: NimbusRequest, @IntRange(from = 20) refreshInterval: Int, viewGroup: ViewGroup, listener: NimbusAdManager.Listener)

Makes a request to Nimbus and renders the result into an AdController.

Link copied to clipboard
fun showBlockingAd(request: NimbusRequest, @IntRange(from = 0, to = 3600) closeButtonDelaySeconds: Int = 5, activity: Activity, listener: NimbusAdManager.Listener)

Makes a request to Nimbus and renders the result into an AdController.

Link copied to clipboard
fun showRewardedAd(request: NimbusRequest, @IntRange(from = 0, to = 3600) closeButtonDelaySeconds: Int, activity: Activity, listener: NimbusAdManager.Listener)

Makes a rewarded request to Nimbus and renders the result into an AdController.