- ebai.api.ShopAptitudeGet

This commit is contained in:
gazebo
2019-04-17 14:46:00 +08:00
parent c3899c1ad1
commit 3f924dafb8
2 changed files with 18 additions and 0 deletions

View File

@@ -207,3 +207,12 @@ func (a *API) SupplierList() (supplierInfo map[string]interface{}, err error) {
}
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
}

View File

@@ -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) {
params := map[string]interface{}{
KeyName: "好菜鲜生-测试店1",