1.0.0-beta6 • Published 2 months ago

@addapptr/aatkit-ionic-plugin v1.0.0-beta6

Weekly downloads
-
License
CUSTOM
Repository
bitbucket
Last release
2 months ago

aatkit-ionic-plugin

AATKit SDK plugin for Ionic

Install

npm install @addapptr/aatkit-ionic-plugin
npx cap sync

API

initialize(...)

initialize(options: AATKitConfiguration) => Promise<void>

Initializes the AATKit library. Should be called once during application initialization before any other calls to AATKit.

ParamType
optionsAATKitConfiguration

reconfigure(...)

reconfigure(options: AATKitRuntimeConfiguration) => Promise<void>

Update AATKit consent arguments after the AATKit is already initialized.

ParamType
optionsAATKitRuntimeConfiguration

setCollapsibleBannerOptions(...)

setCollapsibleBannerOptions(_: { placementName: string; collapsibleBannerOptions: AATKitCollapsibleBannerOptions; }) => Promise<void>

Allows to set collapsible banner options for given placement

ParamTypeDescription
_{ placementName: string; collapsibleBannerOptions: AATKitCollapsibleBannerOptions; }Contains placement name and collapsible banner options

setLogLevel(...)

setLogLevel(options: { level: string; }) => Promise<void>

Allows to set log level from code.

ParamTypeDescription
options{ level: string; }Allows to set log level from code. Possible values of the level: "debug", "error", "info", "verbose", "warn"

setIsChildDirected(...)

setIsChildDirected(options: { isChildDirected: boolean; }) => Promise<void>

Allows to set if app should be treated as child-directed.

ParamTypeDescription
options{ isChildDirected: boolean; }isChildDirected – True if app is child directed, false otherwise.

configureDebugScreen(...)

configureDebugScreen(configuration: AATKitDebugScreenConfiguration) => Promise<void>

Sets debug screen configuration.

ParamType
configurationAATKitDebugScreenConfiguration

enableDebugScreen()

enableDebugScreen() => Promise<void>

Enables debug screen that will show after shaking the device. It is already enabled by default.


disableDebugScreen()

disableDebugScreen() => Promise<void>

Disables the debug screen appearing after shaking the device. It is enabled by default.


showConsentDialogIfNeeded()

showConsentDialogIfNeeded() => Promise<void>

Presents the consent screen only if it is required by the used CMP (for example if no user consent has been set yet). It is advised to always call this method when the app starts.


showConsentDialogIfNeededOrRejected(...)

showConsentDialogIfNeededOrRejected(options: { daysAgo: number; }) => Promise<void>

Presents the consent screen if it is required by the used CMP (i.e. no user consent has been set yet) or the user has rejected the consent.

ParamType
options{ daysAgo: number; }

editConsent()

editConsent() => Promise<void>

Presents the consent screen, allowing the user to change consent settings.


reloadConsent()

reloadConsent() => Promise<void>

Tells the CMP to reload. Does not need to be used unless some error occurs.


createPlacement(...)

createPlacement(options: { placementName: string; placementSize: string; }) => Promise<void>

Creates placement with given name and size and adds it to the view.

ParamTypeDescription
options{ placementName: string; placementSize: string; }object containing placement name and its size. Possible values of the size: "Fullscreen", "Banner320x53", "Banner320x50", "Banner768x90", "Banner300x250", "Banner468x60"

createRewardedVideoPlacement(...)

createRewardedVideoPlacement(options: { placementName: string; }) => Promise<void>

Creates Rewarded Video placement with given name.

ParamTypeDescription
options{ placementName: string; }object containing placement name.

createAppOpenAdPlacement(...)

createAppOpenAdPlacement(options: { placementName: string; }) => Promise<void>

Creates a new App Open Ad with given name.

ParamTypeDescription
options{ placementName: string; }object containing placement name.

reloadPlacement(...)

reloadPlacement(options: { placementName: string; }) => Promise<boolean>

Requests placement reload. Works only if automatic reloading is disabled.

ParamTypeDescription
options{ placementName: string; }object containing placement name.

Returns: Promise<boolean>


startPlacementAutoReload(...)

startPlacementAutoReload(options: { placementName: string; }) => Promise<void>

