Skip to content

Commit

Permalink
Merge branch 'release/v1.0.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
bububa committed Aug 2, 2021
2 parents 49528f7 + 206e9ba commit cf53a0d
Show file tree
Hide file tree
Showing 143 changed files with 2,998 additions and 20 deletions.
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,25 @@
- 修改广告计划状态 [ UpdateStatus(clt *core.SDKClient, accessToken string, req *campaign.UpdateStatusRequest) ([]int64, error) ]
- 广告组(api/unit)
- 创建广告组 [ Create(clt *core.SDKClient, accessToken string, req *unit.CreateRequest) (int64, error) ]
- 创建创建联盟定投广告组 [ CreateUnion(clt *core.SDKClient, accessToken string, req *unit.CreateUnionRequest) (int64, error) ]
- 修改广告组 [ Update(clt *core.SDKClient, accessToken string, req *unit.UpdateRequest) (int64, error) ]
- 修改联盟定投广告组 [ UpdateUnion(clt *core.SDKClient, accessToken string, req *unit.UpdateUnionRequest) (int64, error) ]
- 修改广告组预算 [ UpdateDayBudget(clt *core.SDKClient, accessToken string, req *unit.UpdateDayBudgetRequest) error ]
- 修改广告组状态 [ UpdateStatus(clt *core.SDKClient, accessToken string, req *unit.UpdateStatusRequest) ([]int64, error) ]
- 修改广告组出价 [ UpdateBid(clt *core.SDKClient, accessToken string, req *unit.UpdateBidRequest) error ]
- 广告创意(api/creative)
- 创建创意 [ Create(clt *core.SDKClient, accessToken string, req *creative.CreateRequest) (int64, error) ]
- 创建程序化2.0创意 [ AdvancedProgramCreate(clt *core.SDKClient, accessToken string, req *creative.AdvancedProgramCreateRequest) (int64, error) ]
- 批量创建&修改创意 [ BatchUpdate(clt *core.SDKClient, accessToken string, req *creative.BatchUpdateRequest) (*creative.BatchUpdateResponse, error) ]
- 修改创意 [ Update(clt *core.SDKClient, accessToken string, req *creative.UpdateRequest) (int64, error) ]
- 修改程序化2.0创意 [ AdvancedProgramUpdate(clt *core.SDKClient, accessToken string, req *creative.AdvancedProgramUpdateRequest) error ]
- 修改创意状态 [ UpdateStatus(clt *core.SDKClient, accessToken string, req *creative.UpdateStatusRequest) ([]int64, error) ]
- 创意体验 [ Preview(clt *core.SDKClient, accessToken string, req *creative.PreviewRequest) error ]
- 创意标签填写建议 [ CreativeTagAdvise(clt *core.SDKClient, accessToken string, req *creative.CreativeTagAdviseRequest) (*creative.CreativeTagAdviseResponse, error) ]
- 高级创意(api/asset)
- 获取高级创意列表 [ AdvCardList(clt *core.SDKClient, accessToken string, req *asset.AdvCardListRequest) (*asset.AdvCardListResponse, error) ]
- 创建高级创意接口 [ AdvCardCreate(clt *core.SDKClient, accessToken string, req *asset.AdvCardCreateRequest) ([]int64, error) ]
- 删除高级创意接口 [ AdvCardRemove(clt *core.SDKClient, accessToken string, req *asset.AdvCardRemoveRequest) ([]int64, error) ]
- 数据报表
- 广告数据报表 (api/report)
- 代理商数据 [ AgentReport(clt *core.SDKClient, accessToken string, req *report.AgentReportRequest) (*report.AgentReportResponse, error) ]
Expand All @@ -52,6 +67,48 @@
- 广告素材数据 [ CreativeReport(clt *core.SDKClient, accessToken string, req *report.MaterialReportRequest) (*report.ReportResponse, error) ]
- 人群分析数据 [ AudienceReport(clt *core.SDKClient, accessToken string, req *report.AudienceReportRequest) (*report.ReportResponse, error) ]
- 小店通转化数据 [ MerchantDeatailReport(clt *core.SDKClient, accessToken string, req *report.MerchantDetailReportRequest) (*report.MerchantDetailReportResponse, error) ]
- 素材管理(api/file)
- 图片素材
- 上传图片v1接口 [ AdImageUploadV1(clt *core.SDKClient, accessToken string, req *file.AdImageUploadRequestV1) (*file.Image, error) ]
- 上传图片v2接口 [ AdImageUploadV2(clt *core.SDKClient, accessToken string, req *file.AdImageUploadRequestV2) (*file.Image, error) ]
- 查询图片信息get接口 [ AdImageGet(clt *core.SDKClient, accessToken string, req *file.AdImageGetRequest) (*file.Image, error) ]
- 查询图片信息list接口 [ AdImageList(clt *core.SDKClient, accessToken string, req *file.AdImageListRequest) (*file.AdImageListResponse, error) ]
- 视频素材
- 上传视频接口v1 [ AdVideoUploadV1(clt *core.SDKClient, accessToken string, req *file.AdVideoUploadRequestV1) (string, error) ]
- 上传视频接口v2 [ AdVideoUploadV2(clt *core.SDKClient, accessToken string, req *file.AdVideoUploadRequestV2) (*file.Video, error) ]
- 获取视频信息get接口 [ AdVideoGet(clt *core.SDKClient, accessToken string, req *file.AdVideoGetRequest) ([]file.Video, error) ]
- 查询视频信息list接口 [ AdVideoList(clt *core.SDKClient, accessToken string, req *file.AdVideoListRequest) (*file.AdVideoListResponse, error) ]
- 视频库
- 视频库-推送视频 [ AdVideoShare(clt *core.SDKClient, accessToken string, req *file.AdVideoShareRequest) ([]file.AdVideoShareDetail, error) ]
- 视频库-批量更新视频功能 [ AdVideoUpdate(clt *core.SDKClient, accessToken string, req *file.AdVideoUpdateRequest) error ]
- 视频库-删除视频标签 [ AdVideoTagDelete(clt *core.SDKClient, accessToken string, req *file.AdVideoTagDeleteRequest) error ]
- 视频关联创意数查询 [ AdVideoRelateCreatives(clt *core.SDKClient, accessToken string, req *file.AdVideoRelateCreativesRequest) ([]file.AdVideoRelatedCreatives, error) ]
- 工具
- 查询工具
- 获取可选的深度转化目标 [ unit.OcpcConversionInfos(clt *core.SDKClient, accessToken string, req *unit.OcpcConversionInfosRequest) (*unit.OcpcConversionInfosResponse, error) ]
- 获取可选的定向标签 [ tool.TargetingTagsList(clt *core.SDKClient, accessToken string, req *tool.TargetingTagsListRequest) (*tool.TargetingTag, error) ]
- 获取可选的应用定向 [ tool.AppSearch(clt *core.SDKClient, accessToken string, req *tool.AppSearchRequest) (*tool.TargetingApp, error) ]
- 获取可选的推荐封面 [ tool.KeyFrame(clt *core.SDKClient, accessToken string, req *tool.KeyFrameRequest) ([]string, error) ]
- 获取可选的动态词包 [ tool.CreativeWordList(clt *core.SDKClient, accessToken string, advertiserID int64) ([]tool.CreativeWord, error) ]
- 获取行动号召按钮 [ creative.ActionBarTextList(clt *core.SDKClient, accessToken string, req *creative.ActionBarTextListRequest) ([]string, error) ]
- 获取可选的封面贴纸样式 [ tool.CreativeWordStyles(clt *core.SDKClient, accessToken string, advertiserID int64) ([]tool.CreativeWordStyle, error) ]
- 获取可用的转化目标 [ tool.ConvertList(clt *core.SDKClient, accessToken string, req *tool.ConvertListRequest) (*tool.ConvertListResponse, error) ]
- 获取可选白名单接口 [ advertiser.WhiteList(clt *core.SDKClient, accessToken string, advertiserID int64) (*advertiser.WhiteListResponse, error) ]
- 获取地域定向 [ region.List(clt *core.SDKClient, accessToken string) (map[string]region.Region, error) ]
- 获取商圈地域定向 [ region.DistrictList(clt *core.SDKClient, accessToken string, advertiserID int64) (map[string]region.District, error) ]
- 获取可用咨询组件列表 [ lp.ConsultList(clt *core.SDKClient, accessToken string, req *lp.ConsultListRequest) (*lp.ConsultListResponse, error) ]
- 功能名单
- 获取创意分类标签白名单客户 [ advertiser.WhiteList(clt *core.SDKClient, accessToken string, advertiserID int64) (*advertiser.WhiteListResponse, error) ]
- 获取联盟投放白名单 [ advertiser.WhiteList(clt *core.SDKClient, accessToken string, advertiserID int64) (*advertiser.WhiteListResponse, error) ]
- 应用列表
- 创建应用 [ file.AdAppCreate(clt *core.SDKClient, accessToken string, req *file.AdAppCreateRequest) (*file.App, error) ]
- 修改应用 [ file.AdAppUpdate(clt *core.SDKClient, accessToken string, req *file.AdAppUpdateRequest) (*file.App, error) ]
- 获取应用列表 [ file.AdAppList(clt *core.SDKClient, accessToken string, req *file.AdAppListRequest) (*file.AdAppListResponse, error) ]
- 定向模版
- 创建定向模板 [ target.TemplateCreate(clt *core.SDKClient, accessToken string, req *target.TemplateCreateRequest) (*target.Template, error) ]
- 查询定向模板接口 [ target.TemplateList(clt *core.SDKClient, accessToken string, req *target.TemplateListRequest) (*target.TemplateListResponse, error) ]
- 修改定向模板 [ target.TemplateUpdate(clt *core.SDKClient, accessToken string, req *target.TemplateUpdateRequest) (*target.Template, error) ]
- 删除定向模板 [ target.TemplateDelete(clt *core.SDKClient, accessToken string, req *target.TemplateDeleteRequest) error ]
- DMP人群管理(api/dmp)
- 人群包上传接口 [ PopulationUpload(clt *core.SDKClient, accessToken string, req *dmp.PopulationUploadRequest) (*dmp.Population, error) ]
- 人群包更新接口 [ PopulationUpdate(clt *core.SDKClient, accessToken string, req *dmp.PopulationUpdateRequest) (*dmp.Population, error) ]
Expand Down
19 changes: 19 additions & 0 deletions api/advertiser/white_list.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package advertiser

