/// <summary> /// Returns an face feature data from image contains a human face. /// </summary> /// <exception cref="FaceRecognitionDotNet.Client.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="image"> (optional)</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of ApiResponse (Encoding)</returns> public async System.Threading.Tasks.Task <FaceRecognitionDotNet.Client.Client.ApiResponse <Encoding> > FaceEncodingEncodingPostWithHttpInfoAsync(Image image = default(Image), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { FaceRecognitionDotNet.Client.Client.RequestOptions localVarRequestOptions = new FaceRecognitionDotNet.Client.Client.RequestOptions(); String[] _contentTypes = new String[] { "application/json", "text/json", "application/_*+json" }; // to determine the Accept header String[] _accepts = new String[] { "text/plain", "application/json", "text/json" }; var localVarContentType = FaceRecognitionDotNet.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } var localVarAccept = FaceRecognitionDotNet.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } localVarRequestOptions.Data = image; // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync <Encoding>("/FaceEncoding/Encoding", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("FaceEncodingEncodingPost", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// Remove person data. /// </summary> /// <exception cref="FaceRecognitionDotNet.Client.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="id"> (optional)</param> /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> /// <returns>Task of ApiResponse</returns> public async System.Threading.Tasks.Task <FaceRecognitionDotNet.Client.Client.ApiResponse <Object> > FaceRegistrationRemovePostWithHttpInfoAsync(Guid?id = default(Guid?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { FaceRecognitionDotNet.Client.Client.RequestOptions localVarRequestOptions = new FaceRecognitionDotNet.Client.Client.RequestOptions(); String[] _contentTypes = new String[] { }; // to determine the Accept header String[] _accepts = new String[] { "text/plain", "application/json", "text/json" }; var localVarContentType = FaceRecognitionDotNet.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } var localVarAccept = FaceRecognitionDotNet.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } if (id != null) { localVarRequestOptions.QueryParameters.Add(FaceRecognitionDotNet.Client.Client.ClientUtils.ParameterToMultiMap("", "id", id)); } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync <Object>("/FaceRegistration/Remove", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("FaceRegistrationRemovePost", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// Returns an face feature data from image contains a human face. /// </summary> /// <exception cref="FaceRecognitionDotNet.Client.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="image"> (optional)</param> /// <returns>ApiResponse of Encoding</returns> public FaceRecognitionDotNet.Client.Client.ApiResponse <Encoding> FaceEncodingEncodingPostWithHttpInfo(Image image = default(Image)) { FaceRecognitionDotNet.Client.Client.RequestOptions localVarRequestOptions = new FaceRecognitionDotNet.Client.Client.RequestOptions(); String[] _contentTypes = new String[] { "application/json", "text/json", "application/_*+json" }; // to determine the Accept header String[] _accepts = new String[] { "text/plain", "application/json", "text/json" }; var localVarContentType = FaceRecognitionDotNet.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } var localVarAccept = FaceRecognitionDotNet.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } localVarRequestOptions.Data = image; // make the HTTP request var localVarResponse = this.Client.Post <Encoding>("/FaceEncoding/Encoding", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("FaceEncodingEncodingPost", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// Get all registered person data. /// </summary> /// <exception cref="FaceRecognitionDotNet.Client.Client.ApiException">Thrown when fails to make API call</exception> /// <returns>ApiResponse of List<Registration></returns> public FaceRecognitionDotNet.Client.Client.ApiResponse <List <Registration> > FaceRegistrationGetAllGetWithHttpInfo() { FaceRecognitionDotNet.Client.Client.RequestOptions localVarRequestOptions = new FaceRecognitionDotNet.Client.Client.RequestOptions(); String[] _contentTypes = new String[] { }; // to determine the Accept header String[] _accepts = new String[] { "text/plain", "application/json", "text/json" }; var localVarContentType = FaceRecognitionDotNet.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } var localVarAccept = FaceRecognitionDotNet.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } // make the HTTP request var localVarResponse = this.Client.Get <List <Registration> >("/FaceRegistration/GetAll", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("FaceRegistrationGetAllGet", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }