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 |
---|---|---|
DeleteScenarioCombosDelete | DELETE /v1/projects/{projectId}/scenarios/{scenarioId}/combos | |
GetScenarioCombosRead | GET /v1/projects/{projectId}/scenarios/{scenarioId}/combos | |
HeadScenarioCombosCount | HEAD /v1/projects/{projectId}/scenarios/{scenarioId}/combos | |
PostScenarioCombosUpsert | POST /v1/projects/{projectId}/scenarios/{scenarioId}/combos | |
PutScenarioCombosUpsert | PUT /v1/projects/{projectId}/scenarios/{scenarioId}/combos |
void DeleteScenarioCombosDelete (string scenarioId, string projectId, string savedName, string comboIds = 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 DeleteScenarioCombosDeleteExample
{
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 ScenarioCombosApi(serviceAccount, apiKey);
var scenarioId = "scenarioId_example"; // string |
var projectId = "projectId_example"; // string |
var savedName = "savedName_example"; // string |
var comboIds = new string[] { "comboIds_example" }; // IEnumerable<string> | (optional)
try
{
apiInstance.DeleteScenarioCombosDelete(scenarioId, projectId, savedName, comboIds);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ScenarioCombosApi.DeleteScenarioCombosDelete: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
scenarioId | string | ||
projectId | string | ||
savedName | string | ||
comboIds | string | [optional] |
void (empty response body)
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 204 | NoContent Response | * x-delete-count - | | 404 | NotFound Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ICollection<ScenarioCombosReadOKResponse> GetScenarioCombosRead (string scenarioId, string projectId, int? skip = null, int? take = null, string sort = null, string savedName = 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 GetScenarioCombosReadExample
{
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 ScenarioCombosApi(serviceAccount, apiKey);
var scenarioId = "scenarioId_example"; // string |
var projectId = "projectId_example"; // string |
var skip = 56; // int? | number of items to skip (optional)
var take = 56; // int? | max records to return (optional) (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 savedName = new string[] { "savedName_example" }; // IEnumerable<string> | (optional)
try
{
ICollection<ScenarioCombosReadOKResponse> result = apiInstance.GetScenarioCombosRead(scenarioId, projectId, skip, take, sort, savedName);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ScenarioCombosApi.GetScenarioCombosRead: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
scenarioId | string | ||
projectId | string | ||
skip | int? | number of items to skip | [optional] |
take | int? | max records to return | [optional] [between 1 and 200] |
sort | string | field to sort by, including + or - at the beginning for ascending or descending order, respectively | [optional] |
savedName | string | [optional] |
ICollection<ScenarioCombosReadOKResponse>
API Key, Service Account
| Status code | Description | Response headers |
|————-|————-|——————|
| 200 | OK Response | * X-Query-Count -
* 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. |
| 404 | NotFound Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void HeadScenarioCombosCount (string scenarioId, string projectId)
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 HeadScenarioCombosCountExample
{
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 ScenarioCombosApi(serviceAccount, apiKey);
var scenarioId = "scenarioId_example"; // string |
var projectId = "projectId_example"; // string |
try
{
apiInstance.HeadScenarioCombosCount(scenarioId, projectId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ScenarioCombosApi.HeadScenarioCombosCount: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
scenarioId | string | ||
projectId | string |
void (empty response body)
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 204 | NoContent Response | * X-Query-Count - | | 400 | BadRequest Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ScenarioCombosUpsertMultiStatusResponse PostScenarioCombosUpsert (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 PostScenarioCombosUpsertExample
{
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 ScenarioCombosApi(serviceAccount, apiKey);
var scenarioId = "scenarioId_example"; // string |
var projectId = "projectId_example"; // string |
var payload = new List<SavedCombosPayload>(); // List<SavedCombosPayload> |
try
{
ScenarioCombosUpsertMultiStatusResponse result = apiInstance.PostScenarioCombosUpsert(scenarioId, projectId, payload);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ScenarioCombosApi.PostScenarioCombosUpsert: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
scenarioId | string | ||
projectId | string | ||
payload | List<SavedCombosPayload> |
ScenarioCombosUpsertMultiStatusResponse
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]
ScenarioCombosUpsertMultiStatusResponse PutScenarioCombosUpsert (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 PutScenarioCombosUpsertExample
{
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 ScenarioCombosApi(serviceAccount, apiKey);
var scenarioId = "scenarioId_example"; // string |
var projectId = "projectId_example"; // string |
var payload = new List<SavedCombosPayload>(); // List<SavedCombosPayload> |
try
{
ScenarioCombosUpsertMultiStatusResponse result = apiInstance.PutScenarioCombosUpsert(scenarioId, projectId, payload);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ScenarioCombosApi.PutScenarioCombosUpsert: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
scenarioId | string | ||
projectId | string | ||
payload | List<SavedCombosPayload> |
ScenarioCombosUpsertMultiStatusResponse
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]