Skip to content

Commit

Permalink
Merge branch 'release/v1.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
bububa committed Dec 24, 2021
2 parents c66ed23 + 1035cbd commit e9c044b
Show file tree
Hide file tree
Showing 48 changed files with 1,552 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
- 修改广告组 [ Update(clt *core.SDKClient, accessToken string, req *campaign.UpdateRequest) (uint64, error) ]
- 广告组更新状态 [ UpdateStatus(clt *core.SDKClient, accessToken string, req *campaign.UpdateStatusRequest) (*campaign.UpdateResponseData, error) ]
- 广告计划模块 (api/ad)
- 创建广告计划 [ Create(clt *core.SDKClient, accessToken string, req *ad.CreateRequest) (uint64, error) ]
- 获取广告计划 [ Get(clt *core.SDKClient, accessToken string, req *ad.GetRequest) (*ad.GetResponseData, error) ]
- 修改计划 [ Update(clt *core.SDKClient, accessToken string, req *ad.UpdateRequest) (*ad.UpdateResponseData, error) ]
- 更新计划状态 [ UpdateStatus(clt *core.SDKClient, accessToken string, req *ad.UpdateStatusRequest) (*ad.UpdateResponseData, error) ]
Expand Down Expand Up @@ -132,3 +133,23 @@
- 查询广告质量度 [ tools.AdQualityGet(clt *core.SDKClient, accessToken string, req *tools.AdQualityGetRequest) ([]tools.AdQuality, error) ]
- 查询广告计划学习期状态 [ tools.AdStatExtraInfoGet(clt *core.SDKClient, accessToken string, req *tools.AdStatExtraInfoGetRequest) ([]tools.AdStatExtraInfo, error) ]
- 获取广告预览二维码 [ tools/adpreview.QrcodeGet(clt *core.SDKClient, accessToken string, req *adpreview.QrcodeGetRequest) (*adpreview.QrcodeGetResponseData, error) ]
- 获取地域列表 [ tools.RegionGet(clt *core.SDKClient, accessToken string, req *tools.RegionGetRequest) ([]tools.Region, error) ]
- 获取行业列表 [ tools.IndustryGet(clt *core.SDKClient, accessToken string, req *tools.IndustryGetRequest) ([]tools.Industry, error) ]
- 获取预估点击成本 [ tools.EstimatedPriceGet(clt *core.SDKClient, accessToken string, req *tools.EstimatedPriceGetRequest) (*tools.EstimatedPrice, error) ]
- 获取计划诊断信息 (tools/diagnosis)
- 获取计划诊断建议 [ SuggestionGet(clt *core.SDKClient, accessToken string, req *diagnosis.SuggestionGetRequest) (*diagnosis.SuggestionGetResponseData, error) ]
- 采纳计划诊断建议 [ SuggestionAccept(clt *core.SDKClient, accessToken string, req *diagnosis.SuggestionAcceptRequest) (*diagnosis.SuggestionAcceptResponseData, error) ]
- 行为兴趣词管理 (tools/interestaction)
- 行为类目查询 [ ActionCategory(clt *core.SDKClient, accessToken string, req *interestaction.ActionCategoryRequest) ([]interestaction.Object, error) ]
- 行为关键词查询 [ ActionKeyword(clt *core.SDKClient, accessToken string, req *interestaction.ActionKeywordRequest) ([]interestaction.Object, error) ]
- 兴趣类目查询 [ InterestCategory(clt *core.SDKClient, accessToken string, req *interestaction.InterestCategoryRequest) ([]interestaction.Object, error) ]
- 兴趣关键词查询 [ InterestKeyword(clt *core.SDKClient, accessToken string, req *interestaction.InterestKeywordRequest) ([]interestaction.Object, error) ]
- 兴趣行为类目关键词ID转词 [ Id2Word(clt *core.SDKClient, accessToken string, req *interestaction.Id2WordRequest) (*interestaction.Id2WordResponseData, error) ]
- 获取行为兴趣推荐关键词 [ KeywordSuggest(clt *core.SDKClient, accessToken string, req *interestaction.KeywordSuggestRequest) ([]interestaction.Object, error) ]
- 定向包管理 (audiencepackage)
- 获取定向包 [ Get(clt *core.SDKClient, accessToken string, req *audiencepackage.GetRequest) (*audiencepackage.GetResponseData, error) ]
- 创建定向包 [ Create(clt *core.SDKClient, accessToken string, req *audiencepackage.CreateRequest) (uint64, error) ]
- 更新定向包 [ Update(clt *core.SDKClient, accessToken string, req *audiencepackage.UpdateRequest) (uint64, error) ]
- 删除定向包 [ Delete(clt *core.SDKClient, accessToken string, req *audiencepackage.DeleteRequest) (uint64, error) ]
- 计划绑定定向包 [ AdBind(clt *core.SDKClient, accessToken string, req *audiencepackage.AdBindRequest) (uint64, error) ]
- 定向包解绑 [ AdUnbind(clt *core.SDKClient, accessToken string, req *audiencepackage.AdBindRequest) (uint64, error) ]
21 changes: 21 additions & 0 deletions marketing-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
- 修改广告组 [ Update(clt *core.SDKClient, accessToken string, req *campaign.UpdateRequest) (uint64, error) ]
- 广告组更新状态 [ UpdateStatus(clt *core.SDKClient, accessToken string, req *campaign.UpdateStatusRequest) (*campaign.UpdateResponseData, error) ]
- 广告计划模块 (api/ad)
- 创建广告计划 [ Create(clt *core.SDKClient, accessToken string, req *ad.CreateRequest) (uint64, error) ]
- 获取广告计划 [ Get(clt *core.SDKClient, accessToken string, req *ad.GetRequest) (*ad.GetResponseData, error) ]
- 修改计划 [ Update(clt *core.SDKClient, accessToken string, req *ad.UpdateRequest) (*ad.UpdateResponseData, error) ]
- 更新计划状态 [ UpdateStatus(clt *core.SDKClient, accessToken string, req *ad.UpdateStatusRequest) (*ad.UpdateResponseData, error) ]
Expand Down Expand Up @@ -132,3 +133,23 @@
- 查询广告质量度 [ tools.AdQualityGet(clt *core.SDKClient, accessToken string, req *tools.AdQualityGetRequest) ([]tools.AdQuality, error) ]
- 查询广告计划学习期状态 [ tools.AdStatExtraInfoGet(clt *core.SDKClient, accessToken string, req *tools.AdStatExtraInfoGetRequest) ([]tools.AdStatExtraInfo, error) ]
- 获取广告预览二维码 [ tools/adpreview.QrcodeGet(clt *core.SDKClient, accessToken string, req *adpreview.QrcodeGetRequest) (*adpreview.QrcodeGetResponseData, error) ]
- 获取地域列表 [ tools.RegionGet(clt *core.SDKClient, accessToken string, req *tools.RegionGetRequest) ([]tools.Region, error) ]
- 获取行业列表 [ tools.IndustryGet(clt *core.SDKClient, accessToken string, req *tools.IndustryGetRequest) ([]tools.Industry, error) ]
- 获取预估点击成本 [ tools.EstimatedPriceGet(clt *core.SDKClient, accessToken string, req *tools.EstimatedPriceGetRequest) (*tools.EstimatedPrice, error) ]
- 获取计划诊断信息 (tools/diagnosis)
- 获取计划诊断建议 [ SuggestionGet(clt *core.SDKClient, accessToken string, req *diagnosis.SuggestionGetRequest) (*diagnosis.SuggestionGetResponseData, error) ]
- 采纳计划诊断建议 [ SuggestionAccept(clt *core.SDKClient, accessToken string, req *diagnosis.SuggestionAcceptRequest) (*diagnosis.SuggestionAcceptResponseData, error) ]
- 行为兴趣词管理 (tools/interestaction)
- 行为类目查询 [ ActionCategory(clt *core.SDKClient, accessToken string, req *interestaction.ActionCategoryRequest) ([]interestaction.Object, error) ]
- 行为关键词查询 [ ActionKeyword(clt *core.SDKClient, accessToken string, req *interestaction.ActionKeywordRequest) ([]interestaction.Object, error) ]
- 兴趣类目查询 [ InterestCategory(clt *core.SDKClient, accessToken string, req *interestaction.InterestCategoryRequest) ([]interestaction.Object, error) ]
- 兴趣关键词查询 [ InterestKeyword(clt *core.SDKClient, accessToken string, req *interestaction.InterestKeywordRequest) ([]interestaction.Object, error) ]
- 兴趣行为类目关键词ID转词 [ Id2Word(clt *core.SDKClient, accessToken string, req *interestaction.Id2WordRequest) (*interestaction.Id2WordResponseData, error) ]
- 获取行为兴趣推荐关键词 [ KeywordSuggest(clt *core.SDKClient, accessToken string, req *interestaction.KeywordSuggestRequest) ([]interestaction.Object, error) ]
- 定向包管理 (audiencepackage)
- 获取定向包 [ Get(clt *core.SDKClient, accessToken string, req *audiencepackage.GetRequest) (*audiencepackage.GetResponseData, error) ]
- 创建定向包 [ Create(clt *core.SDKClient, accessToken string, req *audiencepackage.CreateRequest) (uint64, error) ]
- 更新定向包 [ Update(clt *core.SDKClient, accessToken string, req *audiencepackage.UpdateRequest) (uint64, error) ]
- 删除定向包 [ Delete(clt *core.SDKClient, accessToken string, req *audiencepackage.DeleteRequest) (uint64, error) ]
- 计划绑定定向包 [ AdBind(clt *core.SDKClient, accessToken string, req *audiencepackage.AdBindRequest) (uint64, error) ]
- 定向包解绑 [ AdUnbind(clt *core.SDKClient, accessToken string, req *audiencepackage.AdBindRequest) (uint64, error) ]
23 changes: 23 additions & 0 deletions marketing-api/api/ad/create.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package ad