Enables automatic reloading of placement. Auto-reloader will use reload time configured on gravite.net account or fallback to default 30L seconds.

ParamTypeDescription
options{ placementName: string; }object containing placement name.

stopPlacementAutoReload(...)

stopPlacementAutoReload(options: { placementName: string; }) => Promise<void>

Disables automatic reloading of placement.

ParamTypeDescription
options{ placementName: string; }object containing placement name.

showPlacement(...)

showPlacement(options: { placementName: string; }) => Promise<boolean>

Shows interstitial ad if ad is ready.

ParamTypeDescription
options{ placementName: string; }object containing placement name.

Returns: Promise<boolean>


addPlacementToView(...)

addPlacementToView(options: { placementName: string; }) => Promise<void>

Adds placement to view. Works only for banner placements.

ParamTypeDescription
options{ placementName: string; }object containing placement name.

removePlacementFromView(...)

removePlacementFromView(options: { placementName: string; }) => Promise<void>

Removes placement from view. Works only for banner placements.

ParamTypeDescription
options{ placementName: string; }object containing placement name.

setPlacementAlignment(...)

setPlacementAlignment(options: { placementName: string; bannerAlignment: string; }) => Promise<void>

Sets banner placement position on the screen.

ParamTypeDescription
options{ placementName: string; bannerAlignment: string; }object containing placement name and banner alignment with possible values: "topLeft", "topCenter", "topRight", "bottomLeft", "bottomCenter", "bottomRight"

isTablet()

isTablet() => Promise<boolean>

Checks if AATKit recognizes given device as tablet.

Returns: Promise<boolean>


maximumBannerSizeLandscape()

maximumBannerSizeLandscape() => Promise<String>

Returns the banner size with maximum width that will fit on a given device in portrait screen orientation.

Returns: Promise<String>


maximumBannerSizePortrait()

maximumBannerSizePortrait() => Promise<String>

Returns the banner size with maximum width that will fit on a given device in portrait screen orientation.

Returns: Promise<String>


fittingBannerSizesPortrait()

fittingBannerSizesPortrait() => Promise<string[]>

Returns the list of baner sizes that will fit on a given device in portrait screen orientation.

Returns: Promise<string[]>


fittingBannerSizesLandscape()

fittingBannerSizesLandscape() => Promise<string[]>

Returns the list of BannerSize that will fit on a given device in landscape screen orientation.

Returns: Promise<string[]>


setNetworkEnabled(...)

setNetworkEnabled(options: { network: string; enabled: boolean; }) => Promise<void>

Allows to enable or disable selected ad networks. By default all networks are enabled

ParamTypeDescription
options{ network: string; enabled: boolean; }Contains network name and enabled value – True to enable, false to disable.

isNetworkEnabled(...)

isNetworkEnabled(options: { network: string; }) => Promise<boolean>

Returns true if ad network is enabled, false otherwise.

ParamTypeDescription
options{ network: string; }Contains network name.

Returns: Promise<boolean>


setContentGravity(...)

setContentGravity(options: { placementName: string; gravity: string; }) => Promise<void>

Sets gravity for ads that don't fill entire placement area.

ParamTypeDescription
options{ placementName: string; gravity: string; }Contains placement name and gravity value of "top", "bottom" or "center".

addAdNetworkForKeywordTargeting(...)

addAdNetworkForKeywordTargeting(options: { network: string; }) => Promise<void>

Adds an ad network to the list of ad networks that receive targeting keywords (if any set). If no ad networks are added, any set keywords will be delivered to all ad networks supporting keyword targeting.

ParamTypeDescription
options{ network: string; }Contains network name.

removeAdNetworkForKeywordTargeting(...)

removeAdNetworkForKeywordTargeting(options: { network: string; }) => Promise<void>

Removes an ad network from the list of ad networks that receive targeting keywords (if any set). If no ad networks are added to the list, any set keywords will be delivered to all ad networks supporting keyword targeting.

ParamTypeDescription
options{ network: string; }Contains network name.

setTargetingInfo(...)

setTargetingInfo(options: { info: { [key: string]: string[]; }; }) => Promise<void>

Sets the targeting information for the application. This information will be used only if no placement-specific targeting is available.

