Skip to content

Latest commit

 

History

History
390 lines (317 loc) · 11.6 KB

File metadata and controls

390 lines (317 loc) · 11.6 KB

WalletInc.Api.AuthenticationApi

All URIs are relative to https://api.wall.et

Method HTTP request Description
Login POST /authentication/login Login
LoginStatus GET /authentication/status/{token} Retrieve session token status
Logout DELETE /authentication/logout Logout
Register POST /authentication/register Register

Login

WTAuthenticationLoginResponse Login (WTAuthenticationLoginRequest wTAuthenticationLoginRequest)

Login

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using WalletInc.Api;
using WalletInc.Client;
using WalletInc.Model;

namespace Example
{
    public class LoginExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.wall.et";
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new AuthenticationApi(httpClient, config, httpClientHandler);
            var wTAuthenticationLoginRequest = new WTAuthenticationLoginRequest(); // WTAuthenticationLoginRequest | 

            try
            {
                // Login
                WTAuthenticationLoginResponse result = apiInstance.Login(wTAuthenticationLoginRequest);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling AuthenticationApi.Login: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the LoginWithHttpInfo variant

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

try
{
    // Login
    ApiResponse<WTAuthenticationLoginResponse> response = apiInstance.LoginWithHttpInfo(wTAuthenticationLoginRequest);
    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 AuthenticationApi.LoginWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
wTAuthenticationLoginRequest WTAuthenticationLoginRequest

Return type

WTAuthenticationLoginResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Ok -
401 Authentication Failed -
422 Validation Failed -
500 Internal Server Error -

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

LoginStatus

LoginStatus200Response LoginStatus (string token)

Retrieve session token status

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using WalletInc.Api;
using WalletInc.Client;
using WalletInc.Model;

namespace Example
{
    public class LoginStatusExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.wall.et";
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new AuthenticationApi(httpClient, config, httpClientHandler);
            var token = "token_example";  // string | 

            try
            {
                // Retrieve session token status
                LoginStatus200Response result = apiInstance.LoginStatus(token);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling AuthenticationApi.LoginStatus: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the LoginStatusWithHttpInfo variant

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

try
{
    // Retrieve session token status
    ApiResponse<LoginStatus200Response> response = apiInstance.LoginStatusWithHttpInfo(token);
    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 AuthenticationApi.LoginStatusWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
token string

Return type

LoginStatus200Response

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Ok -
401 Authentication Failed -
422 Validation Failed -
500 Internal Server Error -

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

Logout

string Logout ()

Logout

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using WalletInc.Api;
using WalletInc.Client;
using WalletInc.Model;

namespace Example
{
    public class LogoutExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.wall.et";
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new AuthenticationApi(httpClient, config, httpClientHandler);

            try
            {
                // Logout
                string result = apiInstance.Logout();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling AuthenticationApi.Logout: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the LogoutWithHttpInfo variant

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

try
{
    // Logout
    ApiResponse<string> response = apiInstance.LogoutWithHttpInfo();
    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 AuthenticationApi.LogoutWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

This endpoint does not need any parameter.

Return type

string

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Ok -
401 Authentication Failed -
422 Validation Failed -
500 Internal Server Error -

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

Register

Employee Register (WTAuthenticationRegister wTAuthenticationRegister)

Register

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using WalletInc.Api;
using WalletInc.Client;
using WalletInc.Model;

namespace Example
{
    public class RegisterExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.wall.et";
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new AuthenticationApi(httpClient, config, httpClientHandler);
            var wTAuthenticationRegister = new WTAuthenticationRegister(); // WTAuthenticationRegister | 

            try
            {
                // Register
                Employee result = apiInstance.Register(wTAuthenticationRegister);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling AuthenticationApi.Register: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the RegisterWithHttpInfo variant

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

try
{
    // Register
    ApiResponse<Employee> response = apiInstance.RegisterWithHttpInfo(wTAuthenticationRegister);
    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 AuthenticationApi.RegisterWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
wTAuthenticationRegister WTAuthenticationRegister

Return type

Employee

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Ok -
401 Authentication Failed -
422 Validation Failed -
500 Internal Server Error -

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