-
Notifications
You must be signed in to change notification settings - Fork 9
/
AliexpressUsergrowthSearchItemsGetAPIRequest.go
174 lines (149 loc) · 4.98 KB
/
AliexpressUsergrowthSearchItemsGetAPIRequest.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
package aeusergrowth
import (
"net/url"
"sync"
"github.com/bububa/opentaobao/model"
)
// AliexpressUsergrowthSearchItemsGetAPIRequest 第三方平台搜索AE商品 API请求
// aliexpress.usergrowth.search.items.get
//
// 第三方平台的搜索服务 获取AE商品list
type AliexpressUsergrowthSearchItemsGetAPIRequest struct {
model.Params
// user input keypods
_keywords string
// Third party tracking_id
_trackingId string
// currency code
_currencyCode string
// language
_language string
// page size
_pageSize string
// page index
_pageIndex string
// ship to country
_countryCode string
}
// NewAliexpressUsergrowthSearchItemsGetRequest 初始化AliexpressUsergrowthSearchItemsGetAPIRequest对象
func NewAliexpressUsergrowthSearchItemsGetRequest() *AliexpressUsergrowthSearchItemsGetAPIRequest {
return &AliexpressUsergrowthSearchItemsGetAPIRequest{
Params: model.NewParams(7),
}
}
// Reset IRequest interface 方法, 清空结构体
func (r *AliexpressUsergrowthSearchItemsGetAPIRequest) Reset() {
r._keywords = ""
r._trackingId = ""
r._currencyCode = ""
r._language = ""
r._pageSize = ""
r._pageIndex = ""
r._countryCode = ""
r.Params.ToZero()
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r AliexpressUsergrowthSearchItemsGetAPIRequest) GetApiMethodName() string {
return "aliexpress.usergrowth.search.items.get"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r AliexpressUsergrowthSearchItemsGetAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r AliexpressUsergrowthSearchItemsGetAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetKeywords is Keywords Setter
// user input keypods
func (r *AliexpressUsergrowthSearchItemsGetAPIRequest) SetKeywords(_keywords string) error {
r._keywords = _keywords
r.Set("keywords", _keywords)
return nil
}
// GetKeywords Keywords Getter
func (r AliexpressUsergrowthSearchItemsGetAPIRequest) GetKeywords() string {
return r._keywords
}
// SetTrackingId is TrackingId Setter
// Third party tracking_id
func (r *AliexpressUsergrowthSearchItemsGetAPIRequest) SetTrackingId(_trackingId string) error {
r._trackingId = _trackingId
r.Set("tracking_id", _trackingId)
return nil
}
// GetTrackingId TrackingId Getter
func (r AliexpressUsergrowthSearchItemsGetAPIRequest) GetTrackingId() string {
return r._trackingId
}
// SetCurrencyCode is CurrencyCode Setter
// currency code
func (r *AliexpressUsergrowthSearchItemsGetAPIRequest) SetCurrencyCode(_currencyCode string) error {
r._currencyCode = _currencyCode
r.Set("currency_code", _currencyCode)
return nil
}
// GetCurrencyCode CurrencyCode Getter
func (r AliexpressUsergrowthSearchItemsGetAPIRequest) GetCurrencyCode() string {
return r._currencyCode
}
// SetLanguage is Language Setter
// language
func (r *AliexpressUsergrowthSearchItemsGetAPIRequest) SetLanguage(_language string) error {
r._language = _language
r.Set("language", _language)
return nil
}
// GetLanguage Language Getter
func (r AliexpressUsergrowthSearchItemsGetAPIRequest) GetLanguage() string {
return r._language
}
// SetPageSize is PageSize Setter
// page size
func (r *AliexpressUsergrowthSearchItemsGetAPIRequest) SetPageSize(_pageSize string) error {
r._pageSize = _pageSize
r.Set("page_size", _pageSize)
return nil
}
// GetPageSize PageSize Getter
func (r AliexpressUsergrowthSearchItemsGetAPIRequest) GetPageSize() string {
return r._pageSize
}
// SetPageIndex is PageIndex Setter
// page index
func (r *AliexpressUsergrowthSearchItemsGetAPIRequest) SetPageIndex(_pageIndex string) error {
r._pageIndex = _pageIndex
r.Set("page_index", _pageIndex)
return nil
}
// GetPageIndex PageIndex Getter
func (r AliexpressUsergrowthSearchItemsGetAPIRequest) GetPageIndex() string {
return r._pageIndex
}
// SetCountryCode is CountryCode Setter
// ship to country
func (r *AliexpressUsergrowthSearchItemsGetAPIRequest) SetCountryCode(_countryCode string) error {
r._countryCode = _countryCode
r.Set("country_code", _countryCode)
return nil
}
// GetCountryCode CountryCode Getter
func (r AliexpressUsergrowthSearchItemsGetAPIRequest) GetCountryCode() string {
return r._countryCode
}
var poolAliexpressUsergrowthSearchItemsGetAPIRequest = sync.Pool{
New: func() any {
return NewAliexpressUsergrowthSearchItemsGetRequest()
},
}
// GetAliexpressUsergrowthSearchItemsGetRequest 从 sync.Pool 获取 AliexpressUsergrowthSearchItemsGetAPIRequest
func GetAliexpressUsergrowthSearchItemsGetAPIRequest() *AliexpressUsergrowthSearchItemsGetAPIRequest {
return poolAliexpressUsergrowthSearchItemsGetAPIRequest.Get().(*AliexpressUsergrowthSearchItemsGetAPIRequest)
}
// ReleaseAliexpressUsergrowthSearchItemsGetAPIRequest 将 AliexpressUsergrowthSearchItemsGetAPIRequest 放入 sync.Pool
func ReleaseAliexpressUsergrowthSearchItemsGetAPIRequest(v *AliexpressUsergrowthSearchItemsGetAPIRequest) {
v.Reset()
poolAliexpressUsergrowthSearchItemsGetAPIRequest.Put(v)
}