- autonavi api added.
- other refactor.
This commit is contained in:
@@ -142,10 +142,10 @@ func (a *API) AccessAPI(apiStr string, jdParams map[string]interface{}) (retVal
|
||||
sign := a.signParams(params)
|
||||
params[signKey] = sign
|
||||
|
||||
url, _ := url.Parse(utils.GenerateGetURL(prodURL, apiStr, params))
|
||||
finalURL, _ := url.Parse(utils.GenerateGetURL(prodURL, apiStr, params))
|
||||
request := &http.Request{
|
||||
Method: "GET",
|
||||
URL: url,
|
||||
URL: finalURL,
|
||||
}
|
||||
err = platformapi.AccessPlatformAPIWithRetry(a.client, request, a.config, func(response *http.Response) (errLevel string, err error) {
|
||||
jsonResult1, err := utils.HTTPResponse2Json(response)
|
||||
|
||||
@@ -39,6 +39,16 @@ const (
|
||||
DeliveryStatusFinished = "40"
|
||||
)
|
||||
|
||||
const (
|
||||
PromotionTypeNormal = 1
|
||||
PromotionTypeSeckill = 2
|
||||
PromotionTypeDirectDown = 3
|
||||
PromotionTypeLimitedTime = 4
|
||||
PromotionTypeAddMoneyBuy = 1202
|
||||
PromotionTypeOverflowGiveGift = 1203
|
||||
PromotionTypeBuyGiveGift = 6
|
||||
)
|
||||
|
||||
func (a API) OrderQuery(jdParams map[string]interface{}) (retVal []interface{}, err error) {
|
||||
retVal, err = a.AccessAPIHavePage("order/es/query", jdParams, nil, nil, nil)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user