combocurve-client-csharp

Logo

C# client for the ComboCurve REST API

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

ComboCurve.Api.Api.ProductionCommentTypesApi

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

Method HTTP request Description
GetProductionCommentTypes GET /v1/production-comment-types Returns the company-level production comment type configuration (label and color) for all 15 production comment type keys.
PatchProductionCommentTypes PATCH /v1/production-comment-types Updates the company-level production comment type configuration (label and color) by key and returns the full 15-key configuration.

GetProductionCommentTypes

ProductionCommentTypesResponse GetProductionCommentTypes ()

Returns the company-level production comment type configuration (label and color) for all 15 production comment type keys.

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 GetProductionCommentTypesExample
    {
        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 ProductionCommentTypesApi(serviceAccount, apiKey);


            try
            {
                // Returns the company-level production comment type configuration (label and color) for all 15 production comment type keys.
                ProductionCommentTypesResponse result = apiInstance.GetProductionCommentTypes();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProductionCommentTypesApi.GetProductionCommentTypes: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

ProductionCommentTypesResponse

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]

PatchProductionCommentTypes

ProductionCommentTypesResponse PatchProductionCommentTypes (ProductionCommentTypesUpdateRequest body = null)

Updates the company-level production comment type configuration (label and color) by key and returns the full 15-key configuration.

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 PatchProductionCommentTypesExample
    {
        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 ProductionCommentTypesApi(serviceAccount, apiKey);

            var body = new ProductionCommentTypesUpdateRequest(); // ProductionCommentTypesUpdateRequest | Production comment types to update (optional) 

            try
            {
                // Updates the company-level production comment type configuration (label and color) by key and returns the full 15-key configuration.
                ProductionCommentTypesResponse result = apiInstance.PatchProductionCommentTypes(body);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ProductionCommentTypesApi.PatchProductionCommentTypes: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
body ProductionCommentTypesUpdateRequest Production comment types to update [optional]

Return type

ProductionCommentTypesResponse

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]