creativecomponent

package
v0.0.0-...-4c075ac Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package creativecomponent 创意组件相关API models

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Button

type Button struct {
	// ButtonType 按钮类型。 0跳转落地页 2显示图片
	ButtonType int `json:"button_type"`
	// ButtonText 按钮文案。长度小于等于24一个中文长度为2
	ButtonText string `json:"button_text,omitempty"`
	// ExternalURL 落地页链接。 可使用橙子建站的链接或第三方的链接 button_type为跳转落地页时候必传
	ExternalURL string `json:"external_url,omitempty"`
	// ResultText 结果文案。 button_type为显示图片时候必传; 长度小于等于24。一个中文长度为2
	ResultText string `json:"result_text,omitempty"`
	// ShowTips 按钮点击后显示文案。button_type为显示图片时候必传。长度小于等于16一个中文长度为2
	ShowTips string `json:"show_tips,omitempty"`
	// ImageID 图片id。尺寸<=472*164px 大小<1M button_type为显示图片时候必传
	ImageID string `json:"image_id,omitempty"`
}

Button 组件按钮

type CardImage

type CardImage struct {
	// ImageURL 卡片正面图片/盲盒素材
	ImageURL string `json:"image_url,omitempty"`
	// HiddenImageURL 卡片反面图片
	HiddenImageURL string `json:"hidden_image_url,omitempty"`
}

CardImage 卡片图片

type ChoiceMagnet

type ChoiceMagnet struct {
	// Title 主标题。长度小于等于24。一个中文长度为2
	Title string `json:"title,omitempty"`
	// SubTitle 副标题。内容长度要求:44 ≤ x ≤60。一个中文长度为2
	SubTitle string `json:"sub_title,omitempty"`
	// ButtonList 按钮列表。长度必须为2
	ButtonList [2]Button `json:"button_list,omitempty"`
}

ChoiceMagnet 选择磁贴的component_data

func (ChoiceMagnet) Type

func (m ChoiceMagnet) Type() enum.ComponentType

Type implement ComponentData interface

type CommerceCard

type CommerceCard struct {
	// StartTime 投放开始时间。格式: "2020-12-01"
	StartTime string `json:"start_time,omitempty"`
	// EndTime 投放结束时间。格式: "2020-12-02" 投放结束时间不能早于开始时间
	EndTime string `json:"end_time,omitempty"`
	// MagnetTitle 磁贴标题。长度最大为10。一个中文长度为1
	MagnetTitle string `json:"magnet_title,omitempty"`
	// Title 文案内容。长度最大为15。一个中文长度为1
	Title string `json:"title,omitempty"`
	// ButtonText 按钮文案。只支持立即下单和立即购买
	ButtonText string `json:"button_text,omitempty"`
	// ImageID 图片id。尺寸<=174:174,大小<1M
	ImageID string `json:"image_id,omitempty"`
	// Name 活动名称。长度最大为15。一个中文长度为2
	Name string `json:"name,omitempty"`
	// CouponAmount 优惠金额(整数的字符串格式)
	CouponAmount string `json:"coupon_amount,omitempty"`
	// CouponCondition 优惠条件。长度最大为16。一个中文长度为2
	CouponCondition string `json:"coupon_condition,omitempty"`
	// EffectiveStartDate 优惠开始时间。格式: "2020-12-01"
	EffectiveStartDate string `json:"effective_start_date,omitempty"`
	// EffectiveEndDate 优惠结束时间。格式: "2020-12-01"
	EffectiveEndDate string `json:"effective_end_date,omitempty"`
	// ShowTime 出现时间类型。1 系统默认,2自定义。不传代表系统默认
	ShowTime int `json:"show_time,omitempty"`
	// Duration 出现时间,单位s。当show_time为自定义时必传,内容长度要求:10 ≤ x ≤59。当show_time为系统默认时,可不传,默认为10
	Duration int64 `json:"duration,omitempty"`
}

CommerceCard 电商磁铁/优惠券磁贴信息

type CommerceMagnet

type CommerceMagnet struct {
	// CommerceCards 电商磁铁信息,长度只能为1
	CommerceCards [1]CommerceCard `json:"commerce_cards,omitempty"`
}

CommerceMagnet 电商磁贴的component_data

func (CommerceMagnet) Type

Type implement ComponentData interface

type ComponentData

