creative

package
v1.2.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2021 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package creative 广告创意模块API models

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommerceCard

type CommerceCard struct {
	// Title 产品卖点
	Title string `json:"title,omitempty"`
	// Source 产品名称
	Source string `json:"source,omitempty"`
	// ImageInfo 素材信息
	ImageInfo *struct {
		// Width 宽度
		Width int `json:'width,omitempty'`
		// Height 高度
		Height int `json:"height,omitempty"`
		// WebUri 直播卡片图片信息
		WebUri string `json:'web_uri,omitempty'`
	} `json:"image_info,omitempty"`
}

CommerceCard 产品(商业卡)信息

type Creative

type Creative struct {
	// CreativeID 创意ID
	CreativeID uint64 `json:"creative_id,omitempty"`
	// AdID 广告计划ID
	AdID uint64 `json:"ad_id,omitempty"`
	// AdvertiserID 广告主ID
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// Title 创意素材标题
	Title string `json:"title,omitempty"`
	// CreativeWordIDs 动态词包列表
	CreativeWordIDs []uint64 `json:"creative_word_ids,omitempty"`
	// Status 创意素材状态
	Status enum.CreativeStatus `json:"status,omitempty"`
	// OpStatus 创意素材操作状态
	OpStatus enum.CreativeOpStatus `json:"op_status,omitempty"`
	// ImageMode 创意素材类型
	ImageMode enum.ImageMode `json:"image_mode,omitempty"`
	// ImageIDs 图片素材,图片ID列表
	ImageIDs []string `json:"image_ids,omitempty"`
	// ImageID 视频素材,封面图片ID
	ImageID string `json:"image_id,omitempty"`
	// VideoID 视频素材,视频ID
	VideoID string `json:"video_id,omitempty"`
	// PlayableInfo 基础试玩素材信息,使用基础试玩素材时返回
	PlayableInfo *PlayableInfo `json:"playable_info,omitempty"`
	// DerivePosterCID 是否将视频的封面和标题同步到图片创意,1为开启,0为不开启。视频素材时返
	DerivePosterCID int `json:"derive_poster_cid,omitempty"`
	// ThirdPartyID 第三方ID
	ThirdPartyID string `json:"third_party_id,omitempty"`
	// DpaDictIDs DPA词包ID列表,针对DPA广告
	DpaDictIDs []uint64 `json:"dpa_dict_ids,omitempty"`
	// TemplateID DPA模板ID,针对DPA广告
	TemplateID uint64 `json:"template_id,omitempty"`
	// TemplateImageID DPA创意实际显示的图片ID,针对DPA广告
	TemplateImageID string `json:"template_image_id,omitempty"`
	// DpaTemplate 是否使用商品库视频模板,针对DPA广告
	DpaTemplate uint64 `json:"dpa_template,omitempty"`
	// DpaVideoTempateType 商品库视频模板生成类型,针对DPA广告
	DpaVideoTempateType string `json:"dpa_video_template_type,omitempty"`
	// DpaVideoTaskIDs 自定义商品库视频模板ID,针对DPA广告
	DpaVideoTaskIDs []string `json:"dpa_video_task_ids,omitempty"`
	// ComponentInfo 创意组件信息
	ComponentInfo []struct {
		// ComponentID 创意组件id
		ComponentID string `json:"component_id,omitempty"`
	} `json:"component_info,omitempty"`
	// Materials 素材信息列表,标题,图片,视频均是不同素材,注意部分老数据可能此结构为空
	Materials []Material `json:"materials,omitempty"`
	// CreativeCreateTime 广告创意创建时间,格式yyyy-MM-dd HH:mm:ss
	CreativeCreateTime string `json:"creative_create_time,omitempty"`
	// CreativeModifyTime 广告创意更新时间,格式yyyy-MM-dd HH:mm:ss
	CreativeModifyTime string `json:"creative_modity_time,omitempty"`
}

Creative 创意

type CreativeDetail