ParamTypeDescription
options{ info: { key: string: string[]; }; }Contains targeting info.

setTargetingInfoForPlacement(...)

setTargetingInfoForPlacement(options: { placementName: string; info: { [key: string]: string[]; }; }) => Promise<void>

Sets the targeting information for the specific placement.

ParamTypeDescription
options{ placementName: string; info: { key: string: string[]; }; }Contains placement name and targeting info.

setContentTargetingUrl(...)

setContentTargetingUrl(options: { url: string; }) => Promise<void>

Sets the content targeting url for the application. This information will be used only if no placement-specific targeting is available.

ParamTypeDescription
options{ url: string; }Contains content url.

setContentTargetingUrlForPlacement(...)

setContentTargetingUrlForPlacement(options: { placementName: string; url: string; }) => Promise<void>

Sets the content targeting url for the specific placement.

ParamTypeDescription
options{ placementName: string; url: string; }Contains placement name and content url.

setMultiContentTargetingUrlsForPlacement(...)

setMultiContentTargetingUrlsForPlacement(options: { placementName: string; urls: string[]; }) => Promise<void>

Sets the multi content targeting url for the application. Not all ad-networks supports multiple urls.

ParamTypeDescription
options{ placementName: string; urls: string[]; }Contains placement name and the list of urls.

setPublisherProvidedId(...)

setPublisherProvidedId(options: { publisherProvidedId: string; }) => Promise<void>

Allows to pass PublisherProvidedId to networks supporting it.

ParamTypeDescription
options{ publisherProvidedId: string; }Contains publisher provided ID

hasAdForPlacement(...)

hasAdForPlacement(options: { placementName: string; }) => Promise<boolean>

Returns true if there is an ad loaded for given placement.

ParamTypeDescription
options{ placementName: string; }Contains placement name.

Returns: Promise<boolean>


isFrequencyCapReachedForPlacement(...)

isFrequencyCapReachedForPlacement(options: { placementName: string; }) => Promise<boolean>

Checks if desired impression cap (set on Gravite Dashboard) is reached for given fullscreen or rewarded video placement. Note: this method will ALWAYS return false for other placement types.

ParamTypeDescription
options{ placementName: string; }Contains placement name.

Returns: Promise<boolean>


muteVideoAds(...)

muteVideoAds(options: { mute: boolean; }) => Promise<void>

Allows to mute video ads.

ParamTypeDescription
options{ mute: boolean; }True to enable, false to disable ad muting.

isConsentOptIn()

isConsentOptIn() => Promise<boolean>

Returns "consent opt-in status" returned by our server rules. Only returns meaningful information after the rules are downloaded.

Returns: Promise<boolean>


Interfaces

AATKitConfiguration

PropType
alternativeBundleIdstring
initialRulesstring
shouldCacheRulesboolean
shouldSkipRulesboolean
shouldReportUsingAlternativeBundleIdboolean
testModeAccountIdnumber
useDebugShakeboolean
platformstring
consentAATKitConsent
adNetworkOptionsAATKitAdNetworkOptions

AATKitConsent

PropType
typestring
nonIABConsentstring
vendorConsentObtainedNetworksstring[]
noConsentNetworkStopSetstring[]
consentForAddapptrstring
showIfNeededSettingstring
accountIdnumber
propertyIdnumber
propertyNamestring
pmIdstring

AATKitAdNetworkOptions

PropType
appNexusOptionsAATKitAppNexusOptions
feedAdOptionsAATKitFeedAdOptions
adMobOptionsAATKitAdMobOptions
dfpOptionsAATKitDFPOptions
datonomyOptionsAATKitDatonomyOptions
superAwesomeOptionsAATKitSuperAwesomeOptions

AATKitAppNexusOptions

PropType
autoCloseTimenumber
supportNativeBannerboolean
supportVideoBannerboolean

AATKitFeedAdOptions

PropType
shutterColornumber
disableSpinnerboolean

AATKitAdMobOptions

PropType
inlineBannerMaxHeightnumber

AATKitDFPOptions

PropType
inlineBannerMaxHeightnumber

AATKitDatonomyOptions

PropType
datonomyAPIKeystring

AATKitSuperAwesomeOptions

