Class: AdLoader
Properties
adLoaderOptions
• Readonly
adLoaderOptions: AdLoaderOptions
adType
• Readonly
adType: AdType
Methods
addListener
▸ addListener<E
>(eventName
, listener
): () => void
Add a listener for the bid response. Supported events are:
AdLoaderEvent.SUCCESS
AdLoaderEvent.FAILURE
Type parameters
Name | Type |
---|---|
E | extends AdLoaderEvent |
Parameters
Name | Type | Description |
---|---|---|
eventName | E | The name of the event to listen. |
listener | AdLoaderListener <E > | The listener to be called when the event is fired. |
Returns
fn
Unsubscribe function.
▸ (): void
Returns
void
Defined in
loadAd
▸ loadAd(): Promise
<{ [key: string]
: string
; }>
Request APS for a bid. Only a single ad size and slotUUID is supported per bid request.
This method will return a promise that resolves a bid response requested by this call.
In order to receive further bid responses returned by auto refresh, you must register listeners via addListener()
.
Returns
Promise
<{ [key: string]
: string
; }>
Promise of key value pairs from returned bid response.
Defined in
stopAutoRefresh
▸ stopAutoRefresh(): void
Stop the auto refresh of the ad.
Returns
void
Defined in
createBannerAdLoader
▸ Static
createBannerAdLoader(adLoaderOptions
): AdLoader
Create a banner AdLoader instance.
Parameters
Name | Type | Description |
---|---|---|
adLoaderOptions | BannerAdLoaderOptions | BannerAdLoaderOptions object used to configure the bid request. |
Returns
AdLoader instance.
Defined in
createInterstitialAdLoader
▸ Static
createInterstitialAdLoader(adLoaderOptions
): AdLoader
Create a interstitial AdLoader instance.
Parameters
Name | Type | Description |
---|---|---|
adLoaderOptions | AdLoaderOptions | AdLoaderOptions object used to configure the bid request. |
Returns
AdLoader instance.
Defined in
skadnHelper
▸ Static
skadnHelper(name
, info?
): void
In order for SKAdNetwork to work, pass the app event.
Parameters
Name | Type | Description |
---|---|---|
name | string | The name of the event. |
info? | string | The data/info with the event. |
Returns
void