-
Notifications
You must be signed in to change notification settings - Fork 45
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
16 changed files
with
394 additions
and
87 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,11 @@ | ||
package ad | ||
|
||
import ( | ||
"github.com/bububa/oceanengine/marketing-api/core" | ||
"github.com/bububa/oceanengine/marketing-api/model/qianchuan/ad" | ||
) | ||
|
||
// MaterialDelete 删除广告创意 | ||
func MaterialDelete(clt *core.SDKClient, accessToken string, req *ad.MaterialDeleteRequest) error { | ||
return clt.Post("v1.0/qianchuan/ad/material/delete/", req, nil, accessToken) | ||
} |
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 ad | ||
|
||
import ( | ||
"github.com/bububa/oceanengine/marketing-api/core" | ||
"github.com/bububa/oceanengine/marketing-api/model/qianchuan/ad" | ||
) | ||
|
||
// MaterialGet 获取计划下素材列表 | ||
// 获取计划下的素材信息,包括素材的元信息,审核状态,关联创意ID,派生信息,是否删除等。 | ||
func MaterialGet(clt *core.SDKClient, accessToken string, req *ad.MaterialGetRequest) (*ad.MaterialGetResult, error) { | ||
var resp ad.MaterialGetResponse | ||
if err := clt.Get("v1.0/qianchuan/ad/material/get/", req, resp, accessToken); err != nil { | ||
return nil, err | ||
} | ||
return resp.Data, 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
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
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 ad | ||
|
||
import "github.com/bububa/oceanengine/marketing-api/util" | ||
|
||
// MaterialDeleteRequest 删除广告计划下素材 API Request | ||
type MaterialDeleteRequest struct { | ||
// MaterialIDs 待删除素材ID | ||
// 注意:最大支持100个素材 | ||
MaterialIDs []uint64 `json:"material_ids,omitempty"` | ||
// AdvertiserID 广告主ID | ||
AdvertiserID uint64 `json:"advertiser_id,omitempty"` | ||
// AdID 计划ID | ||
AdID uint64 `json:"ad_id,omitempty"` | ||
} | ||
|
||
// Encode implement PostRequest interface | ||
func (r MaterialDeleteRequest) Encode() []byte { | ||
return util.JSONMarshal(r) | ||
} |
Oops, something went wrong.