fetchApps
The fetchApps API is called by the super app to run a query with FetchAppRequestVO to asynchronously fetch a list of mini programs that are launched to their app. This API provides a pagination capability to return the data.
Method signature
void fetchApps(FetchAppRequestVO fetchAppRequestVO, OnRpcResultListener<FetchAppsResult> listListener)
Request parameters
Response parameters
Name | Type | Description | Required |
result | The mini program list that is returned when the query is successful. | O | |
error | The error code and error message that are returned when the query fails. | O |
Error codes
Error code | Error message | Description | Further action |
2 | INVALID_PARAMETER | Parameter error. | Refer to the Request parameters table and check if all parameter types are correct and if all required parameters are specified. |
3 | UNKNOWN_ERROR | Server fluctuations. | Retry the request. If the problem persists, please contact overseas_support@service.alibaba.com for assistance. |
10104 | NETWORK_ERROR | Network error. | Check the network connection and try again. |
Samples
Kotlin
val fetchAppRequestVO = FetchAppRequestVO(queryStartIndex, querySize)
fetchAppRequestVO.setCategory(category)
fetchAppRequestVO.setRelatedEnv(relatedEnv)
Griver.fetchApps(fetchAppRequestVO, object : OnRpcResultListener<FetchAppsResult?>() {
fun onResultSuccess(result: FetchAppsResult?) {
//return the mini program list
}
fun onResultFailed(errorCode: Int, errorMessage: String?) {
//return the error code and error message
}
})
Java
FetchAppsRequestVO fetchAppRequestVO = new FetchAppRequestVO(queryStartIndex,querySize);
fetchAppRequestVO.setCategory(category);
fetchAppRequestVO.setRelatedEnv(relatedEnv);
Griver.fetchApps(fetchAppRequestVO,
new OnRpcResultListener<FetchAppsResult>() {
@Override
public void onResultSuccess(FetchAppsResult result) {
//return the mini program list
}
@Override
public void onResultFailed(int errorCode, String errorMessage) {
//return the error code and error message
}
});