예제 #1
0
 /// <summary>
 /// Run FIAB calculation This endpoint creates a new FIAB calculation.  This must be used first before get status or cancelling endpoints with a calculation id.  A successful response will contain the URL to check the status of the calculation request.    Remarks:  * Any settings in POST body will act as a one-time override over the settings saved in the FIAB template.
 /// </summary>
 /// <exception cref="FactSet.AnalyticsAPI.Engines.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="fIABCalculationParameters"> (optional)</param>
 /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
 /// <returns>Task of void</returns>
 public async System.Threading.Tasks.Task RunCalculationAsync(FIABCalculationParameters fIABCalculationParameters = default(FIABCalculationParameters), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     await RunCalculationWithHttpInfoAsync(fIABCalculationParameters, cancellationToken).ConfigureAwait(false);
 }
예제 #2
0
        /// <summary>
        /// Run FIAB calculation This endpoint creates a new FIAB calculation.  This must be used first before get status or cancelling endpoints with a calculation id.  A successful response will contain the URL to check the status of the calculation request.    Remarks:  * Any settings in POST body will act as a one-time override over the settings saved in the FIAB template.
        /// </summary>
        /// <exception cref="FactSet.AnalyticsAPI.Engines.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="fIABCalculationParameters"> (optional)</param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse of Object(null)</returns>
        public async System.Threading.Tasks.Task <FactSet.AnalyticsAPI.Engines.Client.ApiResponse <object> > RunCalculationWithHttpInfoAsync(FIABCalculationParameters fIABCalculationParameters = default(FIABCalculationParameters), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            FactSet.AnalyticsAPI.Engines.Client.RequestOptions localVarRequestOptions = new FactSet.AnalyticsAPI.Engines.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
            };

            localVarRequestOptions.ResponseReturnTypes = new Dictionary <int, Type>
            {
            };

            var localVarContentType = FactSet.AnalyticsAPI.Engines.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = FactSet.AnalyticsAPI.Engines.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.Data = fIABCalculationParameters;

            // authentication (Basic) required
            // http basic authentication required
            if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + FactSet.AnalyticsAPI.Engines.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password));
            }
            // authentication (Bearer) required
            // bearer authentication required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.PostAsync <object>("/analytics/engines/fiab/v1/calculations", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("RunCalculation", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
예제 #3
0
 /// <summary>
 /// Run FIAB calculation This endpoint creates a new FIAB calculation.  This must be used first before get status or cancelling endpoints with a calculation id.  A successful response will contain the URL to check the status of the calculation request.    Remarks:  * Any settings in POST body will act as a one-time override over the settings saved in the FIAB template.
 /// </summary>
 /// <exception cref="FactSet.AnalyticsAPI.Engines.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="fIABCalculationParameters"> (optional)</param>
 /// <returns></returns>
 public void RunCalculation(FIABCalculationParameters fIABCalculationParameters = default(FIABCalculationParameters))
 {
     RunCalculationWithHttpInfo(fIABCalculationParameters);
 }