Beruflich Dokumente
Kultur Dokumente
#import <Foundation/Foundation.h>
#import "HeyzapAds.h"
#import "HZShowOptions.h"
@class HZShowOptions;
@protocol HZAdsDelegate;
/** HZVideoAd is responsible for fetching and showing video ads. All methods on
this class must be called from the main queue. */
@interface HZVideoAd : NSObject
+ (void)setDelegate:(id<HZAdsDelegate>)delegate;
/**
* Shows a video ad for a given tag, if available.
*
* @param tag An identifier for the location of the ad which you can use to
disable the ad from your dashboard.
*/
+ (void) showForTag: (NSString *) tag;
/**
* Shows a video for a given tag, if available.
*
* @param tag An identifier for the location of the ad which you can use to
disable the ad from your dashboard.
* @param completion A block called when the video is shown or fails to show.
`result` states whether the show was sucessful; the error object describes the
issue, if there was one.
*/
+ (void) showForTag:(NSString *)tag completion:(void (^)(BOOL result, NSError
*error))completion;
/**
* Fetches a video ad from Heyzap.
*/
+ (void) fetch;
/**
* Fetches a video ad from Heyzap.
*
* @param completion A block called when the video is fetched or fails to fetch.
`result` states whether the fetch was sucessful; the error object describes the
issue, if there was one.
*/
+ (void) fetchWithCompletion: (void (^)(BOOL result, NSError *error))completion;
/**
* Fetches a new ad for the given tag.
*
* @param tag An identifier for the location of the ad which you can use to
disable the ad from your dashboard.
* @param completion A block called when the video is fetched or fails to fetch.
`result` states whether the fetch was sucessful; the error object describes the
issue, if there was one.
*
*/
+ (void) fetchForTag:(NSString *)tag withCompletion: (void (^)(BOOL result, NSError
*error))completion;
/**
* Fetches a video ad for each of the given tags.
*
* @param tags An NSArray of NSString* identifiers for the location of ads which
you can use to disable ads from your dashboard.
*/
+ (void) fetchForTags:(NSArray *)tags;
/**
* Fetches a video ad for each of the given tags with an optional completion
handler.
*
* @param tag An NSArray of NSString* identifiers for the location of ads
which you can use to disable ads from your dashboard.
* @param completion A block called when an ad for each tag is fetched or fails to
fetch. `result` states whether the fetch was sucessful; the error object describes
the issue, if there was one.
*/
+ (void) fetchForTags:(NSArray *)tags withCompletion:(void (^)(BOOL result, NSError
*error))completion;
/**
* Whether or not a video ad is ready to show.
*
* @return If a video is ready to show.
*/
+ (BOOL) isAvailable;
/**
* Whether or not a video is ready to show for the given tag.
*
* @param tag An identifier for the location of the ad which you can use to
disable the ad from your dashboard.
*
* @return Whether or not a video is ready to show for the given tag.
*/
+ (BOOL) isAvailableForTag: (NSString *) tag;
@end