-
Notifications
You must be signed in to change notification settings - Fork 42
/
assets_detail_read.go
37 lines (32 loc) · 1.04 KB
/
assets_detail_read.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
package dpa
import (
"encoding/json"
"strconv"
"github.com/bububa/oceanengine/marketing-api/model"
"github.com/bububa/oceanengine/marketing-api/util"
)
// AssetsDetailReadRequest 获取投放条件详情 API Request
type AssetsDetailReadRequest struct {
// AdvertiserID 广告主ID
AdvertiserID uint64 `json:"advertiser_id,omitempty"`
// AssetIDs 物件ID, 最多允许传入100个,可通过【获取投放条件列表】获取
AssetIDs []uint64 `json:"asset_ids,omitempty"`
}
// Encode implement GetRequest interface
func (r AssetsDetailReadRequest) Encode() string {
values := util.GetUrlValues()
values.Set("advertiser_id", strconv.FormatUint(r.AdvertiserID, 10))
bs, _ := json.Marshal(r.AssetIDs)
values.Set("asset_ids", string(bs))
ret := values.Encode()
util.PutUrlValues(values)
return ret
}
// AssetsDetailReadResponse 获取投放条件详情 API Response
type AssetsDetailReadResponse struct {
model.BaseResponse
Data struct {
// List 商品库商品列表
List []Asset `json:"list,omitempty"`
} `json:"data,omitempty"`
}