|
|
@@ -39,9 +39,19 @@ func (a *BlockchainApi) HelloWorld(request HelloWorldRequest) (string, error) {
|
|
|
return HttpPost(url, jsonData)
|
|
|
}
|
|
|
|
|
|
-func (a *BlockchainApi) V2LpCountByChainId(request V2LpCountByChainIdRequest) (string, error) {
|
|
|
+func (a *BlockchainApi) V2LpCountByChainId(request V2LpCountByChainIdRequest) (V2LpCountByChainIdResult, error) {
|
|
|
url := a.baseUrl + "/v2-lp/countByChainId"
|
|
|
jsonData, _ := json.Marshal(request)
|
|
|
|
|
|
- return HttpPost(url, jsonData)
|
|
|
+ rstStr, err := HttpPost(url, jsonData)
|
|
|
+ if err != nil {
|
|
|
+ return V2LpCountByChainIdResult{}, err
|
|
|
+ }
|
|
|
+
|
|
|
+ result := V2LpCountByChainIdResult{
|
|
|
+ Origin: rstStr,
|
|
|
+ }
|
|
|
+ json.Unmarshal([]byte(rstStr), &result)
|
|
|
+
|
|
|
+ return result, err
|
|
|
}
|