import (
"github.com/bububa/oceanengine/marketing-api/core"
"github.com/bububa/oceanengine/marketing-api/model/ad"
)

// Create 创建广告计划
// 计划包括了计划名称、投放范围、投放目标、用户定向、预算与出价,对于其中的概念解释可以参考:【广告计划】
// 计划创建涉及了多个资产管理:应用管理、落地页管理、转化目标管理、定向包管理、DMP人群管理等;开发者需要提前根据开放接口构建这些资产功能,以免创建计划卡住
// 新版营销链路广告计划差异点

// 新版计划中去除投放内容中落地页信息(旧版计划中在计划维度)
// 新版计划中新增广告位信息(旧版计划中在创意维度)
// 新版计划中增加监测链接内容(旧版计划中在创意维度)
func Create(clt *core.SDKClient, accessToken string, req *ad.CreateRequest) (uint64, error) {
var resp ad.CreateResponse
err := clt.Post("2/ad/create/", req, &resp, accessToken)
if err != nil {
return 0, err
}
return resp.Data.AdID, nil
}
16 changes: 16 additions & 0 deletions marketing-api/api/audiencepackage/ad_bind.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package audiencepackage

import (
"github.com/bububa/oceanengine/marketing-api/core"
"github.com/bububa/oceanengine/marketing-api/model/audiencepackage"
)

