-
Notifications
You must be signed in to change notification settings - Fork 23
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
72 changed files
with
2,678 additions
and
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package adcompass | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/adcompass" | ||
) | ||
|
||
// Advertisers 获取罗盘绑定广告主列 | ||
func Advertisers(clt *core.SDKClient, accessToken string, advertiserID uint64) ([]adcompass.Advertiser, error) { | ||
req := &adcompass.AdvertisersRequest{ | ||
AdvertiserID: advertiserID, | ||
} | ||
var resp adcompass.AdvertisersResponse | ||
err := clt.Post(accessToken, req, &resp) | ||
if err != nil { | ||
return nil, err | ||
} | ||
return resp.Details, 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 adcompass 账户罗盘 | ||
package adcompass |
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,15 @@ | ||
package adcompass | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/adcompass" | ||
) | ||
|
||
// QuotaTending 磁力罗盘对外 quota 腾挪接口 | ||
func QuotaTending(clt *core.SDKClient, accessToken string, req *adcompass.QuotaTendingRequest) (string, error) { | ||
var resp adcompass.QuotaTendingResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return "", err | ||
} | ||
return resp.Describe, nil | ||
} |
This file was deleted.
Oops, something went wrong.
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 campaign | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/dsp/campaign" | ||
) | ||
|
||
// Create 创建广告计划 | ||
// 【注】创建搜索广告计划。每个广告主账号下最多可允许创建500个计划 | ||
func Create(clt *core.SDKClient, accessToken string, req *campaign.CreateRequest) (uint64, error) { | ||
var resp campaign.CreateResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return 0, err | ||
} | ||
return resp.CampaignID, 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 campaign 广告计划 | ||
package campaign |
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,15 @@ | ||
package campaign | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/dsp/campaign" | ||
) | ||
|
||
// List 获取广告计划信息 | ||
func List(clt *core.SDKClient, accessToken string, req *campaign.ListRequest) (*campaign.ListResponse, error) { | ||
var resp campaign.ListResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return nil, err | ||
} | ||
return &resp, 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,15 @@ | ||
package campaign | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/dsp/campaign" | ||
) | ||
|
||
// Update 修改广告计划 | ||
func Update(clt *core.SDKClient, accessToken string, req *campaign.UpdateRequest) (uint64, error) { | ||
var resp campaign.UpdateResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return 0, err | ||
} | ||
return resp.CampaignID, 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,15 @@ | ||
package campaign | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/dsp/campaign" | ||
) | ||
|
||
// UpdateStatus 修改广告计划状态 | ||
func UpdateStatus(clt *core.SDKClient, accessToken string, req *campaign.UpdateStatusRequest) ([]uint64, error) { | ||
var resp campaign.UpdateStatusResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return nil, err | ||
} | ||
return resp.CampaignIDs, 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,15 @@ | ||
package creative | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/dsp/creative" | ||
) | ||
|
||
// AdvancedCreativeCreate 创建程序化创意 | ||
func AdvancedCreativeCreate(clt *core.SDKClient, accessToken string, req *creative.AdvancedCreativeCreateRequest) (uint64, error) { | ||
var resp creative.AdvancedCreativeCreateResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return 0, err | ||
} | ||
return resp.UnitID, 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,15 @@ | ||
package creative | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/dsp/creative" | ||
) | ||
|
||
// AdvancedCreativeList 查询程序化创意 | ||
func AdvancedCreativeList(clt *core.SDKClient, accessToken string, req *creative.AdvancedCreativeListRequest) (*creative.AdvancedCreativeListResponse, error) { | ||
var resp creative.AdvancedCreativeListResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return nil, err | ||
} | ||
return &resp, 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,15 @@ | ||
package creative | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/dsp/creative" | ||
) | ||
|
||
// AdvancedCreativeUpdate 修改程序化创意 | ||
func AdvancedCreativeUpdate(clt *core.SDKClient, accessToken string, req *creative.AdvancedCreativeUpdateRequest) (uint64, error) { | ||
var resp creative.AdvancedCreativeUpdateResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return 0, err | ||
} | ||
return resp.UnitID, 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,15 @@ | ||
package creative | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/dsp/creative" | ||
) | ||
|
||
// BatchUpdate 批量修改自定义创意 | ||
func BatchUpdate(clt *core.SDKClient, accessToken string, req *creative.BatchUpdateRequest) (*creative.BatchUpdateResponse, error) { | ||
var resp creative.BatchUpdateResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return nil, err | ||
} | ||
return &resp, 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,15 @@ | ||
package creative | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/dsp/creative" | ||
) | ||
|
||
// Create 创建自定义创意 | ||
func Create(clt *core.SDKClient, accessToken string, req *creative.CreateRequest) (uint64, error) { | ||
var resp creative.CreateResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return 0, err | ||
} | ||
return resp.CreativeID, 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 creative 广告创意 | ||
package creative |
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,15 @@ | ||
package creative | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/dsp/creative" | ||
) | ||
|
||
// List 查询自定义创意 | ||
func List(clt *core.SDKClient, accessToken string, req *creative.ListRequest) (*creative.ListResponse, error) { | ||
var resp creative.ListResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return nil, err | ||
} | ||
return &resp, 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,11 @@ | ||
package creative | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/dsp/creative" | ||
) | ||
|
||
// Preview 创意体验 | ||
func Preview(clt *core.SDKClient, accessToken string, req *creative.PreviewRequest) error { | ||
return clt.Post(accessToken, req, 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,15 @@ | ||
package creative | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/dsp/creative" | ||
) | ||
|
||
// Update 修改自定义创意 | ||
func Update(clt *core.SDKClient, accessToken string, req *creative.UpdateRequest) (uint64, error) { | ||
var resp creative.UpdateResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return 0, err | ||
} | ||
return resp.CreativeID, 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,15 @@ | ||
package creative | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/dsp/creative" | ||
) | ||
|
||
// UpdateStatus 修改创意状态 | ||
func UpdateStatus(clt *core.SDKClient, accessToken string, req *creative.UpdateStatusRequest) ([]uint64, error) { | ||
var resp creative.UpdateStatusResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return nil, err | ||
} | ||
return resp.CreativeIDs, 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 dsp 智能化创编 | ||
package dsp |
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,15 @@ | ||
package unit | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/dsp/unit" | ||
) | ||
|
||
// Create 创建广告组 | ||
func Create(clt *core.SDKClient, accessToken string, req *unit.CreateRequest) (uint64, error) { | ||
var resp unit.CreateResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return 0, err | ||
} | ||
return resp.UnitID, 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 unit 广告组 | ||
package unit |
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,15 @@ | ||
package unit | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/dsp/unit" | ||
) | ||
|
||
// List 获取广告组信息 | ||
func List(clt *core.SDKClient, accessToken string, req *unit.ListRequest) (*unit.ListResponse, error) { | ||
var resp unit.ListResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return nil, err | ||
} | ||
return &resp, 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,15 @@ | ||
package unit | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/dsp/unit" | ||
) | ||
|
||
// Update 修改广告组 | ||
func Update(clt *core.SDKClient, accessToken string, req *unit.UpdateRequest) (uint64, error) { | ||
var resp unit.UpdateResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return 0, err | ||
} | ||
return resp.UnitID, 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,11 @@ | ||
package unit | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/dsp/unit" | ||
) | ||
|
||
// UpdateBid 修改广告组出价 | ||
func UpdateBid(clt *core.SDKClient, accessToken string, req *unit.UpdateBidRequest) error { | ||
return clt.Post(accessToken, req, 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,11 @@ | ||
package unit | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/dsp/unit" | ||
) | ||
|
||
// UpdateDayBudget 修改广告组预算 | ||
func UpdateDayBudget(clt *core.SDKClient, accessToken string, req *unit.UpdateDayBudgetRequest) error { | ||
return clt.Post(accessToken, req, nil) | ||
} |
Oops, something went wrong.