ss
Aeline
2020-09-26 6d8742046f04db48591ace087c35cca0228ae009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
//
//  GDTUnifiedNativeAdDataObject.h
//  GDTMobSDK
//
//  Created by nimomeng on 2018/10/10.
//  Copyright © 2018 Tencent. All rights reserved.
//
 
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "GDTVideoConfig.h"
 
typedef NS_ENUM(NSInteger, GDTVastAdEventType) {
    GDTVastAdEventTypeUnknow,
    GDTVastAdEventTypeLoaded,
    GDTVastAdEventTypeStarted,
    GDTVastAdEventTypeFirstQuartile,
    GDTVastAdEventTypeMidPoint,
    GDTVastAdEventTypeThirdQuartile,
    GDTVastAdEventTypeComplete,
    GDTVastAdEventTypeAllAdsComplete,
    GDTVastAdEventTypeExposed,
    GDTVastAdEventTypeClicked,
};
 
 
@interface GDTUnifiedNativeAdDataObject : NSObject 
 
/**
 广告标题
 */
@property (nonatomic, copy, readonly) NSString *title;
 
/**
 广告描述
 */
@property (nonatomic, copy, readonly) NSString *desc;
 
/**
 广告大图Url
 */
@property (nonatomic, copy, readonly) NSString *imageUrl;
 
/**
 素材宽度,单图广告代表大图 imageUrl 宽度、多图广告代表小图 mediaUrlList 宽度
 */
@property (nonatomic, readonly) NSInteger imageWidth;
 
/**
 素材高度,单图广告代表大图 imageUrl 高度、多图广告代表小图 mediaUrlList 高度
 */
@property (nonatomic, readonly) NSInteger imageHeight;
 
/**
 应用类广告App 图标Url
 */
@property (nonatomic, copy, readonly) NSString *iconUrl;
 
/**
 三小图广告的图片Url集合
 */
@property (nonatomic, copy, readonly) NSArray *mediaUrlList;
 
/**
 应用类广告的星级(5星制度)
 */
@property (nonatomic, readonly) CGFloat appRating;
 
/**
 应用类广告的价格
 */
@property (nonatomic, strong, readonly) NSNumber *appPrice;
 
/**
 是否为应用类广告
 */
@property (nonatomic, readonly) BOOL isAppAd;
 
/**
 是否为视频广告
 */
@property (nonatomic, readonly) BOOL isVideoAd;
 
/**
 是否为三小图广告
 */
@property (nonatomic, readonly) BOOL isThreeImgsAd;
 
/**
 返回广告的eCPM,单位:分
 
 @return 成功返回一个大于等于0的值,-1表示无权限或后台出现异常
 */
@property (nonatomic, readonly) NSInteger eCPM;
 
/**
 返回广告的eCPM等级
 
 @return 成功返回一个包含数字的string,@""或nil表示无权限或后台异常
 */
@property (nonatomic, readonly) NSString *eCPMLevel;
 
/**
 广告对应的CTA文案,自定义CTA视图时建议使用此字段
 广告对应的callToAction文案,比如“立即预约”或“电话咨询”, 自定义callToAction视图时建议使用此字段
 
 该字段在部分广告类型中可能为空
 */
@property (nonatomic, readonly) NSString *callToAction;
 
/**
返回广告是否可以跳过,用于做前贴片场景
 
@return YES 表示可跳过、NO 表示不可跳过
*/
@property (nonatomic, readonly) BOOL skippable;
 
/**
 视频广告播放配置
 */
@property (nonatomic, strong) GDTVideoConfig *videoConfig;
 
/**
 * 视频广告时长,单位 ms
 */
@property (nonatomic, readonly) CGFloat duration;
 
/**
 *  VAST Tag Url,可能为空。
 */
@property (nonatomic, copy, readonly) NSString *vastTagUrl;
 
/**
 * VAST Content,可能为空。
 */
@property (nonatomic, copy, readonly) NSString *vastContent;
 
/**
 * 是否为 VAST 广告
 */
@property (nonatomic, assign, readonly) BOOL isVastAd;
 
/**
 判断两个自渲染2.0广告数据是否相等
 
 @param dataObject 需要对比的自渲染2.0广告数据对象
 @return YES or NO
 */
- (BOOL)equalsAdData:(GDTUnifiedNativeAdDataObject *)dataObject;
 
@end