combocurve-client-csharp

Logo

C# client for the ComboCurve REST API

View the Project on GitHub insidepetroleum/combocurve-client-csharp

ComboCurve.Api.Api.QualifiersApi

All URIs are relative to https://api.combocurve.com

Method HTTP request Description
DeleteQualifiersDelete DELETE /v1/projects/{projectId}/scenarios/{scenarioId}/qualifiers  
GetQualifiersRead GET /v1/projects/{projectId}/scenarios/{scenarioId}/qualifiers  
PostQualifiersUpsert POST /v1/projects/{projectId}/scenarios/{scenarioId}/qualifiers  
PutQualifiersUpsert PUT /v1/projects/{projectId}/scenarios/{scenarioId}/qualifiers  

DeleteQualifiersDelete

void DeleteQualifiersDelete (string scenarioId, string projectId, string econNames, string qualifierNames)

Example

using System;
using System.Collections.Generic;
using System.Diagnostics;
using ComboCurve.Api.Api;
using ComboCurve.Api.Auth;
using ComboCurve.Api.Client;
using ComboCurve.Api.Model;

namespace Example
{
    public class DeleteQualifiersDeleteExample
    {
        public static void Main()
        {
            // Use this to create your service account manually
            var serviceAccount = new ServiceAccount
            {
                ClientEmail = "YOUR_CLIENT_EMAIL",
                ClientId = "YOUR_CLIENT_ID",
                PrivateKey = "YOUR_PRIVATE_KEY"
            };

            // Or use this to load it from a JSON file
            // var serviceAccount = ServiceAccount.FromFile("PATH_TO_JSON_FILE");

            // Set your API key
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ComboCurveV1Api(serviceAccount, apiKey);

			// Or use the specific API class (Recommended)
			// var apiInstance = new QualifiersApi(serviceAccount, apiKey);

            var scenarioId = "scenarioId_example";  // string | 
            var projectId = "projectId_example";  // string | 
            var econNames = new string[] { "econNames_example" };  // IEnumerable<string> | 
            var qualifierNames = new string[] { "qualifierNames_example" };  // IEnumerable<string> | 

            try
            {
                apiInstance.DeleteQualifiersDelete(scenarioId, projectId, econNames, qualifierNames);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling QualifiersApi.DeleteQualifiersDelete: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
scenarioId string    
projectId string    
econNames string    
qualifierNames string    

Return type

void (empty response body)

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 204 | NoContent Response | * x-delete-count - | | 400 | BadRequest Response | - | | 404 | NotFound Response | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetQualifiersRead

QualifiersReadOKResponse GetQualifiersRead (string scenarioId, string projectId, string econName = null)

Example

using System;
using System.Collections.Generic;
using System.Diagnostics;
using ComboCurve.Api.Api;
using ComboCurve.Api.Auth;
using ComboCurve.Api.Client;
using ComboCurve.Api.Model;

namespace Example
{
    public class GetQualifiersReadExample
    {
        public static void Main()
        {
            // Use this to create your service account manually
            var serviceAccount = new ServiceAccount
            {
                ClientEmail = "YOUR_CLIENT_EMAIL",
                ClientId = "YOUR_CLIENT_ID",
                PrivateKey = "YOUR_PRIVATE_KEY"
            };

            // Or use this to load it from a JSON file
            // var serviceAccount = ServiceAccount.FromFile("PATH_TO_JSON_FILE");

            // Set your API key
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ComboCurveV1Api(serviceAccount, apiKey);

			// Or use the specific API class (Recommended)
			// var apiInstance = new QualifiersApi(serviceAccount, apiKey);

            var scenarioId = "scenarioId_example";  // string | 
            var projectId = "projectId_example";  // string | 
            var econName = new string[] { "econName_example" };  // IEnumerable<string> |  (optional)

            try
            {
                QualifiersReadOKResponse result = apiInstance.GetQualifiersRead(scenarioId, projectId, econName);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling QualifiersApi.GetQualifiersRead: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
scenarioId string    
projectId string    
econName string   [optional]

Return type

QualifiersReadOKResponse

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK Response | - | | 404 | NotFound Response | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostQualifiersUpsert

QualifiersUpsertMultiStatusResponse PostQualifiersUpsert (string scenarioId, string projectId, List payload)

Example

using System;
using System.Collections.Generic;
using System.Diagnostics;
using ComboCurve.Api.Api;
using ComboCurve.Api.Auth;
using ComboCurve.Api.Client;
using ComboCurve.Api.Model;

namespace Example
{
    public class PostQualifiersUpsertExample
    {
        public static void Main()
        {
            // Use this to create your service account manually
            var serviceAccount = new ServiceAccount
            {
                ClientEmail = "YOUR_CLIENT_EMAIL",
                ClientId = "YOUR_CLIENT_ID",
                PrivateKey = "YOUR_PRIVATE_KEY"
            };

            // Or use this to load it from a JSON file
            // var serviceAccount = ServiceAccount.FromFile("PATH_TO_JSON_FILE");

            // Set your API key
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ComboCurveV1Api(serviceAccount, apiKey);

			// Or use the specific API class (Recommended)
			// var apiInstance = new QualifiersApi(serviceAccount, apiKey);

            var scenarioId = "scenarioId_example";  // string | 
            var projectId = "projectId_example";  // string | 
            var payload = new List<QualifierUpsertPayload>(); // List<QualifierUpsertPayload> | 

            try
            {
                QualifiersUpsertMultiStatusResponse result = apiInstance.PostQualifiersUpsert(scenarioId, projectId, payload);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling QualifiersApi.PostQualifiersUpsert: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
scenarioId string    
projectId string    
payload List<QualifierUpsertPayload>    

Return type

QualifiersUpsertMultiStatusResponse

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 207 | MultiStatus Response | - | | 404 | NotFound Response | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PutQualifiersUpsert

QualifiersUpsertMultiStatusResponse PutQualifiersUpsert (string scenarioId, string projectId, List payload)

Example

using System;
using System.Collections.Generic;
using System.Diagnostics;
using ComboCurve.Api.Api;
using ComboCurve.Api.Auth;
using ComboCurve.Api.Client;
using ComboCurve.Api.Model;

namespace Example
{
    public class PutQualifiersUpsertExample
    {
        public static void Main()
        {
            // Use this to create your service account manually
            var serviceAccount = new ServiceAccount
            {
                ClientEmail = "YOUR_CLIENT_EMAIL",
                ClientId = "YOUR_CLIENT_ID",
                PrivateKey = "YOUR_PRIVATE_KEY"
            };

            // Or use this to load it from a JSON file
            // var serviceAccount = ServiceAccount.FromFile("PATH_TO_JSON_FILE");

            // Set your API key
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ComboCurveV1Api(serviceAccount, apiKey);

			// Or use the specific API class (Recommended)
			// var apiInstance = new QualifiersApi(serviceAccount, apiKey);

            var scenarioId = "scenarioId_example";  // string | 
            var projectId = "projectId_example";  // string | 
            var payload = new List<QualifierUpsertPayload>(); // List<QualifierUpsertPayload> | 

            try
            {
                QualifiersUpsertMultiStatusResponse result = apiInstance.PutQualifiersUpsert(scenarioId, projectId, payload);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling QualifiersApi.PutQualifiersUpsert: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
scenarioId string    
projectId string    
payload List<QualifierUpsertPayload>    

Return type

QualifiersUpsertMultiStatusResponse

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 207 | MultiStatus Response | - | | 404 | NotFound Response | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]