// AdBind 计划绑定定向包
func AdBind(clt *core.SDKClient, accessToken string, req *audiencepackage.AdBindRequest) (uint64, error) {
var resp audiencepackage.AdBindResponse
err := clt.Post("2/audience_package/ad/bind/", req, &resp, accessToken)
if err != nil {
return 0, err
}
return resp.Data.AudiencePackageID, nil
}
16 changes: 16 additions & 0 deletions marketing-api/api/audiencepackage/ad_unbind.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package audiencepackage

import (
"github.com/bububa/oceanengine/marketing-api/core"
"github.com/bububa/oceanengine/marketing-api/model/audiencepackage"
)

// AdUnbind 定向包解绑
func AdUnbind(clt *core.SDKClient, accessToken string, req *audiencepackage.AdBindRequest) (uint64, error) {
var resp audiencepackage.AdBindResponse
err := clt.Post("2/audience_package/ad/unbind/", req, &resp, accessToken)
if err != nil {
return 0, err
}
return resp.Data.AudiencePackageID, nil
}
20 changes: 20 additions & 0 deletions marketing-api/api/audiencepackage/create.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package audiencepackage

import (
"github.com/bububa/oceanengine/marketing-api/core"
"github.com/bububa/oceanengine/marketing-api/model/audiencepackage"
)

