use of org.apache.http.entity.mime.MultipartEntityBuilder in project ef-app_android by eurofurence.
the class FursuitsApi method apiV2FursuitsCollectingGameFursuitParticipationScoreboardGet.
/**
* @param top
* @return List<FursuitScoreboardEntry>
*/
public List<FursuitScoreboardEntry> apiV2FursuitsCollectingGameFursuitParticipationScoreboardGet(Integer top) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = null;
// create path and map variables
String path = "/Api/v2/Fursuits/CollectingGame/FursuitParticipation/Scoreboard".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>();
queryParams.addAll(ApiInvoker.parameterToPairs("", "Top", top));
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 (List<FursuitScoreboardEntry>) ApiInvoker.deserialize(localVarResponse, "array", FursuitScoreboardEntry.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 org.apache.http.entity.mime.MultipartEntityBuilder in project ef-app_android by eurofurence.
the class FursuitsApi method apiV2FursuitsCollectingGamePlayerParticipationCollectTokenPost.
/**
* * Requires authorization * Requires any of the following roles: **`Attendee`**
* @param tokenValue
* @return CollectTokenResponse
*/
public CollectTokenResponse apiV2FursuitsCollectingGamePlayerParticipationCollectTokenPost(String tokenValue) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = tokenValue;
// create path and map variables
String path = "/Api/v2/Fursuits/CollectingGame/PlayerParticipation/CollectToken".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 {
String localVarResponse = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames);
if (localVarResponse != null) {
return (CollectTokenResponse) ApiInvoker.deserialize(localVarResponse, "", CollectTokenResponse.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 org.apache.http.entity.mime.MultipartEntityBuilder 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
* @return void
*/
public void apiV2FursuitsBadgesRegistrationPost(FursuitBadgeRegistration registration) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
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 {
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 org.apache.http.entity.mime.MultipartEntityBuilder in project ef-app_android by eurofurence.
the class FursuitsApi method apiV2FursuitsCollectingGamePlayerParticipationCollectTokenSafePost.
/**
* * Requires authorization * Requires any of the following roles: **`Attendee`**
* @param tokenValue
* @return ApiSafeResultCollectTokenResponse
*/
public ApiSafeResultCollectTokenResponse apiV2FursuitsCollectingGamePlayerParticipationCollectTokenSafePost(String tokenValue) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = tokenValue;
// create path and map variables
String path = "/Api/v2/Fursuits/CollectingGame/PlayerParticipation/CollectToken:safe".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 {
String localVarResponse = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames);
if (localVarResponse != null) {
return (ApiSafeResultCollectTokenResponse) ApiInvoker.deserialize(localVarResponse, "", ApiSafeResultCollectTokenResponse.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 org.apache.http.entity.mime.MultipartEntityBuilder in project ef-app_android by eurofurence.
the class FursuitsApi method apiV2FursuitsCollectingGamePlayerParticipationGet.
/**
* * Requires authorization * Requires any of the following roles: **`Attendee`**
* @return PlayerParticipationInfo
*/
public PlayerParticipationInfo apiV2FursuitsCollectingGamePlayerParticipationGet() throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = null;
// create path and map variables
String path = "/Api/v2/Fursuits/CollectingGame/PlayerParticipation".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 (PlayerParticipationInfo) ApiInvoker.deserialize(localVarResponse, "", PlayerParticipationInfo.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