Skip to content

Latest commit

 

History

History
409 lines (325 loc) · 14.3 KB

RegionsApi.md

File metadata and controls

409 lines (325 loc) · 14.3 KB

Org.OpenAPITools.Api.RegionsApi

All URIs are relative to https://api.teke.li/api/v1/obs

Method HTTP request Description
Getregions GET /regions Retrieves one or more regions
GetregionsItem GET /regions/{regionsId} Retrieves a regions document
PatchregionsItem PATCH /regions/{regionsId} Updates a regions document
Postregions POST /regions Stores one or more regions.
PutregionsItem PUT /regions/{regionsId} Replaces a regions document

Getregions

InlineResponse2009 Getregions (string where = null, string sort = null, int? page = null, int? maxResults = null)

Retrieves one or more regions

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class GetregionsExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://api.teke.li/api/v1/obs";
            // Configure API key authorization: ApiKeyHeaderAuth
            Configuration.Default.AddApiKey("X-Api-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("X-Api-Key", "Bearer");
            // Configure API key authorization: ApiKeyQueryAuth
            Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");

            var apiInstance = new RegionsApi(Configuration.Default);
            var where = where_example;  // string | the filters query parameter (ex.: {\"number\": 10}) (optional) 
            var sort = sort_example;  // string | the sort query parameter (ex.: \"city,-lastname\") (optional) 
            var page = 1;  // int? | the pages query parameter (optional) 
            var maxResults = 25;  // int? | the max results query parameter (optional) 

            try
            {
                // Retrieves one or more regions
                InlineResponse2009 result = apiInstance.Getregions(where, sort, page, maxResults);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling RegionsApi.Getregions: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
where string the filters query parameter (ex.: {"number": 10}) [optional]
sort string the sort query parameter (ex.: "city,-lastname") [optional]
page int? the pages query parameter [optional]
maxResults int? the max results query parameter [optional]

Return type

InlineResponse2009

Authorization

ApiKeyHeaderAuth, ApiKeyQueryAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 An array of regions -
0 An error message -

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

GetregionsItem

Regions GetregionsItem (string regionsId)

Retrieves a regions document

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class GetregionsItemExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://api.teke.li/api/v1/obs";
            // Configure API key authorization: ApiKeyHeaderAuth
            Configuration.Default.AddApiKey("X-Api-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("X-Api-Key", "Bearer");
            // Configure API key authorization: ApiKeyQueryAuth
            Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");

            var apiInstance = new RegionsApi(Configuration.Default);
            var regionsId = regionsId_example;  // string | 

            try
            {
                // Retrieves a regions document
                Regions result = apiInstance.GetregionsItem(regionsId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling RegionsApi.GetregionsItem: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
regionsId string

Return type

Regions

Authorization

ApiKeyHeaderAuth, ApiKeyQueryAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 regions document fetched successfully -
0 An error message -

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

PatchregionsItem

void PatchregionsItem (string regionsId, string ifMatch, Regions regions)

Updates a regions document

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class PatchregionsItemExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://api.teke.li/api/v1/obs";
            // Configure API key authorization: ApiKeyHeaderAuth
            Configuration.Default.AddApiKey("X-Api-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("X-Api-Key", "Bearer");
            // Configure API key authorization: ApiKeyQueryAuth
            Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");

            var apiInstance = new RegionsApi(Configuration.Default);
            var regionsId = regionsId_example;  // string | 
            var ifMatch = ifMatch_example;  // string | Current value of the _etag field
            var regions = new Regions(); // Regions | A regions or list of regions documents

            try
            {
                // Updates a regions document
                apiInstance.PatchregionsItem(regionsId, ifMatch, regions);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling RegionsApi.PatchregionsItem: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
regionsId string
ifMatch string Current value of the _etag field
regions Regions A regions or list of regions documents

Return type

void (empty response body)

Authorization

ApiKeyHeaderAuth, ApiKeyQueryAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 regions document updated successfully -
0 An error message -

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

Postregions

void Postregions (Regions regions)

Stores one or more regions.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class PostregionsExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://api.teke.li/api/v1/obs";
            // Configure API key authorization: ApiKeyHeaderAuth
            Configuration.Default.AddApiKey("X-Api-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("X-Api-Key", "Bearer");
            // Configure API key authorization: ApiKeyQueryAuth
            Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");

            var apiInstance = new RegionsApi(Configuration.Default);
            var regions = new Regions(); // Regions | A regions or list of regions documents

            try
            {
                // Stores one or more regions.
                apiInstance.Postregions(regions);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling RegionsApi.Postregions: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
regions Regions A regions or list of regions documents

Return type

void (empty response body)

Authorization

ApiKeyHeaderAuth, ApiKeyQueryAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 operation has been successful -
0 An error message -

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

PutregionsItem

void PutregionsItem (string regionsId, string ifMatch, Regions regions)

Replaces a regions document

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class PutregionsItemExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://api.teke.li/api/v1/obs";
            // Configure API key authorization: ApiKeyHeaderAuth
            Configuration.Default.AddApiKey("X-Api-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("X-Api-Key", "Bearer");
            // Configure API key authorization: ApiKeyQueryAuth
            Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");

            var apiInstance = new RegionsApi(Configuration.Default);
            var regionsId = regionsId_example;  // string | 
            var ifMatch = ifMatch_example;  // string | Current value of the _etag field
            var regions = new Regions(); // Regions | A regions or list of regions documents

            try
            {
                // Replaces a regions document
                apiInstance.PutregionsItem(regionsId, ifMatch, regions);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling RegionsApi.PutregionsItem: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
regionsId string
ifMatch string Current value of the _etag field
regions Regions A regions or list of regions documents

Return type

void (empty response body)

Authorization

ApiKeyHeaderAuth, ApiKeyQueryAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 regions document replaced successfully -
0 An error message -

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