diff --git a/marketing-api/OCEANENGINE.md b/marketing-api/OCEANENGINE.md index 592efb07..49c6b5fb 100644 --- a/marketing-api/OCEANENGINE.md +++ b/marketing-api/OCEANENGINE.md @@ -64,6 +64,7 @@ - 修改程序化创意 [ ProceduralCreativeUpdate(clt *core.SDKClient, accessToken string, req *creative.ProceduralCreativeUpdateRequest) error ] - 创建广告创意 [ Create(clt *core.SDKClient, accessToken string, req *creative.CreateRequest) (*creative.CreateResponseData, error) ] - 创意详细信息 [ Read(clt *core.SDKClient, accessToken string, req *creative.ReadRequest) (*creative.CreativeDetail, error) ] + - 创意详细信息(新)[ DetailGet(clt *core.SDKClient, accessToken string, req *creative.DetailGetRequest) (*creative.CreativeDetailV2, error) ] - 修改创意信息 [ Update(clt *core.SDKClient, accessToken string, req *creative.UpdateRequest) (*creative.CreateResponseData, error) ] - 更新创意状态 [ UpdateStatus(clt *core.SDKClient, accessToken string, req *creative.UpdateStatusRequest) (*creative.UpdateResponseData, error) ] - 创意素材信息 [ MaterialRead(clt *core.SDKClient, accessToken string, req *creative.MaterialReadRequest) ([]creative.Material, error) ] diff --git a/marketing-api/api/creative/detail_get.go b/marketing-api/api/creative/detail_get.go new file mode 100644 index 00000000..fe7115a3 --- /dev/null +++ b/marketing-api/api/creative/detail_get.go @@ -0,0 +1,16 @@ +package creative + +import ( + "github.com/bububa/oceanengine/marketing-api/core" + "github.com/bububa/oceanengine/marketing-api/model/creative" +) + +// DetailGet 创意详细信息(新) +func DetailGet(clt *core.SDKClient, accessToken string, req *creative.DetailGetRequest) (*creative.CreativeDetailV2, error) { + var resp creative.DetailGetResponse + err := clt.Get("v3.0/creative/detail/get/", req, &resp, accessToken) + if err != nil { + return nil, err + } + return resp.Data, nil +} diff --git a/marketing-api/model/advertiser/transferable_fund_get.go b/marketing-api/model/advertiser/transferable_fund_get.go index 8a10d10a..02594599 100644 --- a/marketing-api/model/advertiser/transferable_fund_get.go +++ b/marketing-api/model/advertiser/transferable_fund_get.go @@ -31,6 +31,8 @@ type TransferableFundGetResponse struct { type TransferableFund struct { // GrantValid 可用赠款余额(单位元) GrantValid float64 `json:"grant_valid,omitempty"` + // CashTransferBalance 可用现金余额(单位元) + CashTransferBalance float64 `json:"cash_transfer_balance,omitempty"` // UnversalPrepayValid 通用预付可用余额(单位元) UniversalPrepayValid float64 `json:"universal_prepay_valid,omitempty"` // BrandPrepayValid 品牌预付可用余额(单位元) diff --git a/marketing-api/model/creative/ad_data.go b/marketing-api/model/creative/ad_data.go index cda4a48a..f243b967 100644 --- a/marketing-api/model/creative/ad_data.go +++ b/marketing-api/model/creative/ad_data.go @@ -6,6 +6,10 @@ import "github.com/bububa/oceanengine/marketing-api/enum" type AdData struct { // ThridIndustryID 三级行业ID ThirdIndustryID uint64 `json:"thrid_industry_id,omitempty"` + // ParamsType 链接类型 + ParamsType string `json:"params_type,omitempty"` + // DpaExternalUrlField 落地页链接字段选择 + DpaExternalUrlField *string `json:"dpa_external_url_field,omitempty"` // AdKeywords 创意标签。最多20个标签,且每个标签长度不超过10个字符 AdKeywords []string `json:"ad_keywords,omitempty"` // Source 广告来源,4-20个字符,当推广目的为非应用下载或者应用下载且download_type为"EXTERNAL_URL时"时必填 @@ -26,6 +30,8 @@ type AdData struct { WebURL string `json:"web_url,omitempty"` // ExternalURL 落地页链接(支持橙子建站落地页) ExternalURL string `json:"external_url,omitempty"` + // ExternalUrlParams 落地页检测参数 + ExternalUrlParams *string `json:"external_url_params,omitempty"` // IsCommentDisabled 是否关闭评论,0为开启,1为关闭,默认值:0; 允许值: 0, 1 IsCommentDisabled *int `json:"is_comment_disabled,omitempty"` // AdDownloadStatus 允许客户端下载视频功能,0为开启,即允许客户端下载视频;1为关闭,即不允许客户端下载视频。默认不传值,表示允许客户端下载视频。关闭客户端下载视频功能仅对本地上传的视频有效。 diff --git a/marketing-api/model/creative/creative_detail_v2.go b/marketing-api/model/creative/creative_detail_v2.go new file mode 100644 index 00000000..86188e12 --- /dev/null +++ b/marketing-api/model/creative/creative_detail_v2.go @@ -0,0 +1,15 @@ +package creative + +// CreativeDetailV2 创意详情 (新) +type CreativeDetailV2 struct { + // AdvertiserID 广告主ID + AdvertiserID uint64 `json:"advertiser_id,omitempty"` + // AdID 广告计划ID,计划ID要属于广告主ID,且非删除计划,否则会报错 + AdID uint64 `json:"ad_id,omitempty"` + // CreativeList 自定义素材信息 + CreativeList []CreativeInfo `json:"creative_list,omitempty"` + // Creative 程序化素材信息,投放位置和创意类型决定素材规格。 + Creative *CreativeInfo `json:"creative,omitempty"` + // AdData 广告计划数据 + AdData *AdData `json:"ad_data,omitempty"` +} diff --git a/marketing-api/model/creative/detail_get.go b/marketing-api/model/creative/detail_get.go new file mode 100644 index 00000000..dca48979 --- /dev/null +++ b/marketing-api/model/creative/detail_get.go @@ -0,0 +1,31 @@ +package creative + +import ( + "net/url" + "strconv" + + "github.com/bububa/oceanengine/marketing-api/model" +) + +// DetailGetRequest 创意详细信息(新)API Request +type DetailGetRequest struct { + // AdvertiserID 广告主ID + AdvertiserID uint64 `json:"advertiser_id,omitempty"` + // AdID 计划ID + AdID uint64 `json:"ad_id,omitempty"` +} + +// Encode implement GetRequest interface +func (r DetailGetRequest) Encode() string { + values := &url.Values{} + values.Set("advertiser_id", strconv.FormatUint(r.AdvertiserID, 10)) + values.Set("ad_id", strconv.FormatUint(r.AdID, 10)) + return values.Encode() +} + +// DetailGetResponse 创意详细信息(新)API Response +type DetailGetResponse struct { + model.BaseResponse + // Data json返回值 + Data *CreativeDetailV2 `json:"data,omitempty"` +}