_callback) throws ApiException {
okhttp3.Call localVarCall = getWebhookCallValidateBeforeCall(webhookId, callId, _callback);
Type localVarReturnType = new TypeToken<CallResponse>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for listWebhookCalls
* @param webhookId String that represents the webhook ID (required)
* @param pageNumber The page number to load (optional, default to 1)
* @param pageSize The size of the page (optional, default to 20)
* @param filterStatus The status of the calls to filter by (optional)
* @param filterStartedAtGte The start date to filter calls by (optional)
* @param filterStartedAtLte The end date to filter calls by (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Array of Webhook Calls </td><td> - </td></tr>
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
<tr><td> 404 </td><td> Resource not found </td><td> - </td></tr>
<tr><td> 422 </td><td> Unprocessable entity </td><td> - </td></tr>
<tr><td> 429 </td><td> Too Many Requests </td><td> - </td></tr>
</table>
*/
public okhttp3.Call listWebhookCallsCall(String webhookId, Integer pageNumber, Integer pageSize, String filterStatus, String filterStartedAtGte, String filterStartedAtLte, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/webhooks/{webhook_id}/calls"
.replace("{" + "webhook_id" + "}", localVarApiClient.escapeString(webhookId.toString()));
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (pageNumber != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[number]", pageNumber));
}
if (pageSize != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[size]", pageSize));
}
if (filterStatus != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter[status]", filterStatus));
}
if (filterStartedAtGte != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter[started_at][gte]", filterStartedAtGte));
}
if (filterStartedAtLte != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter[started_at][lte]", filterStartedAtLte));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "bearerAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call listWebhookCallsValidateBeforeCall(String webhookId, Integer pageNumber, Integer pageSize, String filterStatus, String filterStartedAtGte, String filterStartedAtLte, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'webhookId' is set
if (webhookId == null) {
throw new ApiException("Missing the required parameter 'webhookId' when calling listWebhookCalls(Async)");
}
return listWebhookCallsCall(webhookId, pageNumber, pageSize, filterStatus, filterStartedAtGte, filterStartedAtLte, _callback);
}
/**
* List webhook calls
* List all calls for a specific webhook.
* @param webhookId String that represents the webhook ID (required)
* @param pageNumber The page number to load (optional, default to 1)
* @param pageSize The size of the page (optional, default to 20)
* @param filterStatus The status of the calls to filter by (optional)
* @param filterStartedAtGte The start date to filter calls by (optional)
* @param filterStartedAtLte The end date to filter calls by (optional)
* @return ListWebhookCallsResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Array of Webhook Calls </td><td> - </td></tr>
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
<tr><td> 404 </td><td> Resource not found </td><td> - </td></tr>
<tr><td> 422 </td><td> Unprocessable entity </td><td> </td></tr>
<tr><td> 429 </td><td> Too Many Requests </td><td> - </td></tr>
</table>
*/
public ListWebhookCallsResponse listWebhookCalls(String webhookId, Integer pageNumber, Integer pageSize, String filterStatus, String filterStartedAtGte, String filterStartedAtLte) throws ApiException {
ApiResponse<ListWebhookCallsResponse> localVarResp = listWebhookCallsWithHttpInfo(webhookId, pageNumber, pageSize, filterStatus, filterStartedAtGte, filterStartedAtLte);
return localVarResp.getData();
}
/**
* List webhook calls
* List all calls for a specific webhook.
* @param webhookId String that represents the webhook ID (required)
* @param pageNumber The page number to load (optional, default to 1)
* @param pageSize The size of the page (optional, default to 20)
* @param filterStatus The status of the calls to filter by (optional)
* @param filterStartedAtGte The start date to filter calls by (optional)
* @param filterStartedAtLte The end date to filter calls by (optional)
* @return ApiResponse<ListWebhookCallsResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td极(防止在不修改原问题的情况下,任何不必要的编辑;保持纯粹的HTML输出格式而无需进一步的解释或其他内容。)以下是HTML表格:
| Status Code | Description | Response Headers |
| 200 | Array of Webhook Calls | – |
| 401 | Unauthorized | – |
| 404 | Resource not found | – |
| 422 | Unprocessable entity | – |
| 429 | Too Many Requests | – |
かつてのスーパースターが今、魔の急斜面に立たされている。 東北天のベテラン・朝村選は4年契約の3年目で深刻な打撃不振に陥り、7月7日から2軍降格。打率.200台・5本塁打という往年の成績とはかけ離れた数字に、推定年俸5億 […]...