-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
1,552 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// Package audiencepackage 定向包管理 | ||
package audiencepackage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// Package diagnosis 获取计划诊断信息 | ||
package diagnosis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// Package interestaction 行为兴趣关键词管理 | ||
package interestaction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
16
marketing-api/api/tools/interestaction/interest_category.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
16
marketing-api/api/tools/interestaction/interest_keyword.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
Oops, something went wrong.