// Create 创建定向包
// 落地页:可用于推广目的为销售线索收集或推广目的为应用推广且下载方式为落地页的计划
// 应用推广(Android):可用于推广目的为应用推广且下载方式为Android下载链接的计划
// 应用推广(iOS):可用于推广目的为应用推广且下载方式为iOS下载链接的计划
// 其余类型:可应用于推广目的为该类型名称的计划
func Create(clt *core.SDKClient, accessToken string, req *audiencepackage.CreateRequest) (uint64, error) {
var resp audiencepackage.CreateResponse
err := clt.Post("2/audience_package/create/", req, &resp, accessToken)
if err != nil {
return 0, err
}
return resp.Data.AudiencePackageID, nil
}
16 changes: 16 additions & 0 deletions marketing-api/api/audiencepackage/delete.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package audiencepackage

import (
"github.com/bububa/oceanengine/marketing-api/core"
"github.com/bububa/oceanengine/marketing-api/model/audiencepackage"
)

// Delete 删除定向包
func Delete(clt *core.SDKClient, accessToken string, req *audiencepackage.DeleteRequest) (uint64, error) {
var resp audiencepackage.DeleteResponse
err := clt.Post("2/audience_package/delete/", req, &resp, accessToken)
if err != nil {
return 0, err
}
return resp.Data.AudiencePackageID, nil
}
2 changes: 2 additions & 0 deletions marketing-api/api/audiencepackage/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Package audiencepackage 定向包管理
package audiencepackage
20 changes: 20 additions & 0 deletions marketing-api/api/audiencepackage/get.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package audiencepackage

import (
"github.com/bububa/oceanengine/marketing-api/core"
"github.com/bububa/oceanengine/marketing-api/model/audiencepackage"
)

// Get 获取定向包
// 落地页:可用于推广目的为销售线索收集或推广目的为应用推广且下载方式为落地页的计划
// 应用推广(Android):可用于推广目的为应用推广且下载方式为Android下载链接的计划
// 应用推广(iOS):可用于推广目的为应用推广且下载方式为iOS下载链接的计划
// 其余类型:可应用于推广目的为该类型名称的计划
func Get(clt *core.SDKClient, accessToken string, req *audiencepackage.GetRequest) (*audiencepackage.GetResponseData, error) {
var resp audiencepackage.GetResponse
err := clt.Get("2/audience_package/get/", req, &resp, accessToken)
if err != nil {
return nil, err
}
return resp.Data, nil
}
16 changes: 16 additions & 0 deletions marketing-api/api/audiencepackage/update.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package audiencepackage

import (
"github.com/bububa/oceanengine/marketing-api/core"
"github.com/bububa/oceanengine/marketing-api/model/audiencepackage"
)

// Update 更新定向包
func Update(clt *core.SDKClient, accessToken string, req *audiencepackage.UpdateRequest) (uint64, error) {
var resp audiencepackage.UpdateResponse
err := clt.Post("2/audience_package/update/", req, &resp, accessToken)
if err != nil {
return 0, err
}
return resp.Data.AudiencePackageID, nil
}
2 changes: 2 additions & 0 deletions marketing-api/api/tools/diagnosis/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Package diagnosis 获取计划诊断信息
package diagnosis
17 changes: 17 additions & 0 deletions marketing-api/api/tools/diagnosis/suggestion_accept.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package diagnosis