type ComponentData interface {
	Type() enum.ComponentType
}

ComponentData 组件详细信息 interface

type ComponentInfo

type ComponentInfo struct {
	// ComponentID 组件ID
	ComponentID model.FlexUint64 `json:"component_id,omitempty"`
	// ComponentType 组件类型
	ComponentType enum.ComponentType `json:"component_type,omitempty"`
	// ComponentName 组件名称。长度小于等于20。一个中文长度为2
	ComponentName string `json:"component_name,omitempty"`
	// ComponentData 组件详细信息。不同的component_type对应的值不同,具体的结构见创建或更新接口定义
	ComponentData ComponentData `json:"component_data,omitempty"`
	// CreateTime 创建时间。格式"2020-12-25 15:12:08"
	CreateTime string `json:"create_time,omitempty"`
	// Status 组件审核状态。
	Status enum.ComponentStatus `json:"status,omitempty"`
}

ComponentInfo 组件信息

func (*ComponentInfo) UnmarshalJSON

func (i *ComponentInfo) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON implement json Unmarshal interface

type CouponInfo

type CouponInfo struct {
	// TItle 优惠标题
	// 字符数≤6
	Title string `json:"title,omitempty"`
	// CouponImage 优惠图片
	CouponImage string `json:"coupon_image,omitempty"`
	// DiscountTime 优惠时间
	DiscountTime string `json:"discount_time,omitempty"`
	// Amount 优惠金额
	// 字符数≤3
	Amount string `json:"amount,omitempty"`
	// Unit 金额单位
	Unit string `json:"unit,omitempty"`
}

CouponInfo 优惠券信息

type CouponMagnet

type CouponMagnet struct {
	// CommerceCards 电商磁铁信息,长度只能为1
	CommerceCards [1]CommerceCard `json:"commerce_cards,omitempty"`
}

CouponMagnet 优惠券磁贴的component_data

func (CouponMagnet) Type

func (m CouponMagnet) Type() enum.ComponentType

Type implement ComponentData interface

type CreateRequest

type CreateRequest struct {
	// AdvertiserID 广告主ID
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// ComponentInfo 组件信息
	ComponentInfo *ComponentInfo `json:"component_info,omitempty"`
}

CreateRequest 创建组件 API Request

func (CreateRequest) Encode

func (r CreateRequest) Encode() []byte

Encode implement Post Request interface

type CreateResponse

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

CreateResponse 创建组件 API Response

type CreateResponseData

type CreateResponseData struct {
	AdvertiserID uint64               `json:"advertiser_id,omitempty"`
	ComponentID  uint64               `json:"component_id,omitempty"`
	CreateTime   string               `json:"create_time,omitempty"`
	ModifyTime   string               `json:"modify_time,omitempty"`
	Status       enum.ComponentStatus `json:"status,omitempty"`
}

CreateResponseData json返回值

type GamePack

type GamePack struct {
	// AppName 应用名称
	AppName string `json:"app_name,omitempty"`
	// PackageName 应用包名
	PackageName string `json:"package_name,omitempty"`
	// AppDownloadURL 应用下载链接
	AppDownloadURL string `json:"app_download_url,omitempty"`
	AppLogo string `json:"app_logo,omitempty"`
	// AppDescription 应用描述。长度最大为30。一个中文长度为2
	AppDescription string `json:"app_description,omitempty"`
	// BatchID 礼包券活动id
	BatchID uint64 `json:"batch_id,omitempty"`
	// AppThumbnails 应用图片ID,可通过【获取图片素材】获取。最多2张图片。建议尺寸:1280 * 720 ≤ 尺寸 ≤ 2560 * 1440
	AppThumbnails []string `json:"app_thumbnails,omitempty"`
}

GamePack 游戏礼包码的component_data

func (GamePack) Type

func (g GamePack) Type() enum.ComponentType

Type implement ComponentData interface

type GetFiltering

type GetFiltering struct {
	// ComponentID 组件ID
	ComponentID uint64 `json:"component_id,omitempty"`
	// ComponentName 组件名称。支持模糊查询
	ComponentName string `json:"component_name,omitempty"`
	// ComponentTypes 组件类型,不传查全部。
	ComponentTypes []enum.ComponentType `json:"component_types,omitempty"`
	// Status 组件审核状态,不传查全部。
	Status []enum.ComponentStatus `json:"status,omitempty"`
}