import (
"github.com/bububa/kwai-marketing-api/core"
"github.com/bububa/kwai-marketing-api/model/advertiser"
)

// WhiteList 获取可选白名单接口
func WhiteList(clt *core.SDKClient, accessToken string, advertiserID int64) (*advertiser.WhiteListResponse, error) {
req := &advertiser.WhiteListRequest{
AdvertiserID: advertiserID,
}
var resp advertiser.WhiteListResponse
err := clt.Get(accessToken, req, &resp)
if err != nil {
return nil, err
}
return &resp, nil
}
16 changes: 16 additions & 0 deletions api/asset/adv_card_create.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package asset

import (
"github.com/bububa/kwai-marketing-api/core"
"github.com/bububa/kwai-marketing-api/model/asset"
)

// AdvCardCreate 创建高级创意接口
func AdvCardCreate(clt *core.SDKClient, accessToken string, req *asset.AdvCardCreateRequest) ([]int64, error) {
var resp asset.AdvCardCreateResponse
err := clt.Post(accessToken, req, &resp)
if err != nil {
return nil, err
}
return resp.AdvList, nil
}
16 changes: 16 additions & 0 deletions api/asset/adv_card_list.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package asset

import (
"github.com/bububa/kwai-marketing-api/core"
"github.com/bububa/kwai-marketing-api/model/asset"
)

