use of io.swagger.client.ApiException in project ef-app_android by eurofurence.
the class ArtShowApi method apiV2ArtShowItemActivitesNotificationBundlesSendPost.
/**
* * Requires authorization * Requires any of the following roles: **`Developer`**, **`System`**
* @return void
*/
public void apiV2ArtShowItemActivitesNotificationBundlesSendPost() throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = null;
// create path and map variables
String path = "/Api/v2/ArtShow/ItemActivites/NotificationBundles/Send".replaceAll("\\{format\\}", "json");
// query params
List<Pair> queryParams = new ArrayList<Pair>();
// header params
Map<String, String> headerParams = new HashMap<String, String>();
// form params
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if (contentType.startsWith("multipart/form-data")) {
// file uploading
MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create();
HttpEntity httpEntity = localVarBuilder.build();
postBody = httpEntity;
} else {
// normal form params
}
String[] authNames = new String[] { "Bearer" };
try {
String localVarResponse = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames);
if (localVarResponse != null) {
return;
} else {
return;
}
} catch (ApiException ex) {
throw ex;
} catch (InterruptedException ex) {
throw ex;
} catch (ExecutionException ex) {
if (ex.getCause() instanceof VolleyError) {
VolleyError volleyError = (VolleyError) ex.getCause();
if (volleyError.networkResponse != null) {
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
}
}
throw ex;
} catch (TimeoutException ex) {
throw ex;
}
}
use of io.swagger.client.ApiException in project ef-app_android by eurofurence.
the class CommunicationApi method apiV2CommunicationPrivateMessagesByMessageIdReadPost.
/**
* Marks a given private message as read (reading receipt).
* * Requires authorization * Requires any of the following roles: **`Attendee`** Calling this on a message that has already been marked as read will not update the `ReadDateTimeUtc` property, but return the `ReadDateTimeUtc` value of the first call.
* @param messageId `Id` of the message to mark as read
*/
public void apiV2CommunicationPrivateMessagesByMessageIdReadPost(UUID messageId, final Response.Listener<Date> responseListener, final Response.ErrorListener errorListener) {
Object postBody = null;
// verify the required parameter 'messageId' is set
if (messageId == null) {
VolleyError error = new VolleyError("Missing the required parameter 'messageId' when calling apiV2CommunicationPrivateMessagesByMessageIdReadPost", new ApiException(400, "Missing the required parameter 'messageId' when calling apiV2CommunicationPrivateMessagesByMessageIdReadPost"));
}
// create path and map variables
String path = "/Api/v2/Communication/PrivateMessages/{MessageId}/Read".replaceAll("\\{format\\}", "json").replaceAll("\\{" + "MessageId" + "\\}", apiInvoker.escapeString(messageId.toString()));
// query params
List<Pair> queryParams = new ArrayList<Pair>();
// header params
Map<String, String> headerParams = new HashMap<String, String>();
// form params
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if (contentType.startsWith("multipart/form-data")) {
// file uploading
MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create();
HttpEntity httpEntity = localVarBuilder.build();
postBody = httpEntity;
} else {
// normal form params
}
String[] authNames = new String[] { "Bearer" };
try {
apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames, new Response.Listener<String>() {
@Override
public void onResponse(String localVarResponse) {
try {
responseListener.onResponse((Date) ApiInvoker.deserialize(localVarResponse, "", Date.class));
} catch (ApiException exception) {
errorListener.onErrorResponse(new VolleyError(exception));
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
errorListener.onErrorResponse(error);
}
});
} catch (ApiException ex) {
errorListener.onErrorResponse(new VolleyError(ex));
}
}
use of io.swagger.client.ApiException in project ef-app_android by eurofurence.
the class CommunicationApi method apiV2CommunicationPrivateMessagesByMessageIdReadPost.
/**
* Marks a given private message as read (reading receipt).
* * Requires authorization * Requires any of the following roles: **`Attendee`** Calling this on a message that has already been marked as read will not update the `ReadDateTimeUtc` property, but return the `ReadDateTimeUtc` value of the first call.
* @param messageId `Id` of the message to mark as read
* @return Date
*/
public Date apiV2CommunicationPrivateMessagesByMessageIdReadPost(UUID messageId) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = null;
// verify the required parameter 'messageId' is set
if (messageId == null) {
VolleyError error = new VolleyError("Missing the required parameter 'messageId' when calling apiV2CommunicationPrivateMessagesByMessageIdReadPost", new ApiException(400, "Missing the required parameter 'messageId' when calling apiV2CommunicationPrivateMessagesByMessageIdReadPost"));
}
// create path and map variables
String path = "/Api/v2/Communication/PrivateMessages/{MessageId}/Read".replaceAll("\\{format\\}", "json").replaceAll("\\{" + "MessageId" + "\\}", apiInvoker.escapeString(messageId.toString()));
// query params
List<Pair> queryParams = new ArrayList<Pair>();
// header params
Map<String, String> headerParams = new HashMap<String, String>();
// form params
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if (contentType.startsWith("multipart/form-data")) {
// file uploading
MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create();
HttpEntity httpEntity = localVarBuilder.build();
postBody = httpEntity;
} else {
// normal form params
}
String[] authNames = new String[] { "Bearer" };
try {
String localVarResponse = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames);
if (localVarResponse != null) {
return (Date) ApiInvoker.deserialize(localVarResponse, "", Date.class);
} else {
return null;
}
} catch (ApiException ex) {
throw ex;
} catch (InterruptedException ex) {
throw ex;
} catch (ExecutionException ex) {
if (ex.getCause() instanceof VolleyError) {
VolleyError volleyError = (VolleyError) ex.getCause();
if (volleyError.networkResponse != null) {
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
}
}
throw ex;
} catch (TimeoutException ex) {
throw ex;
}
}
use of io.swagger.client.ApiException in project ef-app_android by eurofurence.
the class CommunicationApi method apiV2CommunicationPrivateMessagesGet.
/**
* Retrieves all private messages of an authenticated attendee.
* * Requires authorization * Requires any of the following roles: **`Attendee`** This will set the `ReceivedDateTimeUtc` to the current server time on all messages retrieved that have not been retrieved in a previous call.
*/
public void apiV2CommunicationPrivateMessagesGet(final Response.Listener<List<PrivateMessageRecord>> responseListener, final Response.ErrorListener errorListener) {
Object postBody = null;
// create path and map variables
String path = "/Api/v2/Communication/PrivateMessages".replaceAll("\\{format\\}", "json");
// query params
List<Pair> queryParams = new ArrayList<Pair>();
// header params
Map<String, String> headerParams = new HashMap<String, String>();
// form params
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if (contentType.startsWith("multipart/form-data")) {
// file uploading
MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create();
HttpEntity httpEntity = localVarBuilder.build();
postBody = httpEntity;
} else {
// normal form params
}
String[] authNames = new String[] { "Bearer" };
try {
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames, new Response.Listener<String>() {
@Override
public void onResponse(String localVarResponse) {
try {
responseListener.onResponse((List<PrivateMessageRecord>) ApiInvoker.deserialize(localVarResponse, "array", PrivateMessageRecord.class));
} catch (ApiException exception) {
errorListener.onErrorResponse(new VolleyError(exception));
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
errorListener.onErrorResponse(error);
}
});
} catch (ApiException ex) {
errorListener.onErrorResponse(new VolleyError(ex));
}
}
use of io.swagger.client.ApiException in project ef-app_android by eurofurence.
the class DealersApi method apiV2DealersByIdGet.
/**
* Retrieve a single dealer.
*
* @param id id of the requested entity
* @return DealerRecord
*/
public DealerRecord apiV2DealersByIdGet(UUID id) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = null;
// verify the required parameter 'id' is set
if (id == null) {
VolleyError error = new VolleyError("Missing the required parameter 'id' when calling apiV2DealersByIdGet", new ApiException(400, "Missing the required parameter 'id' when calling apiV2DealersByIdGet"));
}
// create path and map variables
String path = "/Api/v2/Dealers/{Id}".replaceAll("\\{format\\}", "json").replaceAll("\\{" + "id" + "\\}", apiInvoker.escapeString(id.toString()));
// query params
List<Pair> queryParams = new ArrayList<Pair>();
// header params
Map<String, String> headerParams = new HashMap<String, String>();
// form params
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if (contentType.startsWith("multipart/form-data")) {
// file uploading
MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create();
HttpEntity httpEntity = localVarBuilder.build();
postBody = httpEntity;
} else {
// normal form params
}
String[] authNames = new String[] {};
try {
String localVarResponse = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);
if (localVarResponse != null) {
return (DealerRecord) ApiInvoker.deserialize(localVarResponse, "", DealerRecord.class);
} else {
return null;
}
} catch (ApiException ex) {
throw ex;
} catch (InterruptedException ex) {
throw ex;
} catch (ExecutionException ex) {
if (ex.getCause() instanceof VolleyError) {
VolleyError volleyError = (VolleyError) ex.getCause();
if (volleyError.networkResponse != null) {
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
}
}
throw ex;
} catch (TimeoutException ex) {
throw ex;
}
}
Aggregations