-
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
143 changed files
with
2,998 additions
and
20 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 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 | ||
} |
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 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 | ||
} |
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 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 | ||
} |
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 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 | ||
} |
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 asset 高级创意相关接口 | ||
package asset |
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 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 | ||
} |
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 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 | ||
} |
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/creative" | ||
) | ||
|
||
// AdvancedProgramUpdate 修改程序化2.0创意 | ||
func AdvancedProgramUpdate(clt *core.SDKClient, accessToken string, req *creative.AdvancedProgramUpdateRequest) 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,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 | ||
} |
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 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 | ||
} |
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 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 | ||
} |
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/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,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 | ||
} |
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 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 | ||
} |
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 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 | ||
} |
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 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 | ||
} |
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 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 | ||
} |
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 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 | ||
} |
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 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 | ||
} |
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 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 | ||
} |
Oops, something went wrong.