fetchAppInfoListByIds
The fetchAppInfoListByIds API is called by the super app to run a query with FetchAppsByIdsRequest 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 fetchAppInfoListByIds(FetchAppsByIdsRequest request,OnRpcResultListener<AppInfosResult> listListener) Request parameters
| Name | Type | Description | Required | 
| request | An object that is used to set the query conditions of mini programs. | M | |
| listListener | OnRpcResultListener<AppInfosResult> | The callback function that is used to return the query result. 
 | M | 
Response parameters
| Name | Type | Description | Required | 
| onResultSuccess | The mini program list that is returned when the query is successful. | O | |
| onResultFailed | 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 ids: MutableList<String> = ArrayList()
ids.add("your miniprogram appId")
val fetchAppsByIdsRequest = FetchAppsByIdsRequest(ids)
fetchAppsByIdsRequest.setCategory(category)
fetchAppsByIdsRequest.setRelatedEnv(relatedEnv)
Griver.fetchAppInfoListByIds(fetchAppsByIdsRequest, object : OnRpcResultListener<AppInfosResult?>() {
      fun onResultSuccess(result: AppInfosResult?) {
          //return the mini program list
      }
      
      fun onResultFailed(errorCode: Int, errorMessage: String?) {
          //return the error code and error message
      }
})Java
List<String> ids = new ArrayList();
ids.add("your miniprogram appId");
FetchAppsByIdsRequest fetchAppsByIdsRequest = new FetchAppsByIdsRequest(ids);
fetchAppsByIdsRequest.setCategory(category);
fetchAppsByIdsRequest.setRelatedEnv(relatedEnv);
Griver.fetchAppInfoListByIds(fetchAppsByIdsRequest, new OnRpcResultListener<AppInfosResult>() {
     @Override
     public void onResultSuccess(final AppInfosResult result) {
         //return the mini program list
     }
    @Override
    public void onResultFailed(int errorCode, String errorMessage) {
        //return the error code and error message
    }
});