From 137d354de5d5cfef1992efdfe2771049be923059 Mon Sep 17 00:00:00 2001 From: C <353932158@qq.com> Date: Tue, 9 Jan 2024 15:33:44 +0800 Subject: [PATCH] =?UTF-8?q?refactor(carousel):=20=E5=9B=BE=E6=96=87?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3=E7=9A=84=E5=8F=98=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- marketing-api/api/file/audio_ad.go | 4 ++-- marketing-api/api/file/carousel_ad_get.go | 2 +- marketing-api/api/file/carousel_create.go | 2 +- marketing-api/api/file/carousel_delete.go | 2 +- marketing-api/api/file/carousel_list.go | 2 +- marketing-api/api/file/carousel_update.go | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/marketing-api/api/file/audio_ad.go b/marketing-api/api/file/audio_ad.go index 7b32dd0f..6eb2bcfb 100644 --- a/marketing-api/api/file/audio_ad.go +++ b/marketing-api/api/file/audio_ad.go @@ -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 diff --git a/marketing-api/api/file/carousel_ad_get.go b/marketing-api/api/file/carousel_ad_get.go index a2330473..cacca0a4 100644 --- a/marketing-api/api/file/carousel_ad_get.go +++ b/marketing-api/api/file/carousel_ad_get.go @@ -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 diff --git a/marketing-api/api/file/carousel_create.go b/marketing-api/api/file/carousel_create.go index 148bb575..3f76743a 100644 --- a/marketing-api/api/file/carousel_create.go +++ b/marketing-api/api/file/carousel_create.go @@ -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 diff --git a/marketing-api/api/file/carousel_delete.go b/marketing-api/api/file/carousel_delete.go index 1a254444..1b61a420 100644 --- a/marketing-api/api/file/carousel_delete.go +++ b/marketing-api/api/file/carousel_delete.go @@ -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 diff --git a/marketing-api/api/file/carousel_list.go b/marketing-api/api/file/carousel_list.go index 2f9b9456..69e774cd 100644 --- a/marketing-api/api/file/carousel_list.go +++ b/marketing-api/api/file/carousel_list.go @@ -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 diff --git a/marketing-api/api/file/carousel_update.go b/marketing-api/api/file/carousel_update.go index 0ade8375..57a5cb06 100644 --- a/marketing-api/api/file/carousel_update.go +++ b/marketing-api/api/file/carousel_update.go @@ -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