/* * FHT.Core.API 1.0 * * ̨group.apiVersion:1.0 * * OpenAPI spec version: v1 * Contact: fht@fht360.com * Generated by: https://github.com/swagger-api/swagger-codegen.git */ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Net.Http; using IO.Swagger.Client; using IO.Swagger.Model; namespace IO.Swagger.Api { /// /// Represents a collection of functions to interact with the API endpoints /// public interface IUploadApiApi : IApiAccessor { #region Synchronous Operations /// /// /// /// /// /// /// Thrown when fails to make API call /// /// Object Object UploadApiGet (string imageId); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// ApiResponse of Object ApiResponse UploadApiGetWithHttpInfo (string imageId); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// CreatedViewModel CreatedViewModel UploadApiTempUploadImage (string imgPath); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// ApiResponse of CreatedViewModel ApiResponse UploadApiTempUploadImageWithHttpInfo (string imgPath); /// /// /// /// /// /// /// Thrown when fails to make API call /// List<UploadedImageViewModel> List UploadApiUploadImage (); /// /// /// /// /// /// /// Thrown when fails to make API call /// ApiResponse of List<UploadedImageViewModel> ApiResponse> UploadApiUploadImageWithHttpInfo (); #endregion Synchronous Operations #region Asynchronous Operations /// /// /// /// /// /// /// Thrown when fails to make API call /// /// Task of Object System.Threading.Tasks.Task UploadApiGetAsync (string imageId); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// Task of ApiResponse (Object) System.Threading.Tasks.Task> UploadApiGetAsyncWithHttpInfo (string imageId); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// Task of CreatedViewModel System.Threading.Tasks.Task UploadApiTempUploadImageAsync (string imgPath); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// Task of ApiResponse (CreatedViewModel) System.Threading.Tasks.Task> UploadApiTempUploadImageAsyncWithHttpInfo (string imgPath); /// /// /// /// /// /// /// Thrown when fails to make API call /// Task of List<UploadedImageViewModel> System.Threading.Tasks.Task> UploadApiUploadImageAsync (); /// /// /// /// /// /// /// Thrown when fails to make API call /// Task of ApiResponse (List<UploadedImageViewModel>) System.Threading.Tasks.Task>> UploadApiUploadImageAsyncWithHttpInfo (); #endregion Asynchronous Operations } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class UploadApiApi : IUploadApiApi { private IO.Swagger.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// /// Initializes a new instance of the class /// using Configuration object /// /// An instance of Configuration /// public UploadApiApi(Configuration configuration) { this.Configuration = configuration; ExceptionFactory = IO.Swagger.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) { this.Configuration.ApiClient.Configuration = this.Configuration; } } /// /// Gets or sets the configuration object /// /// An instance of the Configuration public Configuration Configuration {get; set;} /// /// Provides a factory method hook for the creation of exceptions. /// public IO.Swagger.Client.ExceptionFactory ExceptionFactory { get { if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) { throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); } return _exceptionFactory; } set { _exceptionFactory = value; } } /// /// /// /// Thrown when fails to make API call /// /// Object public Object UploadApiGet (string imageId) { ApiResponse localVarResponse = UploadApiGetWithHttpInfo(imageId); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// /// ApiResponse of Object public ApiResponse< Object > UploadApiGetWithHttpInfo (string imageId) { // verify the required parameter 'imageId' is set if (imageId == null) throw new ApiException(400, "Missing required parameter 'imageId' when calling UploadApiApi->UploadApiGet"); var localVarPath = "/v1/Images/{imageId}"; var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/vnd.fht360.enumAsString+json", "application/vnd.fht360.preserveCircularReference+json", "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // make the HTTP request var localVarResponse = Configuration.ApiClient.CallApi(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UploadApiGet", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Object) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(Object))); } /// /// /// /// Thrown when fails to make API call /// /// Task of Object public async System.Threading.Tasks.Task UploadApiGetAsync (string imageId) { ApiResponse localVarResponse = await UploadApiGetAsyncWithHttpInfo(imageId); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// /// Task of ApiResponse (Object) public async System.Threading.Tasks.Task> UploadApiGetAsyncWithHttpInfo (string imageId) { // verify the required parameter 'imageId' is set if (imageId == null) throw new ApiException(400, "Missing required parameter 'imageId' when calling UploadApiApi->UploadApiGet"); var localVarPath = "/v1/Images/{imageId}"; var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/vnd.fht360.enumAsString+json", "application/vnd.fht360.preserveCircularReference+json", "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // make the HTTP request var localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UploadApiGet", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (Object) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(Object))); } /// /// /// /// Thrown when fails to make API call /// /// CreatedViewModel public CreatedViewModel UploadApiTempUploadImage (string imgPath) { ApiResponse localVarResponse = UploadApiTempUploadImageWithHttpInfo(imgPath); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// /// ApiResponse of CreatedViewModel public ApiResponse< CreatedViewModel > UploadApiTempUploadImageWithHttpInfo (string imgPath) { // verify the required parameter 'imgPath' is set if (imgPath == null) throw new ApiException(400, "Missing required parameter 'imgPath' when calling UploadApiApi->UploadApiTempUploadImage"); var localVarPath = "/v1/_tempUpload"; var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/vnd.fht360.enumAsString+json", "application/vnd.fht360.preserveCircularReference+json", "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (imgPath != null) localVarQueryParams.Add("imgPath", Configuration.ApiClient.ParameterToString(imgPath)); // query parameter // make the HTTP request var localVarResponse = Configuration.ApiClient.CallApi(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UploadApiTempUploadImage", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (CreatedViewModel) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(CreatedViewModel))); } /// /// /// /// Thrown when fails to make API call /// /// Task of CreatedViewModel public async System.Threading.Tasks.Task UploadApiTempUploadImageAsync (string imgPath) { ApiResponse localVarResponse = await UploadApiTempUploadImageAsyncWithHttpInfo(imgPath); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// /// Task of ApiResponse (CreatedViewModel) public async System.Threading.Tasks.Task> UploadApiTempUploadImageAsyncWithHttpInfo (string imgPath) { // verify the required parameter 'imgPath' is set if (imgPath == null) throw new ApiException(400, "Missing required parameter 'imgPath' when calling UploadApiApi->UploadApiTempUploadImage"); var localVarPath = "/v1/_tempUpload"; var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/vnd.fht360.enumAsString+json", "application/vnd.fht360.preserveCircularReference+json", "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (imgPath != null) localVarQueryParams.Add("imgPath", Configuration.ApiClient.ParameterToString(imgPath)); // query parameter // make the HTTP request var localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UploadApiTempUploadImage", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (CreatedViewModel) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(CreatedViewModel))); } /// /// /// /// Thrown when fails to make API call /// List<UploadedImageViewModel> public List UploadApiUploadImage () { ApiResponse> localVarResponse = UploadApiUploadImageWithHttpInfo(); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// ApiResponse of List<UploadedImageViewModel> public ApiResponse< List > UploadApiUploadImageWithHttpInfo () { var localVarPath = "/v1/_upload"; var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/vnd.fht360.enumAsString+json", "application/vnd.fht360.preserveCircularReference+json", "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // make the HTTP request var localVarResponse = Configuration.ApiClient.CallApi(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UploadApiUploadImage", localVarResponse); if (exception != null) throw exception; } return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (List) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(List))); } /// /// /// /// Thrown when fails to make API call /// Task of List<UploadedImageViewModel> public async System.Threading.Tasks.Task> UploadApiUploadImageAsync () { ApiResponse> localVarResponse = await UploadApiUploadImageAsyncWithHttpInfo(); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// Task of ApiResponse (List<UploadedImageViewModel>) public async System.Threading.Tasks.Task>> UploadApiUploadImageAsyncWithHttpInfo () { var localVarPath = "/v1/_upload"; var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/vnd.fht360.enumAsString+json", "application/vnd.fht360.preserveCircularReference+json", "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // make the HTTP request var localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UploadApiUploadImage", localVarResponse); if (exception != null) throw exception; } return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (List) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(List))); } } }