aa
This commit is contained in:
@@ -25,7 +25,7 @@ func init() {
|
|||||||
// prod
|
// prod
|
||||||
api = New("3c0a05d464c247c19d7ec13accc78605", "b1M}9?:sTbsB[OF2gNORnN(|(iy9rB8(`7]|[wGLnbmt`evfM>E:A90DjHAW:UPE")
|
api = New("3c0a05d464c247c19d7ec13accc78605", "b1M}9?:sTbsB[OF2gNORnN(|(iy9rB8(`7]|[wGLnbmt`evfM>E:A90DjHAW:UPE")
|
||||||
|
|
||||||
api.SetCookie("token", "N1oMKRJNAzIcgBLC-tz6b83kmc-hkam-yXoCirAYfvqkg9Em_FLn88S60bEzj8HtYZVZqx7NyQ7WL8ErvoI9eA")
|
api.SetCookie("token", "DviwXn2qfstXdi64jbTES0MyEkyUQiCKHhWYLC2yb41BOl-NvIg0ffKJfUR58pGwEA-yB15Sxo02F-5iAbD2vw")
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleError(t *testing.T, err error) {
|
func handleError(t *testing.T, err error) {
|
||||||
|
|||||||
@@ -168,3 +168,19 @@ func (a *API) GetStoreInfo(outerPoiId int) (getStoreInfoResult []*GetStoreInfoRe
|
|||||||
}
|
}
|
||||||
return getStoreInfoResult, err
|
return getStoreInfoResult, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (a *API) GetStoreInfoByID(outerPoiId int) (getStoreInfoResult *GetStoreStatusResult, err error) {
|
||||||
|
params := map[string]interface{}{
|
||||||
|
"outerPoiId": outerPoiId,
|
||||||
|
"pageNum": 1,
|
||||||
|
"pageSize": 20,
|
||||||
|
"cityId": -1,
|
||||||
|
}
|
||||||
|
result, err := a.AccessAPI2("https://peisong.meituan.com/api", "haikuiopen/haikui/open/partner/poi/search", params)
|
||||||
|
if err == nil {
|
||||||
|
if result.Data["dataList"] != nil {
|
||||||
|
utils.Map2StructByJson(result.Data["dataList"].([]interface{})[0], &getStoreInfoResult, false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return getStoreInfoResult, err
|
||||||
|
}
|
||||||
|
|||||||
@@ -43,3 +43,11 @@ func TestGetStoreInfo(t *testing.T) {
|
|||||||
}
|
}
|
||||||
t.Log(utils.Format4Output(result, false))
|
t.Log(utils.Format4Output(result, false))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestGetStoreInfoByID(t *testing.T) {
|
||||||
|
result, err := api.GetStoreInfoByID(800002)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
t.Log(utils.Format4Output(result, false))
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user