AATInfeedBannerPlacement
@objc public protocol AATInfeedBannerPlacement {
typealias AATRequestCompletion = ((_ view: AATBannerPlacementWrapperView?, _ error: AATBannerRequestError?) -> Void)
/// Set the placement delegate that will listen to ad loading and display events
var delegate: AATInfeedBannerPlacementDelegate? { get set }
/// Set the placement statistics delegate
var statisticsDelegate: AATStatisticsDelegate? { get set }
/// Set the placement impression delegate
var impressionDelegate: AATImpressionDelegate? { get set }
/// Sets the placement collapsible banner options
var collapsableBannerOptions: AATCollapsibleBannerOptions? { get set }
/// Request banner ad from the placement
/// - Parameters:
/// - request: the ``AATBannerRequest`` to be used
/// - completion: Completion result with ``AATBannerPlacementWrapperView`` or ``AATBannerRequestError``
func requestAd(request: AATBannerRequest, completion: @escaping AATRequestCompletion)
/// Cancel a specific ``AATBannerRequest``
/// - Parameter request: The request to be canceled
func cancel(request: AATBannerRequest)
/// Manually Count an Ad Space
func countAdSpace()
/// Enable saving creative history
/// - Parameter size: The max size of the history to be saved
func enableCreativeHistory(size: Int)
/// Get the saved creative history
/// - Parameter completion: Completion block with the creative history
func getCreativeHistory(completion: @escaping ([AATPlacementHistoryInfo]) -> Void)
}
@protocol AATInfeedBannerPlacement <AATPlacement>
/// Set the placement delegate that will listen to ad loading and display events
@property (nonatomic, strong) id <AATInfeedBannerPlacementDelegate> _Nullable delegate;
/// Sets the placement statistics delegate
@property (nonatomic, strong) id <AATStatisticsDelegate> _Nullable statisticsDelegate;
/// Sets the placement impression delegate
@property (nonatomic, strong) id <AATImpressionDelegate> _Nullable impressionDelegate;
/// Sets the placement collapsible banner options
@property (nonatomic, strong) AATCollapsibleBannerOptions * _Nullable collapsableBannerOptions;
/// Request banner ad from the placement
/// \param request the <code>AATBannerRequest</code> to be used
///
/// \param completion Completion result with <code>AATBannerPlacementWrapperView</code> or <code>AATBannerRequestError</code>
///
- (void)requestAdWithRequest:(AATBannerRequest * _Nonnull)request completion:(void (^ _Nonnull)(AATBannerPlacementWrapperView * _Nullable, AATBannerRequestError * _Nullable))completion;
/// Cancel a specific <code>AATBannerRequest</code>
/// \param request The request to be canceled
///
- (void)cancelWithRequest:(AATBannerRequest * _Nonnull)request;
/// Manually Count an Ad Space
- (void)countAdSpace;
/// Enable saving creative history
/// \param size The max size of the history to be saved
///
- (void)enableCreativeHistoryWithSize:(NSInteger)size;
/// Get the saved creative history
/// \param completion Completion block with the creative history
///
- (void)getCreativeHistoryWithCompletion:(void (^ _Nonnull)(NSArray<AATPlacementHistoryInfo *> * _Nonnull))completion;
@end
Last updated