type CreativeDetail struct {
	// AdID 广告计划ID
	AdID uint64 `json:"ad_id,omitempty"`
	// AdvertiserID 广告主ID
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// ModifyTime 时间戳,用于判断创意版本
	ModifyTime string `json:"modify_time,omitempty"`
	// InventoryType 创意首选投放位置,详见【附录-首选投放位置】,请注意广告位中的信息流(INVENTORY_FEED)与详情页(INVENTORY_TEXT_LINK)已合并为头条系(依然使用INVENTORY_FEED字段,名称更改为头条系)
	InventoryType []enum.StatInventoryType `json:"inventory_type,omitempty"`
	// ExternalUrl 落地页链接,新版营销链路下创意支持
	ExternalUrl string `json:"external_url,omitempty"`
	// AdDownloadStatus 允许客户端下载视频功能,0为开启,即允许客户端下载视频;1为关闭,即不允许客户端下载视频,该字段为空与0效果一致,即表示允许客户端下载视频。关闭客户端下载视频功能仅对本地上传的视频有效
	AdDownloadStatus int `json:"ad_download_status,omitempty"`
	// SmartInventory 是否使用优选广告位,0表示不使用优选,1表示使用,2表示标记该创意隶属的计划投放范围是通投智选
	SmartInventory int `json:"smart_inventory,omitempty"`
	// ComponentInfo 创意组件信息
	ComponentInfo []struct {
		// ComponentID 创意组件id
		ComponentID string `json:"component_id,omitempty"`
	} `json:"component_info,omitempty"`
	// SceneInventory 首选场景广告位,详见【附录-首选场景广告位】,使用首选场景广告位时默认忽略inventory_type字段,与scene_inventory不能同时传 允许值: "VIDEO_SCENE", "FEED_SCENE", "TAIL_SCENE"
	SceneInventory string `json:"scene_inventory,omitempty"`
	// CreativeMaterialMode 创意类型,该字段为STATIC_ASSEMBLE表示程序化创意,其他情况无该字段
	CreativeMaterialMode string `json:"creative_material_mode,omitempty"`
	// ProceduralPackageID 程序化创意包ID
	ProceduralPackageID uint64 `json:"procedural_package_id,omitempty"`
	// ProceduralPackageVersion 程序化创意包版本
	ProceduralPackageVersion uint64 `json:"procedural_package_version,omitempty"`
	// IsPresentedVideo 启用图片生成视频,允许值:0(不启用),1(启用)
	IsPresentedVideo int `json:"is_presented_video,omitempty"`
	// GenerateDerivedAd 是否开启衍生计划,1为开启,0为不开启
	GeneratedDerivedAd string `json:"generated_derived_ad,omitempty"`
	// ImageList 素材信息,程序化创意素材列表。最多包含12张图和6个视频。
	ImageList []struct {
		// ImageMode 素材类型
		ImageMode enum.ImageMode `json:"image_mode,omitempty"`
		// ImageID 视频图片ID
		ImageID string `json:"image_id,omitempty"`
		// VideoID 视频ID
		VideoID string `json:"video_id,omitempty"`
		// ImageIDs 图片ID列表
		ImageIDs []string `json:"image_ids,omitempty"`
		// TemplateIDs 模版ID列表
		TemplateIDs []uint64 `json:"template_ids,omitempty"`
	} `json:"image_list,omitempty"`
	// TitleList 标题信息,程序化创意标题列表。最多包含10个标题
	TitleList []struct {
		// Title 创意标题
		Title string `json:"title,omitempty"`
		// CreativeWordIDs 动态词包ID,可使用动态词包查询接口查询数据
		CreativeWordIDs []uint64 `json:"creative_word_ids,omitempty"`
		// DpaWordIDs DPA词包ID列表,针对DPA广告
		DpaWordIDs []uint64 `json:"dpa_word_ids,omitempty"`
	} `json:"title_list,omitempty"`
	// Creatives 素材信息, 首选投放位置和创意类型决定素材规格。程序化创意只有在审核通过后才有值
	Creatives []Creative `json:"creative,omitempty"`
	// Source 广告来源
	Source string `json:"source,omitempty"`
	// IesCoreUserID 广告主绑定的抖音ID
	IesCoreUserID string `json:"ies_core_user_id,omitempty"`
	// IsFeedAndFavSee 是否隐藏抖音主页,0:不隐藏,1:隐藏
	IsFeedAndFavSee int `json:"is_feed_and_fav_see,omitempty"`
	// CreativeAutoGenerateSwitch 是否开启自动生成素材,delivery_range为UNIVERSAL:通投智选时返回,0:不启用,1:启用
	CreativeAutoGenerateSwitch int `json:"creative_auto_generate_switch,omitempty"`
	// AppName 应用名
	AppName string `json:"app_name,omitempty"`
	// SubTitle APP 副标题。
	SubTitle string `json:"sub_title,omitempty"`
	// WebUrl Android应用下载详情页
	WebUrl string `json:"web_url,omitempty"`
	// ActionText 行动号召
	ActionText string `json:"action_text,omitempty"`
	// PlayableUrl 试玩素材URL
	PlayableUrl string `json:"playable_url,omitempty"`
	// IsCommentDisable 是否关闭评论
	IsCommentDisable int `json:"is_comment_disable,omitempty"`
	// CloseVideoDetail 是否关闭视频详情页落地页(勾选该选项后,视频详情页中不默认弹出落地页,仅对视频广告生效)
	CloseVideoDetail int `json:"close_video_detail,omitempty"`
	// CreativeDisplayMode 创意展现方式
	CreativeDisplayMode enum.CreativeDisplayMode `json:"creative_display_mode,omitempty"`
	// AdvancedCreativeType 附加创意类型
	AdvancedCreativeType string `json:"advanced_creative_type,omitempty"`
	// AdvancedCreativeTitle 附加创意副标题
	AdvancedCreativeTitle string `json:"advanced_creative_title,omitempty"`
	// PhoneNumber 电话号码(当附加创意类型为ATTACHED_CREATIVE_PHONE时返回)
	PhoneNumber string `json:"phone_number,omitempty"`
	// ButtonText 按钮文本(当附加创意类型不为ATTACHED_CREATIVE_NONE时返回)
	ButtonText string `json:"button_text,omitempty"`
	// FormUrl 表单提交链接(当附加创意类型为ATTACHED_CREATIVE_FORM时返回)
	FormUrl string `json:"form_url,omitempty"`
	// CommmerceCards 产品(商业卡)信息。如果没有启用,那么不返回相关字段。
	CommerceCards []CommerceCard `json:"commerce_cards,omitempty"`
	// ThirdIndustryID 三级行业ID
	ThirdIndustryID uint64 `json:"third_industry_id,omitempty"`
	// AdKeywords 创意标签
	AdKeywords []string `json:"ad_keywords,omitempty"`
	// TrackUrl 展示(监测链接)
	TrackUrl string `json:"track_url,omitempty"`
	// ActionTrackUrl 点击(监测链接)(当推广目的为应用下载且创建计划传递了convert_id,系统会自动获取转化中的点击监测链接,且不可修改)
	ActionTrackUrl string `json:"action_track_url,omitempty"`
	// VideoPlayEffectTrackUrl 视频有效播放(监测链接)
	VideoPlayEffectTrackUrl []string `json:"video_play_effect_track_url,omitempty"`
	// VideoPlayDoneTrackUrl 视频播完(监测链接)
	VideoPlayDoneTrackUrl []string `json:"video_play_done_track_url,omitempty"`
	// VideoPlayTrackUrl 视频播放(监测链接)
	VideoPlayTrackUrl []string `json:"video_play_track_url,omitempty"`
	// TrackUrlSendType 数据发送方式; 允许值: SERVER_SEND(服务器端上传), CLIENT_SEND(客户端上传)
	TrackUrlSendType string `json:"track_url_send_type,omitempty"`
	// PromotionCard 商品推广卡片
	PromotionCard *PromotionCard `json:"promotion_card,omitempty"`
	// CollocationType 云游戏类型,允许值"CLOUD_GAME"云游戏
	CollocationType string `json:"collocation_type,omitempty"`
	// Supplements 云游戏素材
	Supplements []Supplement `json:'supplements,omitempty'`
}

