use of io.swagger.client.model.EventConferenceDayRecord in project ef-app_android by eurofurence.
the class EventConferenceDaysApi method apiV2EventConferenceDaysGet.
/**
* Retrieves a list of all event conference days in the event schedule.
*/
public void apiV2EventConferenceDaysGet(final Response.Listener<List<EventConferenceDayRecord>> responseListener, final Response.ErrorListener errorListener) {
Object postBody = null;
// create path and map variables
String path = "/Api/v2/EventConferenceDays".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[] {};
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<EventConferenceDayRecord>) ApiInvoker.deserialize(localVarResponse, "array", EventConferenceDayRecord.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.model.EventConferenceDayRecord in project ef-app_android by eurofurence.
the class EventConferenceDaysApi method apiV2EventConferenceDaysGet.
/**
* Retrieves a list of all event conference days in the event schedule.
*
* @return List<EventConferenceDayRecord>
*/
public List<EventConferenceDayRecord> apiV2EventConferenceDaysGet() throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = null;
// create path and map variables
String path = "/Api/v2/EventConferenceDays".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[] {};
try {
String localVarResponse = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);
if (localVarResponse != null) {
return (List<EventConferenceDayRecord>) ApiInvoker.deserialize(localVarResponse, "array", EventConferenceDayRecord.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.model.EventConferenceDayRecord in project ef-app_android by eurofurence.
the class EventConferenceDaysApi method apiV2EventConferenceDaysByIdGet.
/**
* Retrieve a single event conference day in the event schedule.
*
* @param id id of the requested entity
* @return EventConferenceDayRecord
*/
public EventConferenceDayRecord apiV2EventConferenceDaysByIdGet(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 apiV2EventConferenceDaysByIdGet", new ApiException(400, "Missing the required parameter 'id' when calling apiV2EventConferenceDaysByIdGet"));
}
// create path and map variables
String path = "/Api/v2/EventConferenceDays/{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 (EventConferenceDayRecord) ApiInvoker.deserialize(localVarResponse, "", EventConferenceDayRecord.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.model.EventConferenceDayRecord in project ef-app_android by eurofurence.
the class EventConferenceDaysApi method apiV2EventConferenceDaysByIdGet.
/**
* Retrieve a single event conference day in the event schedule.
*
* @param id id of the requested entity
*/
public void apiV2EventConferenceDaysByIdGet(UUID id, final Response.Listener<EventConferenceDayRecord> responseListener, final Response.ErrorListener errorListener) {
Object postBody = null;
// verify the required parameter 'id' is set
if (id == null) {
VolleyError error = new VolleyError("Missing the required parameter 'id' when calling apiV2EventConferenceDaysByIdGet", new ApiException(400, "Missing the required parameter 'id' when calling apiV2EventConferenceDaysByIdGet"));
}
// create path and map variables
String path = "/Api/v2/EventConferenceDays/{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 {
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames, new Response.Listener<String>() {
@Override
public void onResponse(String localVarResponse) {
try {
responseListener.onResponse((EventConferenceDayRecord) ApiInvoker.deserialize(localVarResponse, "", EventConferenceDayRecord.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));
}
}
Aggregations