-
Notifications
You must be signed in to change notification settings - Fork 43
/
pic_url_get.go
38 lines (33 loc) · 1.03 KB
/
pic_url_get.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
package sitetemplate
import (
"strconv"
"github.com/bububa/oceanengine/marketing-api/model"
"github.com/bububa/oceanengine/marketing-api/util"
)
// PicURLGetRequest 获取模板/站点URL API Request
type PicURLGetRequest struct {
// AdvertiserID 广告主ID
AdvertiserID uint64 `json:"advertiser_id,omitempty"`
// SiteID 站点id
SiteID uint64 `json:"site_id,omitempty"`
// TemplateID 模板id
TemplateID uint64 `json:"template_id,omitempty"`
}
// Encode implement GetRequest interface
func (r PicURLGetRequest) Encode() string {
values := util.GetUrlValues()
values.Set("advertiser_id", strconv.FormatUint(r.AdvertiserID, 10))
values.Set("site_id", strconv.FormatUint(r.SiteID, 10))
values.Set("template_id", strconv.FormatUint(r.TemplateID, 10))
ret := values.Encode()
util.PutUrlValues(values)
return ret
}
// PicURLGetResponse 获取模板/站点URL API Response
type PicURLGetResponse struct {
model.BaseResponse
Data struct {
// URLMap uri
URLMap map[string]string `json:"url_map,omitempty"`
} `json:"data,omitempty"`
}