CreativeDetail 创意详情

type GetFiltering

type GetFiltering struct {
	// CampaignID 按照campaign_id过滤
	CampaignID uint64 `json:"campaign_id,omitempty"`
	// AdID 按照ad_id过滤
	AdID uint64 `json:"ad_id,omitempty"`
	// CreativeIDs 按照creative_id过滤,最多传100个。创意ID需属于当前广告主,否则会报错
	CreativeIDs []uint64 `json:"creative_ids,omitempty"`
	// LandingType 按照广告组推广目的过滤
	LandingType enum.LandingType `json:"landing_type,omitempty"`
	// Pricing 按照广告计划出价方式过滤
	Pricing enum.PricingType `json:"pricing,omitempty"`
	// Status 按照创意状态过滤,默认为返回“所有不包含已删除”,如果要返回所有包含已删除有对应枚举表示
	Status enum.CreativeStatus `json:"status,omitempty"`
	// ImageMode 按照创意素材类型过滤
	ImageMode enum.ImageMode `json:"image_mode,omitempty"`
	// CreativeCreateTime 广告创意创建时间,格式yyyy-MM-dd,表示过滤出当天创建的广告创意
	CreativeCreateTime string `json:"creative_create_time,omitempty"`
	// CreativeModifyTime 广告创意更新时间,格式yyyy-MM-dd,表示过滤出当天更新的广告创意
	CreativeModifyTime string `json:"creative_modify_time,omitempty"`
}

