C# client for the ComboCurve REST API
View the Project on GitHub insidepetroleum/combocurve-client-csharp
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 |
void DeleteQualifiersDelete (string scenarioId, string projectId, string econNames, string qualifierNames)
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);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
scenarioId | string | ||
projectId | string | ||
econNames | string | ||
qualifierNames | string |
void (empty response body)
API Key, Service Account
| 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]
QualifiersReadOKResponse GetQualifiersRead (string scenarioId, string projectId, string econName = null)
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);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
scenarioId | string | ||
projectId | string | ||
econName | string | [optional] |
API Key, Service Account
| 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]
QualifiersUpsertMultiStatusResponse PostQualifiersUpsert (string scenarioId, string projectId, List
payload)
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);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
scenarioId | string | ||
projectId | string | ||
payload | List<QualifierUpsertPayload> |
QualifiersUpsertMultiStatusResponse
API Key, Service Account
| 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]
QualifiersUpsertMultiStatusResponse PutQualifiersUpsert (string scenarioId, string projectId, List
payload)
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);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
scenarioId | string | ||
projectId | string | ||
payload | List<QualifierUpsertPayload> |
QualifiersUpsertMultiStatusResponse
API Key, Service Account
| 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]