-
Notifications
You must be signed in to change notification settings - Fork 42
/
campaign_add.go
52 lines (46 loc) · 2.01 KB
/
campaign_add.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package privativeword
import (
"github.com/bububa/oceanengine/marketing-api/model"
"github.com/bububa/oceanengine/marketing-api/util"
)
// CampaignAddRequest 批量新增组否定词 API Request
type CampaignAddRequest struct {
// AdvertiserID 广告主ID
AdvertiserID uint64 `json:"advertiser_id,omitempty"`
// CampaignList 广告组否定词列表,批量操作不能超过50个项目
CampaignList []AdWord `json:"campaign_list,omitempty"`
}
// Encode implement PostRequest interface
func (r CampaignAddRequest) Encode() []byte {
return util.JSONMarshal(r)
}
// CampaignAddResponse 批量新增组否定词 API Response
type CampaignAddResponse struct {
model.BaseResponse
// Data json返回值
Data *CampaignAddResponseData `json:"data,omitempty"`
}
// CampaignAddResponseData json返回值
type CampaignAddResponseData struct {
// CampaignErrorList 请求失败的广告组id
CampaignErrorList []string `json:"campaign_error_list,omitempty"`
// CampaignList 添加成功的广告组否定词列表
CampaignList []CampaignAddWordList `json:"campaign_list,omitempty"`
}
// CampaignAddWordList 添加广告组否定词计划结果
type CampaignAddWordList struct {
// CampaignID 广告组id
CampaignID uint64 `json:"campaign_id,omitempty"`
// Status 操作执行状态,只要有操作失败的词,就返回 failure,全部成功返回 success
Status string `json:"status,omitempty"`
// DuplicateWords 有重复的否定词词导致操作失败的列表
DuplicateWords []AdWord `json:"duplicate_words,omitempty"`
// ExceedLengthWords 否定词词超过200个导致操作失败的列表
ExceedLengthWords []AdWord `json:"exceed_length_words,omitempty"`
// ExceedLimitWords 单个否定词的长度超过限制导致操作失败的列表
ExceedLimitWords []AdWord `json:"exceed_limit_words,omitempty"`
// HasEmojiWords 有 emoji 导致操作失败的列表
HasEmojiWords []AdWord `json:"has_emoji_words,omitempty"`
// SuccessWords 操作成功的否定词列表
SuccessWords []AdWord `json:"success_words,omitempty"`
}