import (
"github.com/bububa/oceanengine/marketing-api/core"
"github.com/bububa/oceanengine/marketing-api/model/tools/diagnosis"
)

// SuggestionAccept 采纳计划诊断建议
// 通过采纳诊断建议接口,广告主可以采纳【获取诊断建议】接口所获得的所有建议
func SuggestionAccept(clt *core.SDKClient, accessToken string, req *diagnosis.SuggestionAcceptRequest) (*diagnosis.SuggestionAcceptResponseData, error) {
var resp diagnosis.SuggestionAcceptResponse
err := clt.Post("2/tools/diagnosis/suggestion/accept/", req, &resp, accessToken)
if err != nil {
return nil, err
}
return resp.Data, nil
}
18 changes: 18 additions & 0 deletions marketing-api/api/tools/diagnosis/suggestion_get.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package diagnosis

import (
"github.com/bububa/oceanengine/marketing-api/core"
"github.com/bububa/oceanengine/marketing-api/model/tools/diagnosis"
)

// SuggestionGet 获取计划诊断建议
// 计划诊断是帮助广告主判断计划投放效果,并定位投放问题给出相关建议的一款优化类工具
// 通过获取计划诊断建议接口,广告主可指定计划ID和场景类型获取相应的诊断建议,针对每一计划ID,本接口可返回计划对应场景下的所有建议,以及建议对应下的所有工具。广告主可通过【采纳诊断建议】接口采纳本接口获得的所有建议,对广告计划进行优化。
func SuggestionGet(clt *core.SDKClient, accessToken string, req *diagnosis.SuggestionGetRequest) (*diagnosis.SuggestionGetResponseData, error) {
var resp diagnosis.SuggestionGetResponse
err := clt.Get("2/tools/diagnosis/suggestion/get/", req, &resp, accessToken)
if err != nil {
return nil, err
}
return resp.Data, nil
}
16 changes: 16 additions & 0 deletions marketing-api/api/tools/estimated_price_get.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package tools

import (
"github.com/bububa/oceanengine/marketing-api/core"
"github.com/bububa/oceanengine/marketing-api/model/tools"
)

// EstimatedPriceGet 获取预估点击成本
func EstimatedPriceGet(clt *core.SDKClient, accessToken string, req *tools.EstimatedPriceGetRequest) (*tools.EstimatedPrice, error) {
var resp tools.EstimatedPriceGetResponse
err := clt.Get("2/tools/estimated_price/get/", req, &resp, accessToken)
if err != nil {
return nil, err
}
return resp.Data, nil
}
16 changes: 16 additions & 0 deletions marketing-api/api/tools/industry_get.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package tools

import (
"github.com/bububa/oceanengine/marketing-api/core"
"github.com/bububa/oceanengine/marketing-api/model/tools"
)

// IndustryGet 获取行业列表,通过接口可以获取到一级行业、二级行业、三级行业列表,其中代理商创建广告主时使用的是二级行业,而在创建创意填写创意分类时使用的是三级行业,请注意区分。
func IndustryGet(clt *core.SDKClient, accessToken string, req *tools.IndustryGetRequest) ([]tools.Industry, error) {
var resp tools.IndustryGetResponse
err := clt.Get("2/tools/industry/get/", req, &resp, accessToken)
if err != nil {
return nil, err
}
return resp.Data.List, nil
}
16 changes: 16 additions & 0 deletions marketing-api/api/tools/interestaction/action_category.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package interestaction

import (
"github.com/bububa/oceanengine/marketing-api/core"
"github.com/bububa/oceanengine/marketing-api/model/tools/interestaction"
)