GetFiltering 过滤条件

type GetRequest

type GetRequest struct {
	AdvertiserID uint64        `json:"advertiser_id,omitempty"`
	Page         int           `json:"page,omitempty"`
	PageSize     int           `json:"page_size,omitempty"`
	Filtering    *GetFiltering `json:"filtering,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     []ComponentInfo `json:"list,omitempty"`
	PageInfo *model.PageInfo `json:"page_info,omitempty"`
}

GetResponseData json返回值

type GiftPackageCode

type GiftPackageCode struct {
	// Code 礼包码
	// 字符数≤12
	Code string `json:"code,omitempty"`
	// Probability 概率
	// 概率和=100
	Probability int `json:"probability,omitempty"`
}

GiftPackageCode 礼包码

type GiftPackageInfo

type GiftPackageInfo struct {
	// CodeList 礼包码列表
	CodeList []GiftPackageCode `json:"code_list,omitempty"`
}

GiftPackageInfo 礼包码信息

type ImageInfo

type ImageInfo struct {
	WebUri string `json:"web_uri,omitempty"`
	Height int    `json:"height,omitempty"`
	Width  int    `json:"width,omitempty"`
}

type ImageMagnet

type ImageMagnet struct {
	// StartTime 投放开始时间。格式: "2020-12-01"
	StartTime string `json:"start_time,omitempty"`
	// EndTime 投放结束时间。格式: "2020-12-02" 投放结束时间不能早于开始时间
	EndTime string `json:"end_time,omitempty"`
	// ImageID 图片id。尺寸<=540*276px ,大小<2M
	ImageID string `json:"image_id,omitempty"`
	// ShowTime 出现时间类型。1 系统默认,2自定义。不传代表系统默认
	ShowTime int `json:"show_time,omitempty"`
	// Duration 出现时间,单位s。当show_time为自定义时必传,内容长度要求:10 ≤ x ≤59。当show_time为系统默认时,可不传,默认为10
	Duration int64 `json:"duration,omitempty"`
}

ImageMagnet 图片磁贴的component_data

func (ImageMagnet) Type

func (m ImageMagnet) Type() enum.ComponentType

Type implement ComponentData interface

type LightInterActive

type LightInterActive struct {
	// StyleType 互动前玩法
	// 枚举值:1-翻卡、2-盲盒、3-翻页、4-擦除、5-刮刮卡
	StyleType int `json:"style_type,omitempty"`
	// ShowSeconds 出现时间
	// 互动组件相对视频的展现时间,建议游戏行业10s,非游戏行业4s。
	// 枚举值:4000-4s、10000-10s
	ShowSeconds int64 `json:"show_seconds,omitempty"`
	// Tips 提示标题
	// 字符数≤10
	Tips string `json:"tips,omitempty"`
	// ImageLIst 卡片图片列表/盲盒图片列表; 长度=1
	ImageList []CardImage `json:"image_list,omitempty"`
	// Title 卖点标题
	// 字符数≤7
	Title string `json:"title,omitempty"`
	// InteractiveType 互动后玩法
	// 枚举值:1-全局优惠、2-礼包码、3-配对、4-单品优惠、5-新人优惠
	InteractiveType int `json:"interactive_type,omitempty"`
	// RewardTips 领取后提示
	// 字符数≤16
	RewardTips string `json:"reward_tips,omitempty"`
	// CouponInfo 优惠券信息
	CouponInfo *CouponInfo `json:"coupon_info,omitempty"`
	// GiftPackageInfo 礼包码信息
	GiftPackageInfo *GiftPackageInfo `json:"gift_package_info,omitempty"`
	// PairInfo 配对信息
	PairInfo *PairInfo `json:"pair_info,omitempty"`
}

LightInterActive 轻互动组件

func (LightInterActive) Type

Type Implement ComponentData interface

type OffsetTimeInfo

type OffsetTimeInfo struct {
	// RewardReduceDuration 抵扣时长。可输入5~25(包含)之间的整数。选填,若不填默认为5秒。
	RewardReduceDuration int64 `json:"reward_reduce_duration,omitempty"`
}

OffsetTimeInfo 抵时长信息。

type PairInfo

type PairInfo struct {
	// BackgroundImage 背景
	BackgroundImage string `json:"background_image,omitempty"`
	// LeftAvatar 左头像
	LeftAvatar string `json:"left_avatar,omitempty"`
	// Title 激励文案
	// 字符数≤16
	Title string `json:"title,omitempty"`
}

PairInfo 配对信息

type ProductCouponInfo

type ProductCouponInfo struct {
	// RewardTips 互动后玩法引导文案(如恭喜抽中商品,下载即可领取)。长度小于等于30,一个中文占2位。
	RewardTips string `json:"reward_tips,omitempty"`
	// ProductImageID 商品图片。要求图片大小在200k以内且尺寸比例为1:1,建议参考尺寸144*144px。
	ProductImageID string `json:"product_image_id,omitempty"`
	// ProductName 商品文案。长度小于等于30,一个中文占2位。
	ProductName string `json:"product_name,omitempty"`
	// AddonText 特殊说明。长度小于等于30,一个中文占2位。
	AddonText string `json:"addon_text,omitempty"`
	// CtaText 按钮文案。枚举值:PREFER_SYSTEM_RECOMMAND-个性化文案、DOWNLOAD_AND_RECEIVE_NOW-立即下载领取、RECEIVE_NOW-立即领取
	CtaText string `json:"cta_text,omitempty"`
}

ProductCouponInfo 商品优惠信息。

type PromotionCard

type PromotionCard struct {
	// ImageID 图片id。建议尺寸:108*108,大小为1M
	ImageID string `json:"image_id,omitempty"`
	// Title 卡片标题。长度最大为20。一个中文长度为1
	Title string `json:"title,omitempty"`
	// ButtonText 行动号召。内容长度要求:2 ≤ x ≤6。一个中文长度为1
	ButtonText string `json:"button_text,omitempty"`
	// ProductSellingPoints 推广卖点。最多选择10个推广卖点 ,内容长度要求:6 ≤ x ≤9 。一个中文长度为1
	ProductSellingPoints []string `json:"product_selling_points,omitempty"`
	// EnablePersonalAction 是否开启智能优选,1-开启、0-不开启
	EnablePersonalAction int         `json:"enable_personal_action,omitempty"`
	ImageInfo            []ImageInfo `json:"image_info,omitempty"`
}

PromotionCard 推广卡片的component_data

func (PromotionCard) Type

func (p PromotionCard) Type() enum.ComponentType

Type implement ComponentData interface

type ReservationButton

type ReservationButton struct {
	// AppDesc 应用描述,长度是1-15个字(两个英文字符占1个字)
	AppDesc string `json:"app_desc,omitempty"`
	// AppIntroduction 应用介绍,长度是1-20个字(两个英文字符占1个字)
	AppIntroduction string `json:"app_introduction,omitempty"`
	// AppThumbnails 应用图片集,图片id,从【素材管理-获取图片素材】接口获取;
	// 如果组件类型component_type是RESERVATION_BUTTON(游戏预约按钮)时必须三个,建议宽高比 9:16
	AppThumbnails []string `json:"app_thumbnails,omitempty"`
	// AppName 应用名称
	AppName string `json:"app_name,omitempty"`
	AppLogo string `json:"app_logo,omitempty"`
	// PackageName 应用包名称
	PackageName string `json:"package_name,omitempty"`
	// DownloadURL 应用下载链接
	// IOS下载链接:需要为iTunes官方地址
	// Android下载链接:需要为「应用管理中心」提供下载链接。
	DownloadURL string `json:"download_url,omitempty"`
}

ReservationButton 游戏预约按钮

func (ReservationButton) Type

Type Implement ComponentData interface

type RewardInfo

type RewardInfo struct {
	// Title 主标题。长度小于等于16,一个中文占2位。
	Title string `json:"title,omitempty"`
	// RewardTips 互动后玩法引导文案(如恭喜获得XX元红包 )。长度小于等于30,一个中文占2位。
	RewardTips string `json:"reward_tips,omitempty"`
	// BonusAmount 奖励物。取值为0.1~1000.0之间的数字,至多保留一位小数。
	BonusAmount float64 `json:"bonus_amount,omitempty"`
	// AddonText 特殊说明,即红包描述文案(如实际金额以APP内为准)。长度小于等于30,一个中文占2位。
	AddonText string `json:"addon_text,omitempty"`
	// CtaText 按钮文案。枚举值:PREFER_SYSTEM_RECOMMAND-个性化文案、DOWNLOAD_AND_RECEIVE_NOW-立即下载领取、RECEIVE_NOW-立即领取
	CtaText string `json:"cta_text,omitempty"`
}

RewardInfo 红包信息。

type UnionLightInteractive

type UnionLightInteractive struct {
	// StyleType 互动前玩法
	// 枚举值:1-翻卡-领红包1、2-领红包样式2、3-领红包样式3、4-红包雨、5-翻卡-领商品1、6-答题、7-滑动
	StyleType int `json:"style_type,omitempty"`
	// ShowSeconds 出现时间
	// 互动组件相对视频的展现时间,可输入3.0~25.0(包含)之间的数字,至多保留1位小数。
	// 当style_type为2、3、4时,只允许输入5.0~25.0(包含)之间的数字
	ShowSeconds int64 `json:"show_seconds,omitempty"`
	// Tips 引导文案(如点击翻卡,赢取无门槛红包提现)。长度小于等于30,一个中文占2位。
	Tips string `json:"tips,omitempty"`
	// CompSkin 组件样式。允许值:FLIPCARD-卡片,TREASUREBOX-宝箱,REWARD-激励、NATIVE-原生。
	// 当style_type为1、5时,允许值为FLIPCARD,TREASUREBOX;当style_type为6、7时,允许值为REWARD、NATIVE。
	CompSkin string `json:"comp_skin,omitempty"`
	// Question 问题。长度小于等于30,一个中文占2位。
	// 当style_type为6-答题时,必填。
	Question string `json:"question,omitempty"`
	// Option1 选项一。长度小于等于16,一个中文占2位。
	// 当style_type为6-答题时,必填。
	Option1 string `json:"option_1,omitempty"`
	// Option2 选项二。长度小于等于16,一个中文占2位。
	// 当style_type为6-答题时,必填。
	Option2 string `json:"option_2,omitempty"`
	// AnswerOption 正确选项。允许值:1-选项一,2-选项二
	// 当style_type为6-答题时,必填。
	AnswerOption int `json:"answer_option,omitempty"`
	// InteractiveType 互动后玩法。枚举值:1-红包、2-商品优惠、3-抵扣时长
	InteractiveType int `json:"interactive_type,omitempty"`
	// RewardInfo 红包信息。
	RewardInfo *RewardInfo `json:"reward_info,omitempty"`
	// ProductCouponInfo 商品优惠信息。
	ProductCouponInfo *ProductCouponInfo `json:"product_coupon_info,omitempty"`
	// OffsetTimeInfo 抵时长信息。
	OffsetTimeInfo *OffsetTimeInfo `json:"offset_time_info,omitempty"`
}

UnionLightInteractive 穿山甲轻互动组件的component_data

func (UnionLightInteractive) Type

Type Implement ComponentData interface

type UnknownComponent

type UnknownComponent []byte

UnknownComponent 未知组件

func (UnknownComponent) Type

Type Implement ComponentData interface

type UpdateRequest

type UpdateRequest struct {
	// AdvertiserID 广告主ID
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// ComponentID 组件ID
	ComponentID uint64 `json:"component_id,omitempty"`
	// ComponentInfo 组件信息
	ComponentInfo *ComponentInfo `json:"component_info,omitempty"`
}

UpdateRequest 更新组件 API Request

func (UpdateRequest) Encode

func (r UpdateRequest) Encode() []byte

Encode implement Post Request interface

type VoteMagnet

type VoteMagnet struct {
	// Title 主标题。长度小于等于24。一个中文长度为2
	Title string `json:"title,omitempty"`
	// SubTitle 副标题。内容长度要求 44 ≤ x ≤60。一个中文长度为2
	SubTitle string `json:"sub_title,omitempty"`
	// VoteCardWebURL 落地页连接。可使用橙子建站的链接或第三方的链接
	VoteCardWebURL string `json:"vote_card_web_url,omitempty"`
	// ClickText 按钮点击后显示文案。长度小于等于16。一个中文长度为2
	ClickText string `json:"click_text,omitempty"`
	// ButtonList 按钮列表。长度必须等于2
	ButtonList [2]Button `json:"button_list,omitempty"`
}

VoteMagnet 投票磁贴的component_data

func (VoteMagnet) Type

func (m VoteMagnet) Type() enum.ComponentType

Type implement ComponentData interface

Jump to

Keyboard shortcuts

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