use of io.swagger.client.ApiException in project ef-app_android by eurofurence.
the class FursuitsApi method apiV2FursuitsBadgesGet.
/**
* Return all Fursuit Badge Registrations
* * Requires authorization * Requires any of the following roles: **`Developer`**, **`FursuitBadgeSystem`**, **`System`** **Not meant to be consumed by the mobile apps**
* @return List<FursuitBadgeRecord>
*/
public List<FursuitBadgeRecord> apiV2FursuitsBadgesGet() throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = null;
// create path and map variables
String path = "/Api/v2/Fursuits/Badges".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, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);
if (localVarResponse != null) {
return (List<FursuitBadgeRecord>) ApiInvoker.deserialize(localVarResponse, "array", FursuitBadgeRecord.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 FursuitsApi method apiV2FursuitsCollectingGameFursuitParticpationBadgesByFursuitBadgeIdTokenSafePost.
/**
* * Requires authorization * Requires any of the following roles: **`Attendee`**
* @param fursuitBadgeId
* @param tokenValue
* @return ApiSafeResult
*/
public ApiSafeResult apiV2FursuitsCollectingGameFursuitParticpationBadgesByFursuitBadgeIdTokenSafePost(UUID fursuitBadgeId, String tokenValue) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = tokenValue;
// verify the required parameter 'fursuitBadgeId' is set
if (fursuitBadgeId == null) {
VolleyError error = new VolleyError("Missing the required parameter 'fursuitBadgeId' when calling apiV2FursuitsCollectingGameFursuitParticpationBadgesByFursuitBadgeIdTokenSafePost", new ApiException(400, "Missing the required parameter 'fursuitBadgeId' when calling apiV2FursuitsCollectingGameFursuitParticpationBadgesByFursuitBadgeIdTokenSafePost"));
}
// create path and map variables
String path = "/Api/v2/Fursuits/CollectingGame/FursuitParticpation/Badges/{FursuitBadgeId}/Token:safe".replaceAll("\\{format\\}", "json").replaceAll("\\{" + "FursuitBadgeId" + "\\}", apiInvoker.escapeString(fursuitBadgeId.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 = { "application/json", "text/json", "application/json-patch+json" };
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 (ApiSafeResult) ApiInvoker.deserialize(localVarResponse, "", ApiSafeResult.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 FursuitsApi method apiV2FursuitsCollectingGameFursuitParticipationGet.
/**
* * Requires authorization * Requires any of the following roles: **`Attendee`**
* @return List<FursuitParticipationInfo>
*/
public List<FursuitParticipationInfo> apiV2FursuitsCollectingGameFursuitParticipationGet() throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = null;
// create path and map variables
String path = "/Api/v2/Fursuits/CollectingGame/FursuitParticipation".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, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);
if (localVarResponse != null) {
return (List<FursuitParticipationInfo>) ApiInvoker.deserialize(localVarResponse, "array", FursuitParticipationInfo.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 FursuitsApi method apiV2FursuitsCollectingGameTokensPost.
/**
* * Requires authorization * Requires any of the following roles: **`Developer`**, **`System`**
* @param tokenValue
*/
public void apiV2FursuitsCollectingGameTokensPost(String tokenValue, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
Object postBody = tokenValue;
// create path and map variables
String path = "/Api/v2/Fursuits/CollectingGame/Tokens".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 = { "application/json", "text/json", "application/json-patch+json" };
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) {
responseListener.onResponse(localVarResponse);
}
}, 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 FursuitsApi method apiV2FursuitsBadgesRegistrationPost.
/**
* Upsert Fursuit Badge information
* * Requires authorization * Requires any of the following roles: **`Developer`**, **`FursuitBadgeSystem`**, **`System`** This is used by the fursuit badge system to push badge information to this backend. **Not meant to be consumed by the mobile apps**
* @param registration
*/
public void apiV2FursuitsBadgesRegistrationPost(FursuitBadgeRegistration registration, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
Object postBody = registration;
// create path and map variables
String path = "/Api/v2/Fursuits/Badges/Registration".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 = { "application/json", "text/json", "application/json-patch+json" };
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) {
responseListener.onResponse(localVarResponse);
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
errorListener.onErrorResponse(error);
}
});
} catch (ApiException ex) {
errorListener.onErrorResponse(new VolleyError(ex));
}
}
Aggregations