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 |
---|---|---|
GetMonthlyEconResultById | GET /v1/projects/{projectId}/scenarios/{scenarioId}/econ-runs/{econRunId}/monthly-econ-results | Returns econ monthly result columns that matches the provided econ run id. |
EconRunResult GetMonthlyEconResultById (string econRunId, string projectId, string scenarioId, string columns, string startDate = null, string endDate = null)
Returns econ monthly result columns that matches the provided econ run id.
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 GetMonthlyEconResultByIdExample
{
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 EconRunResultsApi(serviceAccount, apiKey);
var econRunId = "econRunId_example"; // string | Econ Run Id
var projectId = "projectId_example"; // string | Project Id
var scenarioId = "scenarioId_example"; // string | Scenario Id
var columns = "columns_example"; // string | List of columns separated by commas, do not follow commas with spaces, e.g. \"column1,column2\"
var startDate = "startDate_example"; // string | Date at which to start the returned monthly result, e.g. \"2019-01-01\" (optional)
var endDate = "endDate_example"; // string | Date at which to end the returned monthly result, e.g. \"2020-01-01\" (optional)
try
{
// Returns econ monthly result columns that matches the provided econ run id.
EconRunResult result = apiInstance.GetMonthlyEconResultById(econRunId, projectId, scenarioId, columns, startDate, endDate);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EconRunResultsApi.GetMonthlyEconResultById: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
econRunId | string | Econ Run Id | |
projectId | string | Project Id | |
scenarioId | string | Scenario Id | |
columns | string | List of columns separated by commas, do not follow commas with spaces, e.g. \"column1,column2\" | |
startDate | string | Date at which to start the returned monthly result, e.g. \"2019-01-01\" | [optional] |
endDate | string | Date at which to end the returned monthly result, e.g. \"2020-01-01\" | [optional] |
API Key, Service Account
| 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]