npm package: @rafaykhan021/mas-capacitor
Description: A Capacitor Plugin for Yodo1 MAS
Author: Yodo1
Latest version: 1.0.3

# @yodo1/mas-capacitor

A Capacitor Plugin for Yodo1 MAS

## Install

```bash
npm install @yodo1/mas-capacitor
npx cap sync
```

## API

<docgen-index>

* [`initialize(...)`](#initialize)
* [`loadAd(...)`](#loadad)
* [`showAd(...)`](#showad)
* [`isAdLoaded(...)`](#isadloaded)
* [`showBanner(...)`](#showbanner)
* [`hideBanner()`](#hidebanner)
* [Interfaces](#interfaces)
* [Type Aliases](#type-aliases)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### initialize(...)

```typescript
initialize(options: InitializeOptions) => Promise<InitializeResult>
```

| Param         | Type                                                            |
| ------------- | --------------------------------------------------------------- |
| **`options`** | <code><a href="#initializeoptions">InitializeOptions</a></code> |

**Returns:** <code>Promise&lt;<a href="#initializeresult">InitializeResult</a>&gt;</code>

--------------------


### loadAd(...)

```typescript
loadAd(options: LoadAdOptions) => Promise<ActionResult>
```

| Param         | Type                                                    |
| ------------- | ------------------------------------------------------- |
| **`options`** | <code><a href="#loadadoptions">LoadAdOptions</a></code> |

**Returns:** <code>Promise&lt;<a href="#actionresult">ActionResult</a>&gt;</code>

--------------------


### showAd(...)

```typescript
showAd(options: ShowAdOptions) => Promise<ActionResult>
```

| Param         | Type                                                    |
| ------------- | ------------------------------------------------------- |
| **`options`** | <code><a href="#showadoptions">ShowAdOptions</a></code> |

**Returns:** <code>Promise&lt;<a href="#actionresult">ActionResult</a>&gt;</code>

--------------------


### isAdLoaded(...)

```typescript
isAdLoaded(options: IsAdLoadedOptions) => Promise<IsAdLoadedResult>
```

| Param         | Type                                                            |
| ------------- | --------------------------------------------------------------- |
| **`options`** | <code><a href="#isadloadedoptions">IsAdLoadedOptions</a></code> |

**Returns:** <code>Promise&lt;<a href="#isadloadedresult">IsAdLoadedResult</a>&gt;</code>

--------------------


### showBanner(...)

```typescript
showBanner(options?: ShowBannerOptions | undefined) => Promise<ActionResult>
```

Show a banner ad. Creates, loads and attaches the banner view.

| Param         | Type                                                            |
| ------------- | --------------------------------------------------------------- |
| **`options`** | <code><a href="#showbanneroptions">ShowBannerOptions</a></code> |

**Returns:** <code>Promise&lt;<a href="#actionresult">ActionResult</a>&gt;</code>

--------------------


### hideBanner()

```typescript
hideBanner() => Promise<HideBannerResult>
```

Hide (remove) the currently visible banner ad.

**Returns:** <code>Promise&lt;<a href="#hidebannerresult">HideBannerResult</a>&gt;</code>

--------------------


### Interfaces


#### InitializeResult

| Prop              | Type                 |
| ----------------- | -------------------- |
| **`initialized`** | <code>boolean</code> |
| **`errorCode`**   | <code>string</code>  |
| **`message`**     | <code>string</code>  |


#### InitializeOptions

| Prop                      | Type                 |
| ------------------------- | -------------------- |
| **`appKey`**              | <code>string</code>  |
| **`coppa`**               | <code>boolean</code> |
| **`gdpr`**                | <code>boolean</code> |
| **`ccpa`**                | <code>boolean</code> |
| **`autoDelayIfLoadFail`** | <code>boolean</code> |


#### ActionResult

| Prop              | Type                                      |
| ----------------- | ----------------------------------------- |
| **`ok`**          | <code>boolean</code>                      |
| **`action`**      | <code>'loadAd' \| 'showAd'</code>         |
| **`adType`**      | <code><a href="#adtype">AdType</a></code> |
| **`placementId`** | <code>string</code>                       |


#### LoadAdOptions

| Prop         | Type                                      |
| ------------ | ----------------------------------------- |
| **`adType`** | <code><a href="#adtype">AdType</a></code> |


#### ShowAdOptions

| Prop              | Type                                      |
| ----------------- | ----------------------------------------- |
| **`adType`**      | <code><a href="#adtype">AdType</a></code> |
| **`placementId`** | <code>string</code>                       |


#### IsAdLoadedResult

| Prop           | Type                                      |
| -------------- | ----------------------------------------- |
| **`isLoaded`** | <code>boolean</code>                      |
| **`adType`**   | <code><a href="#adtype">AdType</a></code> |


#### IsAdLoadedOptions

| Prop         | Type                                      |
| ------------ | ----------------------------------------- |
| **`adType`** | <code><a href="#adtype">AdType</a></code> |


#### ShowBannerOptions

| Prop              | Type                                                  | Description                                                                |
| ----------------- | ----------------------------------------------------- | -------------------------------------------------------------------------- |
| **`adSize`**      | <code><a href="#banneradsize">BannerAdSize</a></code> | Banner size. Defaults to `"banner"` (320 × 50).                            |
| **`align`**       | <code>BannerAlign[]</code>                            | One or more alignment flags. Defaults to `["bottom", "horizontalCenter"]`. |
| **`placementId`** | <code>string</code>                                   | Optional placement id for tracking.                                        |


#### HideBannerResult

| Prop     | Type                 |
| -------- | -------------------- |
| **`ok`** | <code>boolean</code> |


### Type Aliases


#### AdType

<code>'appopen' | 'interstitial' | 'rewarded'</code>


#### BannerAdSize

<code>'banner' | 'largeBanner' | 'iabMediumRectangle' | 'smartBanner' | 'adaptiveBanner'</code>


#### BannerAlign

<code>'left' | 'horizontalCenter' | 'right' | 'top' | 'verticalCenter' | 'bottom'</code>

</docgen-api>