Esempio n. 1
0
        /// <summary>
        /// Execute a report with one or more output formats by id. The operation is async
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="executerequest"> (optional)</param>
        /// <returns>Task of ReportExecuteAsyncResponseDTO</returns>
        public async System.Threading.Tasks.Task <ReportExecuteAsyncResponseDTO> ReportExecuteMultpileAsyncByIdAsync(ReportExecuteMultipleRequestDTO executerequest = null)
        {
            ApiResponse <ReportExecuteAsyncResponseDTO> localVarResponse = await ReportExecuteMultpileAsyncByIdAsyncWithHttpInfo(executerequest);

            return(localVarResponse.Data);
        }
Esempio n. 2
0
        /// <summary>
        /// Execute a report with one or more output formats by id. The operation is async
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="executerequest"> (optional)</param>
        /// <returns>Task of ApiResponse (ReportExecuteAsyncResponseDTO)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <ReportExecuteAsyncResponseDTO> > ReportExecuteMultpileAsyncByIdAsyncWithHttpInfo(ReportExecuteMultipleRequestDTO executerequest = null)
        {
            var    localVarPath         = "/api/Report/Execute/Async";
            var    localVarPathParams   = new Dictionary <String, String>();
            var    localVarQueryParams  = new List <KeyValuePair <String, String> >();
            var    localVarHeaderParams = new Dictionary <String, String>(Configuration.DefaultHeader);
            var    localVarFormParams   = new Dictionary <String, String>();
            var    localVarFileParams   = new Dictionary <String, FileParameter>();
            Object 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/json",
                "text/json",
                "application/xml",
                "text/xml"
            };
            String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            if (executerequest != null && executerequest.GetType() != typeof(byte[]))
            {
                localVarPostBody = Configuration.ApiClient.Serialize(executerequest); // http body (model) parameter
            }
            else
            {
                localVarPostBody = executerequest; // byte array
            }

            // authentication (Authorization) required
            if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("Authorization")))
            {
                localVarHeaderParams["Authorization"] = Configuration.GetApiKeyWithPrefix("Authorization");
            }

            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                                       Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                       localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("ReportExecuteMultpileAsyncById", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <ReportExecuteAsyncResponseDTO>(localVarStatusCode,
                                                                   localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                                                                   (ReportExecuteAsyncResponseDTO)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ReportExecuteAsyncResponseDTO))));
        }
Esempio n. 3
0
        /// <summary>
        /// Execute a report with one or more output formats by id. The operation is async
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="executerequest"> (optional)</param>
        /// <returns>ReportExecuteAsyncResponseDTO</returns>
        public ReportExecuteAsyncResponseDTO ReportExecuteMultpileAsyncById(ReportExecuteMultipleRequestDTO executerequest = null)
        {
            ApiResponse <ReportExecuteAsyncResponseDTO> localVarResponse = ReportExecuteMultpileAsyncByIdWithHttpInfo(executerequest);

            return(localVarResponse.Data);
        }