PropType
bannerOptionsAATKitSuperAwesomeBannerOptions
interstitialAdOptionsAATKitSuperAwesomeInterstitialAdOptions
rewardedVideoOptionsAATKitSuperAwesomeRewardedVideOptions

AATKitSuperAwesomeBannerOptions

PropType
parentalGateEnabledboolean
bumperPageEnabledboolean
bumperPageCustomAppNamestring

AATKitSuperAwesomeInterstitialAdOptions

PropTypeDescription
orientationstringPossible values: "any", "portrait", "landscape"
closeButtonStatestringPossible values: "enabled", "enablednodelay", "disabled"

AATKitSuperAwesomeRewardedVideOptions

PropType
closeButtonAtEndboolean
smallClickEnabledboolean
closeButtonWarningEnabledboolean

AATKitRuntimeConfiguration

PropType
consentRequiredboolean
useGeoLocationboolean

AATKitCollapsibleBannerOptions

PropType
minDelayInSecondsnumber
positionstring

AATKitDebugScreenConfiguration

PropType
titlestring
showBundleIdboolean
showTestModeboolean
showLoadedAndLoadingAdsboolean
showAvailableNetworksboolean
showDisabledNetworksboolean
showRemovedNetworkSDKsboolean
showUnsupportedNetworksboolean
showExtraSDKsboolean
showConsentboolean
showAdvertisingIdboolean
showDeviceTypeboolean

String

Allows manipulation and formatting of text strings and determination and location of substrings within strings.

PropTypeDescription
lengthnumberReturns the length of a String object.
MethodSignatureDescription
toString() => stringReturns a string representation of a string.
charAt(pos: number) => stringReturns the character at the specified index.
charCodeAt(index: number) => numberReturns the Unicode value of the character at the specified location.
concat(...strings: string[]) => stringReturns a string that contains the concatenation of two or more strings.
indexOf(searchString: string, position?: number | undefined) => numberReturns the position of the first occurrence of a substring.
lastIndexOf(searchString: string, position?: number | undefined) => numberReturns the last occurrence of a substring in the string.
localeCompare(that: string) => numberDetermines whether two strings are equivalent in the current locale.
match(regexp: string | RegExp) => RegExpMatchArray | nullMatches a string with a regular expression, and returns an array containing the results of that search.
replace(searchValue: string | RegExp, replaceValue: string) => stringReplaces text in a string, using a regular expression or search string.
replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string) => stringReplaces text in a string, using a regular expression or search string.
search(regexp: string | RegExp) => numberFinds the first substring match in a regular expression search.
slice(start?: number | undefined, end?: number | undefined) => stringReturns a section of a string.
split(separator: string | RegExp, limit?: number | undefined) => string[]Split a string into substrings using the specified separator and return them as an array.
substring(start: number, end?: number | undefined) => stringReturns the substring at the specified location within a String object.
toLowerCase() => stringConverts all the alphabetic characters in a string to lowercase.
toLocaleLowerCase(locales?: string | string[] | undefined) => stringConverts all alphabetic characters to lowercase, taking into account the host environment's current locale.
toUpperCase() => stringConverts all the alphabetic characters in a string to uppercase.
toLocaleUpperCase(locales?: string | string[] | undefined) => stringReturns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.
trim() => stringRemoves the leading and trailing white space and line terminator characters from a string.
substr(from: number, length?: number | undefined) => stringGets a substring beginning at the specified location and having the specified length.
valueOf() => stringReturns the primitive value of the specified object.

RegExpMatchArray

PropType
indexnumber
inputstring

RegExp

PropTypeDescription
sourcestringReturns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal.
globalbooleanReturns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only.
ignoreCasebooleanReturns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only.
multilinebooleanReturns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only.
lastIndexnumber
MethodSignatureDescription
exec(string: string) => RegExpExecArray | nullExecutes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
test(string: string) => booleanReturns a Boolean value that indicates whether or not a pattern exists in a searched string.
compile() => this

RegExpExecArray

PropType
indexnumber
inputstring
1.0.0-beta6

2 months ago

1.0.0-beta5

2 months ago

1.0.0-beta4

3 months ago

1.0.0-beta3

5 months ago

1.0.0-beta2

6 months ago

1.0.0-beta1

8 months ago

1.0.0-alpha.1

8 months ago