GetFiltering 过滤条件

type GetRequest

type GetRequest struct {
	// AdvertiserID 广告主ID
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// Filtering 过滤条件
	Filtering *GetFiltering `json:"filtering,omitempty"`
	// Fields 查询字段集合, 如果指定, 则返回结果数组中, 每个元素是包含所查询字段的字典,默认全部指定
	// 允许值: "creative_id", "ad_id", "advertiser_id", "status","opt_status", "image_mode", "title", "creative_word_ids","third_party_id", "image_ids", "image_id", "video_id","materials"
	Fields []string `json:"fields,omitempty"`
	// Page 页数默认值: 1
	Page int `json:"page,omitempty"`
	// PageSize 页面大小默认值: 10,大小上限1000
	PageSize int `json:"page_size,omitempty"`
}

GetRequest 获取创意列表 API Request

func (GetRequest) Encode

func (r GetRequest) Encode() string

Encode implement GetRequest interface

type GetResponse

type GetResponse struct {
	model.BaseResponse
	// Data json返回值
	Data *GetResponseData `json:"data,omitempty"`
}

GetResponse 获取创意列表 API Response

type GetResponseData

type GetResponseData struct {
	// List Creative数组
	List []Creative `json:"list,omitempty"`
	// PageInfo 分页信息
	PageInfo *model.PageInfo `json:"page_info,omitempty"`
}

GetResponseData json返回值

type Material

