Skip to content

Commit

Permalink
Merge branch 'v1.8.17'
Browse files Browse the repository at this point in the history
  • Loading branch information
bububa committed Sep 5, 2022
2 parents c36e42f + 26116cd commit d2959b9
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 0 deletions.
1 change: 1 addition & 0 deletions marketing-api/OCEANENGINE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) ]
Expand Down
16 changes: 16 additions & 0 deletions marketing-api/api/creative/detail_get.go
Original file line number Diff line number Diff line change
@@ -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
}
2 changes: 2 additions & 0 deletions marketing-api/model/advertiser/transferable_fund_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 品牌预付可用余额(单位元)
Expand Down
6 changes: 6 additions & 0 deletions marketing-api/model/creative/ad_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -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时"时必填
Expand All @@ -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为关闭,即不允许客户端下载视频。默认不传值,表示允许客户端下载视频。关闭客户端下载视频功能仅对本地上传的视频有效。
Expand Down
15 changes: 15 additions & 0 deletions marketing-api/model/creative/creative_detail_v2.go
Original file line number Diff line number Diff line change
@@ -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"`
}
31 changes: 31 additions & 0 deletions marketing-api/model/creative/detail_get.go
Original file line number Diff line number Diff line change
@@ -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"`
}

0 comments on commit d2959b9

Please sign in to comment.