// AdvCardList 获取高级创意列表
func AdvCardList(clt *core.SDKClient, accessToken string, req *asset.AdvCardListRequest) (*asset.AdvCardListResponse, error) {
var resp asset.AdvCardListResponse
err := clt.Post(accessToken, req, &resp)
if err != nil {
return nil, err
}
return &resp, nil
}
16 changes: 16 additions & 0 deletions api/asset/adv_card_remove.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package asset

import (
"github.com/bububa/kwai-marketing-api/core"
"github.com/bububa/kwai-marketing-api/model/asset"
)

// AdvCardRemove 删除高级创意接口
func AdvCardRemove(clt *core.SDKClient, accessToken string, req *asset.AdvCardRemoveRequest) ([]int64, error) {
var resp asset.AdvCardRemoveResponse
err := clt.Post(accessToken, req, &resp)
if err != nil {
return nil, err
}
return resp.AdvCardID, nil
}
2 changes: 2 additions & 0 deletions api/asset/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Package asset 高级创意相关接口
package asset
16 changes: 16 additions & 0 deletions api/creative/action_bar_text_list.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package creative

import (
"github.com/bububa/kwai-marketing-api/core"
"github.com/bububa/kwai-marketing-api/model/creative"
)

// ActionBarTextList 获取行动号召按钮
func ActionBarTextList(clt *core.SDKClient, accessToken string, req *creative.ActionBarTextListRequest) ([]string, error) {
var resp creative.ActionBarTextListResponse
err := clt.Get(accessToken, req, &resp)
if err != nil {
return nil, err
}
return resp.ActionBarText, nil
}
16 changes: 16 additions & 0 deletions api/creative/advanced_program_create.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package creative

