Skip to content

Latest commit

 

History

History
144 lines (108 loc) · 4.23 KB

UtilsApi.md

File metadata and controls

144 lines (108 loc) · 4.23 KB

IO.Directus.Api.UtilsApi

All URIs are relative to your configured base path, as per example.

Method HTTP request Description
GetHash POST /hash Get a hashed value
GetRandom POST /random Returns random alphanumeric string

GetHash

void GetHash (string _string = null, string hasher = null, string options = null)

Get a hashed value

Example

using System;
using System.Diagnostics;
using IO.Directus.Api;
using IO.Directus.Client;
using IO.Directus.Model;

namespace Example
{
    public class GetHashExample
    {
        public void main()
        {
            // Configure API key authorization: api_key
            Configuration.Default.AddApiKey("access_token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("access_token", "Bearer");

            Configuration.Default.BasePath = "https://myinstance.directus.io/api/1.1";
            
            var apiInstance = new UtilsApi();
            var _string = _string_example;  // string | The string to be hashed (optional) 
            var hasher = hasher_example;  // string | The hasher used to hash the given string (optional)  (default to core)
            var options = options_example;  // string | The hasher options (optional) 

            try
            {
                // Get a hashed value
                apiInstance.GetHash(_string, hasher, options);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UtilsApi.GetHash: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
_string string The string to be hashed [optional]
hasher string The hasher used to hash the given string [optional] [default to core]
options string The hasher options [optional]

Return type

void (empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

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

GetRandom

void GetRandom (string length = null)

Returns random alphanumeric string

Example

using System;
using System.Diagnostics;
using IO.Directus.Api;
using IO.Directus.Client;
using IO.Directus.Model;

namespace Example
{
    public class GetRandomExample
    {
        public void main()
        {
            // Configure API key authorization: api_key
            Configuration.Default.AddApiKey("access_token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("access_token", "Bearer");

            Configuration.Default.BasePath = "https://myinstance.directus.io/api/1.1";
            
            var apiInstance = new UtilsApi();
            var length = length_example;  // string | Integer(String) for length of random string (optional) 

            try
            {
                // Returns random alphanumeric string
                apiInstance.GetRandom(length);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UtilsApi.GetRandom: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
length string Integer(String) for length of random string [optional]

Return type

void (empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

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