-
Notifications
You must be signed in to change notification settings - Fork 43
/
delete.go
36 lines (31 loc) · 1.04 KB
/
delete.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package keyword
import (
"github.com/bububa/oceanengine/marketing-api/model"
"github.com/bububa/oceanengine/marketing-api/util"
)
// DeleteRequest 删除关键词 API Request
type DeleteRequest struct {
// AdvertiserID 广告主ID
AdvertiserID uint64 `json:"advertiser_id,omitempty"`
// AdID 待删除关键词的计划ID
AdID uint64 `json:"ad_id,omitempty"`
// KeywordIDs 待删除的关键词id列表,一次最多批量删除100个关键词
KeywordIDs []uint64 `json:"keyword_ids,omitempty"`
}
// Encode implement PostRequest interface
func (r DeleteRequest) Encode() []byte {
return util.JSONMarshal(r)
}
// DeleteResponse 关键词 API Response
type DeleteResponse struct {
model.BaseResponse
// Data json返回值
Data *DeleteResponseData `json:"data,omitempty"`
}
// DeleteResponseData json返回值
type DeleteResponseData struct {
// ErrorList 添加失败的搜索关键词列表
ErrorList []Keyword `json:"error_list,omitempty"`
// SuccessList 添加成功的搜索关键词列表
SuccessList []uint64 `json:"success_list,omitempty"`
}