type Material struct {
	// ID 创意ID
	ID string `json:"id,omitempty"`
	// AdID 广告计划ID
	AdID string `json:"ad_id,omitempty"`
	// AdvertiserID 广告主ID
	AdvertiserID string `json:"advertiser_id,omitempty"`
	// Title 创意素材标题
	Title string `json:"title,omitempty"`
	// Status 创意状态
	Status enum.CreativeStatus `json:"status,omitempty"`
	// OpStatus 创意操作状态
	OpStatus enum.CreativeOpStatus `json:"op_status,omitempty"`
	// ImageMode 创意类型
	ImageMode enum.ImageMode `json:"image_mode,omitempty"`
	// ImageInfo 图片素材信息
	ImageInfo []struct {
		// Url 图片链接
		Url string `json:"url,omitempty"`
		// Width 图片宽度
		Width int `json:"width,omitempty"`
		// Height 图片高度
		Height int `json:"height,omitempty"`
	} `json:"image_info,omitempty"`
	// ImageID 视频素材封面
	ImageID string `json:"image_id,omitempty"`
	// VideoID 视频ID
	VideoID string `json:"video_id,omitempty"`
}

Material 素材信息

type MaterialReadRequest

type MaterialReadRequest struct {
	// AdvertiserID 广告主ID
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// CreativeIDs 创意ID集合,支持最大长度为100。创意ID需属于当前广告主,否则会报错
	CreativeIDs []uint64 `json:"creative_ids,omitempty"`
	// Fields 查询字段集合, 默认查询所有字段。详见下方response字段定义; 允许值: "id", "ad_id", "advertiser_id", "title", "image_info","image_mode", "opt_status"
	Fields []string `json:"fields,omitempty"`
}

MaterialReadRequest 创意素材信息

func (MaterialReadRequest) Encode

func (r MaterialReadRequest) Encode() string

Encode implement GetRequest interface

type MaterialReadResponse

type MaterialReadResponse struct {
	model.BaseResponse
	// Data json返回值
	Data []Material `json:"data,omitempty"`
}

MaterialReadResponse 创意素材信息 API Response

type PlayableInfo

type PlayableInfo struct {
	// PlayableUrlBasic 基础试玩素材url
	PlayableUrlBasic string `json:"playable_url_basic,omitempty"`
	// PlayableOrientation 基础试玩素材方向
	PlayableOrientation enum.PlayableOrientation `json:"playable_orientation,omitempty"`
	// PreviewUrl 基础试玩素材预览图
	PreviewUrl string `json:"preview_url,omitempty"`
}

PlayableInfo 基础试玩素材信息,使用基础试玩素材时返回

type PromotionCard

type PromotionCard struct {
	// EnableStorePack 是否使用门店包,true为使用,false为不使用,推广目的非门店推广时会忽略该字段。若选择使用,则卡片标题为最近门店名称
	EnableStorePack bool `json:"enable_store_pack,omitempty"`
	// ProductSellingPoints 商品卖点,对应广告投放平台的推荐卖点
	ProductSellingPoints []string `json:"product_selling_points,omitempty"`
	// ProductDescription 商品描述
	ProductDescription string `json:"product_description,omitempty"`
	// CallToAction 行动号召
	CallToAction string `json:"call_to_action,omitempty"`
	// EnablePersonalAction 是否使用智能优选,true为使用,false为不使用
	EnablePersonalAction bool `json:"enable_personal_action,omitempty"`
	// ProductImageID 商品图片ID,对应广告投放平台的推广卡片主图
	ProductImageID string `json:"product_image_id,omitempty"`
}

PromotionCard 商品推广卡片

type ReadRequest

type ReadRequest struct {
	// AdvertiserID 广告主ID
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// AdID 计划ID
	AdID uint64 `json:"ad_id,omitempty"`
}

ReadRequest 创意详细信息API Request

func (ReadRequest) Encode

func (r ReadRequest) Encode() string

Encode implement GetRequest interface

type ReadResponse

type ReadResponse struct {
	model.BaseResponse
	// Data json返回值
	Data *CreativeDetail `json:"data,omitempty"`
}

ReadResponse 创意详细信息API Response

type Supplement

type Supplement struct {
	// GameID 云游戏id
	GameID string `json:"game_id,omitempty"`
	// Orientation 云游戏横竖屏,"VERTICAL"竖屏, "HORIZONTAL"横屏
	Orientation string `json:"orientation,omitempty"`
}

Supplement 云游戏素材

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL