Documentation
¶
Overview ¶
Package model API models
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseResponse ¶
type BaseResponse struct { // RequestID . RequestID string `json:"request_id,omitempty" xml:"request_id,omitempty"` }
BaseResponse .
type CommonRequest ¶
type CommonRequest struct { // Type API接口名,形如:pdd.* Type string `json:"type,omitempty"` // ClientID 已创建成功的应用标志client_id,可在应用详情和中查看 ClientID string `json:"client_id,omitempty"` // Timestamp 时间戳,格式为UNIX时间(秒) Timestamp int64 `json:"timestamp,omitempty"` // Sign API入参参数签名,签名值根据如下算法给出计算过程 Sign string `json:"sign,omitempty"` // DataType 请求返回的数据格式,可选参数为XML或JSON,默认为JSON DataType RequestDataType `json:"data_type,omitempty"` // AccessToken 用户授权令牌access_token,通过pdd.pop.auth.token.create获取 AccessToken string `json:"access_token,omitempty"` // Version API版本,默认为V1,无要求不传此参数 Version string `json:"version,omitempty"` }
CommonRequest 请求公共参数
func (CommonRequest) GetType ¶
func (r CommonRequest) GetType() string
GetType implement Request interface
type CommonResponse ¶
type CommonResponse struct {
ErrorResponse *ErrorResponse `json:"error_response,omitempty" xml:"error_response,omitempty"`
}
CommonResponse API Response
type ErrorResponse ¶
type ErrorResponse struct { BaseResponse ErrorCode int `json:"error_code" xml:"error_code"` ErrorMsg string `json:"error_msg" xml:"error_msg"` SubMsg string `json:"sub_msg" xml:"sub_msg"` SubCode string `json:"sub_code" xml:"sub_code"` }
ErrorResponse Response Error
type FlexUint64 ¶
type FlexUint64 uint64
FlexUint64 support string quoted number in json
func (*FlexUint64) UnmarshalJSON ¶
func (fu64 *FlexUint64) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implement json Unmarshal interface
type RequestDataType ¶
type RequestDataType string
RequestDataType 请求返回的数据格式,可选参数为XML或JSON,默认为JSON
const ( // RequestDataType_JSON 返回JSON格式 RequestDataType_JSON RequestDataType = "JSON" // RequestDataType_XML 返回X M Lg格式 RequestDataType_XML RequestDataType = "XML" )
Click to show internal directories.
Click to hide internal directories.