Class Info |
|---|
public static final class AdParam.Builder extends Object 广告请求构造器。 |
Qualifier and Type | Method Name and Description |
|---|---|
build() 构造AdParam广告请求对象。 | |
AdParam.Builder | setAdContentClassification(String adContentClassification) 设置广告内容的分级上限。 |
AdParam.Builder | setAppCountry(String appCountry) 设置媒体希望返回的广告的语言所在国家/地区码。 |
AdParam.Builder | setAppLang(String appLang) 设置媒体希望返回的广告的语言。 |
AdParam.Builder | setBelongCountryCode(String countryCode) 设置媒体所属国家/地区码。 |
AdParam.Builder | setContentBundle(String contentBundle) 设置上下文内容。 |
AdParam.Builder | setConsent(String consent) 设置TCF v2.0用户同意信息字符串。 |
AdParam.Builder | setDetailedCreativeTypeList(List<Integer> detailedCreativeTypeList) 设置原生广告请求的创意类型。 |
AdParam.Builder | setGender(int gender) 设置性别。 |
AdParam.Builder | setHwNonPersonalizedAd(Integer hwNonPersonalizedAd) 设置是否请求华为DSP非个性化广告的设置。 |
AdParam.Builder | setLocation(Location location) 设置媒体传入的位置信息。 |
AdParam.Builder | setNonPersonalizedAd(Integer nonPersonalizedAd) 设置是否请求个性化广告。 |
AdParam.Builder | setRequestLocation(boolean requestLocation) 设置请求时是否携带位置信息,默认携带。 |
AdParam.Builder | setTagForChildProtection(Integer tagForChildProtection) 设置是否面向儿童广告隐私保护。 |
AdParam.Builder | setTagForUnderAgeOfPromise(Integer tagForUnderAgeOfPromise) 设置根据年龄进行广告请求,是否满足法律承诺的年龄。 |
AdParam.Builder | setThirdNonPersonalizedAd(Integer thirdNonPersonalizedAd) 设置是否请求三方DSP非个性化广告的设置。 |
AdParam.Builder | setIsQueryUseEnabled(Integer isQueryUseEnabled) 设置是否允许使用搜索词。 |
AdParam.Builder | setTMax(Integer tMax) 设置交易的最大超时时间(包含网络延迟)单位毫秒。 |
AdParam.Builder | setCur(List<String> curs) 设置交易请求的币种列表。 |
AdParam.Builder | addBiddingParamMap(String slotId, BiddingParam biddingParam) 设置实时bidding广告位相关参数。 |
AdParam.Builder | setBiddingParamMap(Map<String, BiddingParam> biddingParamMap) 设置实时bidding广告位相关参数。 |
AdParam.Builder | setSupportTemplate (Boolean support) 设置支持模板广告。 |
Method |
|---|
public final AdParam.Builder setAdContentClassification(String adContentClassification) 设置广告内容的分级上限。 |
Parameters
Name | Description |
|---|---|
adContentClassification | 广告内容的分级上限,有效值为: |
Returns
Type | Description |
|---|---|
AdParam.Builder | 返回AdParam的构造器。 |
Method |
|---|
public final AdParam.Builder setAppCountry(String appCountry) 设置媒体希望返回的广告的语言所在国家/地区码。 |
Parameters
Name | Description |
|---|---|
appCountry | 希望返回的广告的语言所在国家/地区码。 |
Returns
Type | Description |
|---|---|
AdParam.Builder | 返回AdParam的构造器。 |
Method |
|---|
public final AdParam.Builder setAppLang(String appLang) 设置媒体希望返回的广告的语言。 |
Parameters
Name | Description |
|---|---|
appLang | 希望返回的广告的语言。 |
Returns
Type | Description |
|---|---|
AdParam.Builder | 返回AdParam的构造器。 |
Method |
|---|
public final AdParam.Builder setBelongCountryCode(String countryCode) 设置媒体所属国家/地区码。 |
Parameters
Name | Description |
|---|---|
countryCode | 媒体所在的国家/地区码。 |
Returns
Type | Description |
|---|---|
AdParam.Builder | 返回AdParam的构造器。 |
Method |
|---|
public final AdParam.Builder setContentBundle(String contentBundle) 设置上下文内容。 |
Parameters
Name | Description |
|---|---|
contentBundle | 上下文内容,使用满足JSON格式的String类型数据。
|
Key | Description and Value |
|---|---|
channelCategoryCode | 频道名称。例如:剧集。 |
title | 内容的标题。例如:西游记。 |
tags | 当前正在播放的内容标签。例如:神魔。 |
relatedPeople | 内容涉及的人员名字(导演,明星……)。例如:张三。 |
content | 内容简介。例如:该剧讲述了师徒四人西天取经…… |
contentID | 当前正在播放的内容在媒体内的ID。例如:132123。 |
category | 一级分类。例如:经典剧场。 |
subcategory | 二级分类。例如:古装。 说明: 该参数传入服务端时可为空。 |
thirdCategory | 三级分类。例如:悬疑。 |
示例如下:
{"channelCategoryCode":["剧集"],"title":["西游记"],"tags":["神魔","冒险"],"relatedPeople":["张三"],"content":["该剧讲述了师徒四人西天取经……"],"contentID":["123123"],"category":["经典剧场"],"subcategory":["古装"],"thirdCategory":["悬疑"]} |
Returns
Type | Description |
|---|---|
AdParam.Builder | 返回AdParam的构造器。 |
Method |
|---|
public final AdParam.Builder setConsent(String consent) 设置TCF v2.0用户同意信息字符串。 |
Parameters
Name | Description |
|---|---|
consent | TCF v2.0用户同意信息字符串,遵循IAB TCF v2.0标准中的Consent String Format格式。 |
Returns
Type | Description |
|---|---|
AdParam.Builder | 返回AdParam的构造器。 |
Method |
|---|
public final AdParam.Builder setDetailedCreativeTypeList(List<Integer> detailedCreativeTypeList) 设置原生广告请求的创意类型。 |
Parameters
Name | Description |
|---|---|
detailedCreativeTypeList | 原生广告请求的创意类型。支持的创意类型请参见DetailedCreativeType。 |
Returns
Type | Description |
|---|---|
AdParam.Builder | 返回AdParam的构造器。 |
Method |
|---|
public final AdParam.Builder setGender(int gender) 设置性别。 |
Parameters
Name | Description |
|---|---|
gender |
Returns
Type | Description |
|---|---|
AdParam.Builder | 返回AdParam的构造器。 |
Method |
|---|
public final AdParam.Builder setHwNonPersonalizedAd(Integer hwNonPersonalizedAd) 设置是否请求华为DSP非个性化广告的设置。 |
Parameters
Name | Description |
|---|---|
hwNonPersonalizedAd | 请求华为DSP非个性化广告的设置,有效值为: |
Returns
Type | Description |
|---|---|
AdParam.Builder | 返回AdParam的构造器。 |
Method |
|---|
public final AdParam.Builder setLocation(Location location) 设置媒体传入的位置信息。 |
Parameters
Name | Description |
|---|---|
location | 媒体传入的位置信息。 |
Returns
Type | Description |
|---|---|
AdParam.Builder | 返回AdParam的构造器。 |
Method |
|---|
public final AdParam.Builder setNonPersonalizedAd(Integer nonPersonalizedAd) 设置是否请求个性化广告。 |
Parameters
Name | Description |
|---|---|
nonPersonalizedAd | 有效值为: |
Returns
Type | Description |
|---|---|
AdParam.Builder | 返回AdParam的构造器。 |
Method |
|---|
public final AdParam.Builder setRequestLocation(boolean requestLocation) 设置请求时是否携带位置信息,默认携带。 |
Parameters
Name | Description |
|---|---|
requestLocation | 请求时是否携带位置信息:
默认值为true。 |
Returns
Type | Description |
|---|---|
AdParam.Builder | 返回AdParam的构造器。 |
Method |
|---|
public final AdParam.Builder setTagForChildProtection(Integer tagForChildProtection) 设置是否面向儿童广告隐私保护。 |
Parameters
Name | Description |
|---|---|
tagForChildProtection | 儿童保护标签,有效值为: |
Returns
Type | Description |
|---|---|
AdParam.Builder | 返回AdParam的构造器。 |
Method |
|---|
public final AdParam.Builder setTagForUnderAgeOfPromise(Integer tagForUnderAgeOfPromise) 设置根据年龄进行广告请求,是否满足法律承诺的年龄。 |
Parameters
Name | Description |
|---|---|
tagForUnderAgeOfPromise | 未达到法定承诺年龄用户的设置,有效值为: |
Returns
Type | Description |
|---|---|
AdParam.Builder | 返回AdParam的构造器。 |
Method |
|---|
public final AdParam.Builder setThirdNonPersonalizedAd(Integer thirdNonPersonalizedAd) 设置是否请求三方DSP非个性化广告的设置。 |
Parameters
Name | Description |
|---|---|
thirdNonPersonalizedAd | 请求三方DSP非个性化广告的设置,有效值为: |
Returns
Type | Description |
|---|---|
AdParam.Builder | 返回AdParam的构造器。 |
Method |
|---|
public final AdParam.Builder setIsQueryUseEnabled(Integer isQueryUseEnabled) 设置是否允许使用搜索词。 |
Parameters
Name | Description |
|---|---|
IsQueryUseEnabled | 是否允许使用搜索词,有效值为:
|
Returns
Type | Description |
|---|---|
AdParam.Builder | 返回AdParam的构造器。 |
Method |
|---|
public AdParam.Builder setTMax (Integer tMax) 设置交易的最大超时时间(包含网络延迟)单位毫秒。 |
Parameters
Name | Description |
|---|---|
tMax | 交易的最大超时时间(包含网络延迟)单位毫秒。 |
Returns
Type | Description |
|---|---|
AdParam.Builder | 返回AdParam的构造器。 |
Method |
|---|
public AdParam.Builder setCur(List<String> curs) 设置实时bidding广告位竞价的币种。 |
Parameters
Name | Description |
|---|---|
curs | 竞价请求支持的币种,是一个List<String>类型。当前支持五种货币:CNY、USD、EUR、GBP、JPY,不填则默认是CNY。 |
Returns
Type | Description |
|---|---|
AdParam.Builder | 返回AdParam的构造器。 |
Method |
|---|
public AdParam.Builder addBiddingParamMap(String slotId, BiddingParam biddingParam) 设置实时bidding广告位相关参数。 |
Parameters
Name | Description |
|---|---|
slotId | 广告位ID,实时bidding参数设置是针对广告位维度设置。 |
biddingParam | BiddingParam对象。 |
Returns
Type | Description |
|---|---|
AdParam.Builder | 返回AdParam的构造器 |
Method |
|---|
public AdParam.Builder setBiddingParamMap(Map<String, BiddingParam > biddingParamMap) 设置实时bidding广告位相关参数。 |
Parameters
Name | Description |
|---|---|
biddingParamMap | 参数类型是个Map,针对广告位维度设置,Map<String, BiddingParam >,key是广告位ID,value是BiddingParam。 |
Returns
Type | Description |
|---|---|
AdParam.Builder | 返回AdParam的构造器 |
Method |
|---|
public AdParam.Builder setSupportTemplate (Boolean support) 设置支持模板广告。 |
Parameters
Name | Description |
|---|---|
support | 参数类型是Boolean,true:开启支持模板广告, false: 不支持模板广告。 |
Returns
Type | Description |
|---|---|
AdParam.Builder | 返回AdParam的构造器 |