AATNativeAdPlacement

@objc public protocol AATNativeAdPlacement {

    /// Set the placement delegate that will listen to ad loading and display events.
    var delegate: AATNativePlacementDelegate? { get set }

    /// Sets the placement statistics delegate
    var statisticsDelegate: AATStatisticsDelegate? { get set }

    /// Sets the placement impression delegate
    var impressionDelegate: AATImpressionDelegate? { get set }

    /// Requests placement reload.
    ///
    func reload() -> Bool

    /// Returns how many ads are currently loading for given native ad placement.
    /// - Returns: Number of ads that are currently loading for given placement.
    func getNumberOfCurrentlyLoadingNativeAds() -> Int

    /// Returns true if there is an ad loaded.
    /// - Returns: True if there is an ad loaded.
    func hasAd() -> Bool

    /// Manually Count an Ad Space
    func reportAdSpace() -> Bool

    /// Returns the instance of native ad for given native ad placement.
    /// - Returns: Native ad instance if it is loaded for given placement, null otherwise.
    func getNativeAd() -> AATNativeAdData?

    /// Sets the targeting information for the placement
    ///
    /// Information provided for placement overrides targeting information overrides targeting information for application set by the ``AATSDK/setTargetingInfo(info:)``
    var targetingInfo: [String : [String]]? { get set }

    /// Sets the content targeting url for the placement.
    ///
    /// Information provided for placement overrides targeting information for application set by the ``AATSDK/setContentTargetingUrl(targetingUrl:)``
    var contentTargetingUrl: String? { get set }

    /// Checks if the frequency cap has been reached.
    /// - Returns: true if the frequency cap has been reached.
    func isFrequencyCapReached() -> Bool
}

Last updated