import (
"github.com/bububa/kwai-marketing-api/core"
"github.com/bububa/kwai-marketing-api/model/creative"
)

// AdvancedProgramCreate 创建程序化2.0创意
func AdvancedProgramCreate(clt *core.SDKClient, accessToken string, req *creative.AdvancedProgramCreateRequest) (int64, error) {
var resp creative.AdvancedProgramCreateResponse
err := clt.Post(accessToken, req, &resp)
if err != nil {
return 0, err
}
return resp.UnitID, nil
}
11 changes: 11 additions & 0 deletions api/creative/advanced_program_update.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package creative

import (
"github.com/bububa/kwai-marketing-api/core"
"github.com/bububa/kwai-marketing-api/model/creative"
)

// AdvancedProgramUpdate 修改程序化2.0创意
func AdvancedProgramUpdate(clt *core.SDKClient, accessToken string, req *creative.AdvancedProgramUpdateRequest) error {
return clt.Post(accessToken, req, nil)
}
17 changes: 17 additions & 0 deletions api/creative/batch_update.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package creative

import (
"github.com/bububa/kwai-marketing-api/core"
"github.com/bububa/kwai-marketing-api/model/creative"
)

// BatchUpdate 批量创建&修改创意
// 注:该接口可实现创意的批量创建&更新,上传creative_id为更新,不上传creative_id则为创建。
func BatchUpdate(clt *core.SDKClient, accessToken string, req *creative.BatchUpdateRequest) (*creative.BatchUpdateResponse, error) {
var resp creative.BatchUpdateResponse
err := clt.Post(accessToken, req, &resp)
if err != nil {
return nil, err
}
return &resp, nil
}
17 changes: 17 additions & 0 deletions api/creative/create.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package creative

import (
"github.com/bububa/kwai-marketing-api/core"
"github.com/bububa/kwai-marketing-api/model/creative"
)

// Create 创建创意
// 【注】联盟广告不支持便利贴图片素材,只有联盟广告支持横版竖版图片素材。
func Create(clt *core.SDKClient, accessToken string, req *creative.CreateRequest) (int64, error) {
var resp creative.CreateResponse
err := clt.Post(accessToken, req, &resp)
if err != nil {
return 0, err
}
return resp.CreativeID, nil
}
16 changes: 16 additions & 0 deletions api/creative/creative_tag_advise.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package creative

import (
"github.com/bububa/kwai-marketing-api/core"
"github.com/bububa/kwai-marketing-api/model/creative"
)

// CreativeTagAdvise 创意标签填写建议
func CreativeTagAdvise(clt *core.SDKClient, accessToken string, req *creative.CreativeTagAdviseRequest) (*creative.CreativeTagAdviseResponse, error) {
var resp creative.CreativeTagAdviseResponse
err := clt.Get(accessToken, req, &resp)
if err != nil {
return nil, err
}
return &resp, nil
}
11 changes: 11 additions & 0 deletions api/creative/preview.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package creative

import (
"github.com/bububa/kwai-marketing-api/core"
"github.com/bububa/kwai-marketing-api/model/creative"
)

// Preview 创意体验
func Preview(clt *core.SDKClient, accessToken string, req *creative.PreviewRequest) error {
return clt.Post(accessToken, req, nil)
}
17 changes: 17 additions & 0 deletions api/creative/update.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package creative