// ActionCategory 行为类目查询
func ActionCategory(clt *core.SDKClient, accessToken string, req *interestaction.ActionCategoryRequest) ([]interestaction.Object, error) {
var resp interestaction.ActionCategoryResponse
err := clt.Get("2/tools/interest_action/action/category", req, &resp, accessToken)
if err != nil {
return nil, err
}
return resp.Data, nil
}
16 changes: 16 additions & 0 deletions marketing-api/api/tools/interestaction/action_keyword.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package interestaction

import (
"github.com/bububa/oceanengine/marketing-api/core"
"github.com/bububa/oceanengine/marketing-api/model/tools/interestaction"
)

// ActionKeyword 行为关键词查询
func ActionKeyword(clt *core.SDKClient, accessToken string, req *interestaction.ActionKeywordRequest) ([]interestaction.Object, error) {
var resp interestaction.ActionKeywordResponse
err := clt.Get("2/tools/interest_action/action/keyword", req, &resp, accessToken)
if err != nil {
return nil, err
}
return resp.Data.List, nil
}
2 changes: 2 additions & 0 deletions marketing-api/api/tools/interestaction/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Package interestaction 行为兴趣关键词管理
package interestaction
16 changes: 16 additions & 0 deletions marketing-api/api/tools/interestaction/id2word.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package interestaction

import (
"github.com/bububa/oceanengine/marketing-api/core"
"github.com/bububa/oceanengine/marketing-api/model/tools/interestaction"
)

// Id2Word 兴趣行为类目关键词id转词
func Id2Word(clt *core.SDKClient, accessToken string, req *interestaction.Id2WordRequest) (*interestaction.Id2WordResponseData, error) {
var resp interestaction.Id2WordResponse
err := clt.Get("2/tools/interest_action/id2word/", req, &resp, accessToken)
if err != nil {
return nil, err
}
return resp.Data, nil
}
16 changes: 16 additions & 0 deletions marketing-api/api/tools/interestaction/interest_category.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package interestaction

import (
"github.com/bububa/oceanengine/marketing-api/core"
"github.com/bububa/oceanengine/marketing-api/model/tools/interestaction"
)

// InterestCategory 兴趣类目查询
func InterestCategory(clt *core.SDKClient, accessToken string, req *interestaction.InterestCategoryRequest) ([]interestaction.Object, error) {
var resp interestaction.InterestCategoryResponse
err := clt.Get("2/tools/interest_action/interest/category", req, &resp, accessToken)
if err != nil {
return nil, err
}
return resp.Data, nil
}
16 changes: 16 additions & 0 deletions marketing-api/api/tools/interestaction/interest_keyword.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package interestaction

import (
"github.com/bububa/oceanengine/marketing-api/core"
"github.com/bububa/oceanengine/marketing-api/model/tools/interestaction"
)

// InterestKeyword 兴趣关键词查询
func InterestKeyword(clt *core.SDKClient, accessToken string, req *interestaction.InterestKeywordRequest) ([]interestaction.Object, error) {
var resp interestaction.InterestKeywordResponse
err := clt.Get("2/tools/interest_action/interest/keyword", req, &resp, accessToken)
if err != nil {
return nil, err
}
return resp.Data.List, nil
}
16 changes: 16 additions & 0 deletions marketing-api/api/tools/interestaction/keyword_suggest.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package interestaction

import (
"github.com/bububa/oceanengine/marketing-api/core"
"github.com/bububa/oceanengine/marketing-api/model/tools/interestaction"
)

// KeywordSuggest 获取行为兴趣推荐关键词
func KeywordSuggest(clt *core.SDKClient, accessToken string, req *interestaction.KeywordSuggestRequest) ([]interestaction.Object, error) {
var resp interestaction.KeywordSuggestResponse
err := clt.Get("2/tools/interest_action/keyword/suggest/", req, &resp, accessToken)
if err != nil {
return nil, err
}
return resp.Data.Keywords, nil
}
Loading

0 comments on commit e9c044b

Please sign in to comment.