- ebai.api.ShopAptitudeGet
This commit is contained in:
@@ -207,3 +207,12 @@ func (a *API) SupplierList() (supplierInfo map[string]interface{}, err error) {
|
|||||||
}
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (a *API) ShopAptitudeGet(shopID string, baiduShopID int64) (shopInfoList []map[string]interface{}, err error) {
|
||||||
|
params := a.genShopIDParams(shopID, baiduShopID, 0)
|
||||||
|
result, err := a.AccessAPI("shop.aptitude.get", params)
|
||||||
|
if err == nil {
|
||||||
|
return utils.Slice2MapSlice(result.Data.([]interface{})), nil
|
||||||
|
}
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|||||||
@@ -41,6 +41,15 @@ func TestShopGet(t *testing.T) {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestShopAptitudeGet(t *testing.T) {
|
||||||
|
result, err := api.ShopAptitudeGet("", testShopBaiduID)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
} else {
|
||||||
|
t.Log(utils.Format4Output(result, false))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func TestShopUpdate(t *testing.T) {
|
func TestShopUpdate(t *testing.T) {
|
||||||
params := map[string]interface{}{
|
params := map[string]interface{}{
|
||||||
KeyName: "好菜鲜生-测试店1",
|
KeyName: "好菜鲜生-测试店1",
|
||||||
|
|||||||
Reference in New Issue
Block a user