import (
"github.com/bububa/kwai-marketing-api/core"
"github.com/bububa/kwai-marketing-api/model/creative"
)

// Update 修改创意
//【注】联盟广告不支持便利贴图片素材。
func Update(clt *core.SDKClient, accessToken string, req *creative.UpdateRequest) (int64, error) {
var resp creative.UpdateResponse
err := clt.Post(accessToken, req, &resp)
if err != nil {
return 0, err
}
return resp.CreativeID, nil
}
16 changes: 16 additions & 0 deletions api/creative/update_status.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package creative

import (
"github.com/bububa/kwai-marketing-api/core"
"github.com/bububa/kwai-marketing-api/model/creative"
)

// UpdateStatus 修改创意状态
func UpdateStatus(clt *core.SDKClient, accessToken string, req *creative.UpdateStatusRequest) ([]int64, error) {
var resp creative.UpdateStatusResponse
err := clt.Post(accessToken, req, &resp)
if err != nil {
return nil, err
}
return resp.CreativeIDs, nil
}
16 changes: 16 additions & 0 deletions api/file/ad_app_create.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package file

import (
"github.com/bububa/kwai-marketing-api/core"
"github.com/bububa/kwai-marketing-api/model/file"
)

// AdAppCreate 创建应用
func AdAppCreate(clt *core.SDKClient, accessToken string, req *file.AdAppCreateRequest) (*file.App, error) {
var resp file.App
err := clt.Upload(accessToken, req, &resp)
if err != nil {
return nil, err
}
return &resp, nil
}
16 changes: 16 additions & 0 deletions api/file/ad_app_list.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package file

import (
"github.com/bububa/kwai-marketing-api/core"
"github.com/bububa/kwai-marketing-api/model/file"
)

// AdAppList 获取应用列表
func AdAppList(clt *core.SDKClient, accessToken string, req *file.AdAppListRequest) (*file.AdAppListResponse, error) {
var resp file.AdAppListResponse
err := clt.Get(accessToken, req, &resp)
if err != nil {
return nil, err
}
return &resp, nil
}
16 changes: 16 additions & 0 deletions api/file/ad_app_update.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package file

import (
"github.com/bububa/kwai-marketing-api/core"
"github.com/bububa/kwai-marketing-api/model/file"
)

// AdAppUpdate 修改应用
func AdAppUpdate(clt *core.SDKClient, accessToken string, req *file.AdAppUpdateRequest) (*file.App, error) {
var resp file.App
err := clt.Upload(accessToken, req, &resp)
if err != nil {
return nil, err
}
return &resp, nil
}
16 changes: 16 additions & 0 deletions api/file/ad_image_get.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package file

import (
"github.com/bububa/kwai-marketing-api/core"
"github.com/bububa/kwai-marketing-api/model/file"
)

// AdImageGet 查询图片信息get接口
func AdImageGet(clt *core.SDKClient, accessToken string, req *file.AdImageGetRequest) (*file.Image, error) {
var resp file.Image
err := clt.Get(accessToken, req, &resp)
if err != nil {
return nil, err
}
return &resp, nil
}
16 changes: 16 additions & 0 deletions api/file/ad_image_list.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package file

import (
"github.com/bububa/kwai-marketing-api/core"
"github.com/bububa/kwai-marketing-api/model/file"
)

// AdImageList 查询图片信息list接口
func AdImageList(clt *core.SDKClient, accessToken string, req *file.AdImageListRequest) (*file.AdImageListResponse, error) {
var resp file.AdImageListResponse
err := clt.Get(accessToken, req, &resp)
if err != nil {
return nil, err
}
return &resp, nil
}
16 changes: 16 additions & 0 deletions api/file/ad_image_upload_v1.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package file

import (
"github.com/bububa/kwai-marketing-api/core"
"github.com/bububa/kwai-marketing-api/model/file"
)

// AdImageUploadV1 上传图片v1接口
func AdImageUploadV1(clt *core.SDKClient, accessToken string, req *file.AdImageUploadRequestV1) (*file.Image, error) {
var resp file.Image
err := clt.Upload(accessToken, req, &resp)
if err != nil {
return nil, err
}
return &resp, nil
}
Loading

0 comments on commit cf53a0d

Please sign in to comment.