- SupplierList

This commit is contained in:
gazebo
2018-09-23 23:25:48 +08:00
parent 3072d0f66b
commit 7483b12dce
2 changed files with 17 additions and 0 deletions

View File

@@ -172,3 +172,11 @@ func (a *API) ShopClose(shopID string, baiduShopID int64) (err error) {
}
return err
}
func (a *API) SupplierList() (supplierInfo map[string]interface{}, err error) {
result, err := a.AccessAPI("supplier.list", nil)
if err == nil {
return result.Data.(map[string]interface{}), nil
}
return nil, err
}

View File

@@ -74,3 +74,12 @@ func TestShopIDBatchUpdate(t *testing.T) {
// t.Fatal(err)
// }
}
func TestSupplierList(t *testing.T) {
result, err := api.SupplierList()
if err != nil {
t.Fatal(err)
} else {
t.Log(utils.Format4Output(result, false))
}
}