combocurve-client-csharp

Logo

C# client for the ComboCurve REST API

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

ComboCurve.Api.Api.OneLinersApi

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

Method HTTP request Description
GetOneLinerById GET /v1/projects/{projectId}/scenarios/{scenarioId}/econ-runs/{econRunId}/one-liners/{id} Returns the econ one liner document that matches the given id scoped to projectId project, scenarioId scenario and econRunId econ run.
GetOneLiners GET /v1/projects/{projectId}/scenarios/{scenarioId}/econ-runs/{econRunId}/one-liners Returns a list of econ one liner documents scoped to projectId project, scenarioId scenario and econRunId econ run.
GetOneLinersComboNames GET /v1/projects/{projectId}/scenarios/{scenarioId}/econ-runs/{econRunId}/one-liners/combo-names Returns a list of combo names contained in the one liner documents that are scoped to project, scenario and econ run.
HeadOneLiners HEAD /v1/projects/{projectId}/scenarios/{scenarioId}/econ-runs/{econRunId}/one-liners Returns metadata about the existing econ one liners documents scoped to projectId project, scenarioId scenario and econRunId econ run.

GetOneLinerById

OneLiner GetOneLinerById (string projectId, string scenarioId, string econRunId, string id)

Returns the econ one liner document that matches the given id scoped to projectId project, scenarioId scenario and econRunId econ run.

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 GetOneLinerByIdExample
    {
        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 OneLinersApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var scenarioId = "scenarioId_example";  // string | 
            var econRunId = "econRunId_example";  // string | 
            var id = "id_example";  // string | 

            try
            {
                // Returns the econ one liner document that matches the given id scoped to projectId project, scenarioId scenario and econRunId econ run.
                OneLiner result = apiInstance.GetOneLinerById(projectId, scenarioId, econRunId, id);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling OneLinersApi.GetOneLinerById: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
scenarioId string    
econRunId string    
id string    

Return type

OneLiner

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK | - | | 400 | Bad Request. There is something wrong with the request data. | - | | 404 | Not Found | - |

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

GetOneLiners

ICollection<OneLiner> GetOneLiners (string projectId, string scenarioId, string econRunId, int? skip = null, int? take = null, string sort = null, string cursor = null, string comboName = null, string well = null)

Returns a list of econ one liner documents scoped to projectId project, scenarioId scenario and econRunId econ run.

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 GetOneLinersExample
    {
        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 OneLinersApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var scenarioId = "scenarioId_example";  // string | 
            var econRunId = "econRunId_example";  // string | 
            var skip = 56;  // int? | number of items to skip (optional) (default to 0)
            var take = 56;  // int? | max records to return (optional) (default to 25) (between 1 and 200)
            var sort = "sort_example";  // string | field to sort by, including + or - at the beginning for ascending or descending order, respectively (optional)
            var cursor = "cursor_example";  // string | used in pagination to get the next page (optional)
            var comboName = "comboName_example";  // string | filter by comboName (optional)
            var well = "well_example";  // string | filter by well (optional)

            try
            {
                // Returns a list of econ one liner documents scoped to projectId project, scenarioId scenario and econRunId econ run.
                ICollection<OneLiner> result = apiInstance.GetOneLiners(projectId, scenarioId, econRunId, skip, take, sort, cursor, comboName, well);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling OneLinersApi.GetOneLiners: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
scenarioId string    
econRunId string    
skip int? number of items to skip [optional] [default to 0]
take int? max records to return [optional] [default to 25] [between 1 and 200]
sort string field to sort by, including + or - at the beginning for ascending or descending order, respectively [optional]
cursor string used in pagination to get the next page [optional]
comboName string filter by comboName [optional]
well string filter by well [optional]

Return type

ICollection<OneLiner>

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK | * Link - Indicates a typed relationship with another resource, where the relation type is defined by RFC 5988. We include the relationships next, prev, first and last, which can be used to move between pages of the list of results. | | 400 | Bad Request. There is something wrong with the request data. | - |

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

GetOneLinersComboNames

ICollection<OneLiner> GetOneLinersComboNames (string projectId, string scenarioId, string econRunId)

Returns a list of combo names contained in the one liner documents that are scoped to project, scenario and econ run.

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 GetOneLinersComboNamesExample
    {
        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 OneLinersApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var scenarioId = "scenarioId_example";  // string | 
            var econRunId = "econRunId_example";  // string | 

            try
            {
                // Returns a list of combo names contained in the one liner documents that are scoped to project, scenario and econ run.
                ICollection<OneLiner> result = apiInstance.GetOneLinersComboNames(projectId, scenarioId, econRunId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling OneLinersApi.GetOneLinersComboNames: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
scenarioId string    
econRunId string    

Return type

ICollection<OneLiner>

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK | - | | 400 | Bad Request. There is something wrong with the request data. | - |

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

HeadOneLiners

void HeadOneLiners (string projectId, string scenarioId, string econRunId, int? skip = null, int? take = null, string comboName = null, string well = null)

Returns metadata about the existing econ one liners documents scoped to projectId project, scenarioId scenario and econRunId econ run.

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 HeadOneLinersExample
    {
        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 OneLinersApi(serviceAccount, apiKey);

            var projectId = "projectId_example";  // string | 
            var scenarioId = "scenarioId_example";  // string | 
            var econRunId = "econRunId_example";  // string | 
            var skip = 56;  // int? | number of items to skip (optional) (default to 0)
            var take = 56;  // int? | max records to return (optional) (default to 25) (between 1 and 200)
            var comboName = "comboName_example";  // string | filter by comboName (optional)
            var well = "well_example";  // string | filter by well (optional)

            try
            {
                // Returns metadata about the existing econ one liners documents scoped to projectId project, scenarioId scenario and econRunId econ run.
                apiInstance.HeadOneLiners(projectId, scenarioId, econRunId, skip, take, comboName, well);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling OneLinersApi.HeadOneLiners: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string    
scenarioId string    
econRunId string    
skip int? number of items to skip [optional] [default to 0]
take int? max records to return [optional] [default to 25] [between 1 and 200]
comboName string filter by comboName [optional]
well string filter by well [optional]

Return type

void (empty response body)

Authorization

API Key, Service Account

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK | * X-Query-Count - The number of records in this resource. When filters are provided only matching records are counted.
* Link - Indicates a typed relationship with another resource, where the relation type is defined by RFC 5988. We include the relationships next, prev, first and last, which can be used to move between pages of the list of results. | | 400 | Bad Request. There is something wrong with the request data. | - |

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