Skip to content

Latest commit

 

History

History
663 lines (529 loc) · 18.4 KB

GlossaryApi.md

File metadata and controls

663 lines (529 loc) · 18.4 KB

Com.Gridly.Api.GlossaryApi

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

Method HTTP request Description
Create POST /v1/glossaries Create a new glossary
Delete DELETE /v1/glossaries/{id} Delete a glossary
ExportFile GET /v1/glossaries/{id}/export Export a glossary
Get GET /v1/glossaries/{id} get glossary info
GetAll GET /v1/glossaries List all glossaries
ImportFile POST /v1/glossaries/{id}/import Import a glossary from file
Update PUT /v1/glossaries/{id} Update glossary info

Create

Glossary Create (CreateGlossary createGlossary = null)

Create a new glossary

Example

using System.Collections.Generic;
using System.Diagnostics;
using Com.Gridly.Api;
using Com.Gridly.Client;
using Com.Gridly.Model;

namespace Example
{
    public class CreateExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.gridly.com";
            // Configure API key authorization: ApiKey
            config.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new GlossaryApi(config);
            var createGlossary = new CreateGlossary(); // CreateGlossary |  (optional) 

            try
            {
                // Create a new glossary
                Glossary result = apiInstance.Create(createGlossary);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling GlossaryApi.Create: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the CreateWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Create a new glossary
    ApiResponse<Glossary> response = apiInstance.CreateWithHttpInfo(createGlossary);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling GlossaryApi.CreateWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
createGlossary CreateGlossary [optional]

Return type

Glossary

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Create a new glossary successful ! -

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

Delete

void Delete (long id)

Delete a glossary

Example

using System.Collections.Generic;
using System.Diagnostics;
using Com.Gridly.Api;
using Com.Gridly.Client;
using Com.Gridly.Model;

namespace Example
{
    public class DeleteExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.gridly.com";
            // Configure API key authorization: ApiKey
            config.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new GlossaryApi(config);
            var id = 789L;  // long | 

            try
            {
                // Delete a glossary
                apiInstance.Delete(id);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling GlossaryApi.Delete: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the DeleteWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Delete a glossary
    apiInstance.DeleteWithHttpInfo(id);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling GlossaryApi.DeleteWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
id long

Return type

void (empty response body)

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 No Content -

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

ExportFile

void ExportFile (long id, List fields = null, GlossaryExportFormat? format = null, List langs = null)

Export a glossary

Example

using System.Collections.Generic;
using System.Diagnostics;
using Com.Gridly.Api;
using Com.Gridly.Client;
using Com.Gridly.Model;

namespace Example
{
    public class ExportFileExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.gridly.com";
            // Configure API key authorization: ApiKey
            config.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new GlossaryApi(config);
            var id = 789L;  // long | 
            var fields = new List<string>(); // List<string> |  (optional) 
            var format = new GlossaryExportFormat();  // GlossaryExportFormat? |  (optional) 
            var langs = new List<string>(); // List<string> |  (optional) 

            try
            {
                // Export a glossary
                apiInstance.ExportFile(id, fields, format, langs);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling GlossaryApi.ExportFile: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the ExportFileWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Export a glossary
    apiInstance.ExportFileWithHttpInfo(id, fields, format, langs);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling GlossaryApi.ExportFileWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
id long
fields List<string> [optional]
format GlossaryExportFormat? [optional]
langs List<string> [optional]

Return type

void (empty response body)

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 OK -

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

Get

Glossary Get (long id)

get glossary info

Example

using System.Collections.Generic;
using System.Diagnostics;
using Com.Gridly.Api;
using Com.Gridly.Client;
using Com.Gridly.Model;

namespace Example
{
    public class GetExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.gridly.com";
            // Configure API key authorization: ApiKey
            config.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new GlossaryApi(config);
            var id = 789L;  // long | 

            try
            {
                // get glossary info
                Glossary result = apiInstance.Get(id);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling GlossaryApi.Get: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the GetWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // get glossary info
    ApiResponse<Glossary> response = apiInstance.GetWithHttpInfo(id);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling GlossaryApi.GetWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
id long

Return type

Glossary

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -

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

GetAll

List<Glossary> GetAll ()

List all glossaries

Example

using System.Collections.Generic;
using System.Diagnostics;
using Com.Gridly.Api;
using Com.Gridly.Client;
using Com.Gridly.Model;

namespace Example
{
    public class GetAllExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.gridly.com";
            // Configure API key authorization: ApiKey
            config.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new GlossaryApi(config);

            try
            {
                // List all glossaries
                List<Glossary> result = apiInstance.GetAll();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling GlossaryApi.GetAll: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the GetAllWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // List all glossaries
    ApiResponse<List<Glossary>> response = apiInstance.GetAllWithHttpInfo();
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling GlossaryApi.GetAllWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

This endpoint does not need any parameter.

Return type

List<Glossary>

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -

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

ImportFile

void ImportFile (long id, ImportOption? importOption = null, Object file = null)

Import a glossary from file

Example

using System.Collections.Generic;
using System.Diagnostics;
using Com.Gridly.Api;
using Com.Gridly.Client;
using Com.Gridly.Model;

namespace Example
{
    public class ImportFileExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.gridly.com";
            // Configure API key authorization: ApiKey
            config.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new GlossaryApi(config);
            var id = 789L;  // long | 
            var importOption = new ImportOption();  // ImportOption? |  (optional) 
            var file = new Object(); // Object |  (optional) 

            try
            {
                // Import a glossary from file
                apiInstance.ImportFile(id, importOption, file);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling GlossaryApi.ImportFile: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the ImportFileWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Import a glossary from file
    apiInstance.ImportFileWithHttpInfo(id, importOption, file);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling GlossaryApi.ImportFileWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
id long
importOption ImportOption? [optional]
file Object [optional]

Return type

void (empty response body)

Authorization

ApiKey

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: Not defined

HTTP response details

Status code Description Response headers
201 Created -

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

Update

void Update (long id, UpdateGlossary updateGlossary = null)

Update glossary info

Example

using System.Collections.Generic;
using System.Diagnostics;
using Com.Gridly.Api;
using Com.Gridly.Client;
using Com.Gridly.Model;

namespace Example
{
    public class UpdateExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.gridly.com";
            // Configure API key authorization: ApiKey
            config.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new GlossaryApi(config);
            var id = 789L;  // long | 
            var updateGlossary = new UpdateGlossary(); // UpdateGlossary |  (optional) 

            try
            {
                // Update glossary info
                apiInstance.Update(id, updateGlossary);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling GlossaryApi.Update: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the UpdateWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Update glossary info
    apiInstance.UpdateWithHttpInfo(id, updateGlossary);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling GlossaryApi.UpdateWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
id long
updateGlossary UpdateGlossary [optional]

Return type

void (empty response body)

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -

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