Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(carousel): 图文相关接口的变动 #59

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions marketing-api/api/file/audio_ad.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
)

// AudioAd 上传图文内的音频素材
// 通过此接口,用户可以上传和广告相关的音频图片,例如图文中的音频。
func AudioAd(clt *core.SDKClient, accessToken string, req *file.AudioAdRequest) (*file.Audio, error) {
var resp file.AudioAdResponse
if err := clt.Upload("2/file/video/ad/", req, &resp, accessToken); err != nil {
err := clt.Upload("2/file/audio/ad/", req, &resp, accessToken)
if err != nil {
return nil, err
}
return resp.Data.AudioInfo, nil
Expand Down
2 changes: 1 addition & 1 deletion marketing-api/api/file/carousel_ad_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
// 通过此接口,用户可以查询获取同主体下的广告主图集素材信息。
func CarouselAdGet(clt *core.SDKClient, accessToken string, req *file.CarouselAdGetRequest) (*file.CarouselAdGetResult, error) {
var resp file.CarouselAdGetResponse
if err := clt.Get("2/file/carousel/ad/get/", req, &resp, accessToken); err != nil {
if err := clt.Get("2/carousel/ad/get/", req, &resp, accessToken); err != nil {
return nil, err
}
return resp.Data, nil
Expand Down
2 changes: 1 addition & 1 deletion marketing-api/api/file/carousel_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
// 利用上述两步的图片、视频id塑造图集,获取出参图集mid。不同图片顺序对应不同的图集mid。
func CarouselCreate(clt *core.SDKClient, accessToken string, req *file.CarouselCreateRequest) (*file.Carousel, error) {
var resp file.CarouselCreateResponse
if err := clt.Post("2/file/carousel/create/", req, &resp, accessToken); err != nil {
if err := clt.Post("2/carousel/create/", req, &resp, accessToken); err != nil {
return nil, err
}
return resp.Data.Carousel, nil
Expand Down
2 changes: 1 addition & 1 deletion marketing-api/api/file/carousel_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
// 通过此接口,用户可以对素材视频进行批量删除。当素材删除失败时,会展示在carousel_id列表,不在此列表内的素材表示删除成功!
func CarouselDelete(clt *core.SDKClient, accessToken string, req *file.CarouselDeleteRequest) (*file.CarouselDeleteResult, error) {
var resp file.CarouselDeleteResponse
if err := clt.Post("2/file/carousel/delete/", req, &resp, accessToken); err != nil {
if err := clt.Post("2/carousel/delete/", req, &resp, accessToken); err != nil {
return nil, err
}
return resp.Data, nil
Expand Down
2 changes: 1 addition & 1 deletion marketing-api/api/file/carousel_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
// 通过此接口,用户可以获取经过一定条件过滤后的广告主下创意素材库对应的图集及图集信息。
func CarouselList(clt *core.SDKClient, accessToken string, req *file.CarouselListRequest) (*file.CarouselListResult, error) {
var resp file.CarouselListResponse
if err := clt.Get("2/file/carousel/list/", req, &resp, accessToken); err != nil {
if err := clt.Get("2/carousel/list/", req, &resp, accessToken); err != nil {
return nil, err
}
return resp.Data, nil
Expand Down
2 changes: 1 addition & 1 deletion marketing-api/api/file/carousel_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
// 更细图集信息,目前仅支持图集 file_name 和主题修改
func CarouselUpdate(clt *core.SDKClient, accessToken string, req *file.CarouselUpdateRequest) ([]file.CarouselUpdateResult, error) {
var resp file.CarouselUpdateResponse
if err := clt.Post("2/file/carousel/update/", req, &resp, accessToken); err != nil {
if err := clt.Post("2/carousel/update/", req, &resp, accessToken); err != nil {
return nil, err
}
return resp.Data.Carousels, nil
Expand Down
Loading