Search Results for

Show / Hide Table of Contents

# Interface INativeAd

Native object that exposes properties of the native ad response.

##### Inherited Members

IDisposable.Dispose()

###### Namespace: AppstockSDK.Api.Native.Data.Response

###### Assembly: Appstock.Core.dll

##### Syntax

    public interface INativeAd : IDisposable

### Properties

#### CallToAction

Gets the CallToAction text.

##### Declaration

    string? CallToAction { get; }

##### Property Value

Type | Description
--- | ---
string | Value of first IDataContent asset with DataType equal to CallToAction.

#### DataObjects

Gets data assets.

##### Declaration

    IEnumerable<IDataContent?> DataObjects { get; }

##### Property Value

Type | Description
--- | ---
IEnumerable<IDataContent> | Data elements of ad assets collection.

#### IconUrl

Gets the Icon image URL.

##### Declaration

    string? IconUrl { get; }

##### Property Value

Type | Description
--- | ---
string | URL of first IImageContent asset with ImageType equal to Icon.

#### ImageUrl

Gets the Main image URL.

##### Declaration

    string? ImageUrl { get; }

##### Property Value

Type | Description
--- | ---
string | URL of first IImageContent asset with ImageType equal to Main.

#### Images

Gets image assets.

##### Declaration

    IEnumerable<IImageContent?> Images { get; }

##### Property Value

Type | Description
--- | ---
IEnumerable<IImageContent> | Image elements of ad assets collection.

#### SponsoredBy

Gets the Sponsored text.

##### Declaration

    string? SponsoredBy { get; }

##### Property Value

Type | Description
--- | ---
string | Value of first IDataContent asset with DataType equal to Sponsored.

#### Title

Gets the title string.

##### Declaration

    string? Title { get; }

##### Property Value

Type | Description
--- | ---
string | Text of first ITitleContent asset.

#### Titles

Gets title assets.

##### Declaration

    IEnumerable<ITitleContent?> Titles { get; }

##### Property Value

Type | Description
--- | ---
IEnumerable<ITitleContent> | Title elements of ad assets collection.

### Methods

#### RegisterView(GameObject, IEnumerable<GameObject>?)

Adds trackers to the view.

##### Declaration

    bool RegisterView(GameObject container, IEnumerable<GameObject>? clickableObjects)

##### Parameters

Type | Name | Description
--- | --- | ---
GameObject | container | The most relevant ancestor (Transform-wise) of ad elements.
IEnumerable<GameObject> | clickableObjects | GameObjects with attached colliders or selectable components.

##### Returns

Type | Description
--- | ---
bool | `true` is tracking started successfully, `false` otherwise.

##### See Also

https://docs.unity3d.com/ScriptReference/Collider.html
https://docs.unity3d.com/ScriptReference/Collider2D.html
https://docs.unity3d.com/Packages/com.unity.ugui@3.0/api/UnityEngine.UI.Selectable.html

### Events

#### OnAdClicked

Fired when ad is clicked.

##### Declaration

    event Action OnAdClicked

##### Event Type

Type | Description
--- | ---
Action |

#### OnAdExpired

Fired when ad expired.

##### Declaration

    event Action OnAdExpired

##### Event Type

Type | Description
--- | ---
Action |

#### OnAdImpression

Fired when impression is tracked.

##### Declaration

    event Action OnAdImpression

##### Event Type

Type | Description
--- | ---
Action |