@rafaykhan021/mas-capacitor
v1.0.3
Published
A Capacitor Plugin for Yodo1 MAS
Readme
@yodo1/mas-capacitor
A Capacitor Plugin for Yodo1 MAS
Install
npm install @yodo1/mas-capacitor
npx cap syncAPI
initialize(...)loadAd(...)showAd(...)isAdLoaded(...)showBanner(...)hideBanner()- Interfaces
- Type Aliases
initialize(...)
initialize(options: InitializeOptions) => Promise<InitializeResult>| Param | Type |
| ------------- | --------------------------------------------------------------- |
| options | InitializeOptions |
Returns: Promise<InitializeResult>
loadAd(...)
loadAd(options: LoadAdOptions) => Promise<ActionResult>| Param | Type |
| ------------- | ------------------------------------------------------- |
| options | LoadAdOptions |
Returns: Promise<ActionResult>
showAd(...)
showAd(options: ShowAdOptions) => Promise<ActionResult>| Param | Type |
| ------------- | ------------------------------------------------------- |
| options | ShowAdOptions |
Returns: Promise<ActionResult>
isAdLoaded(...)
isAdLoaded(options: IsAdLoadedOptions) => Promise<IsAdLoadedResult>| Param | Type |
| ------------- | --------------------------------------------------------------- |
| options | IsAdLoadedOptions |
Returns: Promise<IsAdLoadedResult>
showBanner(...)
showBanner(options?: ShowBannerOptions | undefined) => Promise<ActionResult>Show a banner ad. Creates, loads and attaches the banner view.
| Param | Type |
| ------------- | --------------------------------------------------------------- |
| options | ShowBannerOptions |
Returns: Promise<ActionResult>
hideBanner()
hideBanner() => Promise<HideBannerResult>Hide (remove) the currently visible banner ad.
Returns: Promise<HideBannerResult>
Interfaces
InitializeResult
| Prop | Type |
| ----------------- | -------------------- |
| initialized | boolean |
| errorCode | string |
| message | string |
InitializeOptions
| Prop | Type |
| ------------------------- | -------------------- |
| appKey | string |
| coppa | boolean |
| gdpr | boolean |
| ccpa | boolean |
| autoDelayIfLoadFail | boolean |
ActionResult
| Prop | Type |
| ----------------- | ----------------------------------------- |
| ok | boolean |
| action | 'loadAd' | 'showAd' |
| adType | AdType |
| placementId | string |
LoadAdOptions
| Prop | Type |
| ------------ | ----------------------------------------- |
| adType | AdType |
ShowAdOptions
| Prop | Type |
| ----------------- | ----------------------------------------- |
| adType | AdType |
| placementId | string |
IsAdLoadedResult
| Prop | Type |
| -------------- | ----------------------------------------- |
| isLoaded | boolean |
| adType | AdType |
IsAdLoadedOptions
| Prop | Type |
| ------------ | ----------------------------------------- |
| adType | AdType |
ShowBannerOptions
| Prop | Type | Description |
| ----------------- | ----------------------------------------------------- | -------------------------------------------------------------------------- |
| adSize | BannerAdSize | Banner size. Defaults to "banner" (320 × 50). |
| align | BannerAlign[] | One or more alignment flags. Defaults to ["bottom", "horizontalCenter"]. |
| placementId | string | Optional placement id for tracking. |
HideBannerResult
| Prop | Type |
| -------- | -------------------- |
| ok | boolean |
Type Aliases
AdType
'appopen' | 'interstitial' | 'rewarded'
BannerAdSize
'banner' | 'largeBanner' | 'iabMediumRectangle' | 'smartBanner' | 'adaptiveBanner'
BannerAlign
'left' | 'horizontalCenter' | 'right' | 'top' | 'verticalCenter' | 'bottom'
