Skip to content

Latest commit

 

History

History
284 lines (216 loc) · 7.97 KB

UserApi.md

File metadata and controls

284 lines (216 loc) · 7.97 KB

RadioManager.Api.UserApi

All URIs are relative to https://radiomanager.io/api/v2

Method HTTP request Description
DeleteUserById DELETE /users/{id} Remove user from station by Id
GetUserById GET /users/{id} Get user by id
InviteUserByMail POST /users/invite Invite user by mail
ListUsers GET /users Get all users.

DeleteUserById

Success DeleteUserById (long? id)

Remove user from station by Id

Remove user from station by Id

Example

using System;
using System.Diagnostics;
using RadioManager.Api;
using RadioManager.Client;
using RadioManager.Model;

namespace Example
{
    public class DeleteUserByIdExample
    {
        public void main()
        {
            // Configure API key authorization: API Key
            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 UserApi();
            var id = 789;  // long? | id of User

            try
            {
                // Remove user from station by Id
                Success result = apiInstance.DeleteUserById(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.DeleteUserById: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id long? id of User

Return type

Success

Authorization

[API Key](../README.md#API Key)

HTTP request headers

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

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

GetUserById

UserResult GetUserById (long? id)

Get user by id

Get user by id

Example

using System;
using System.Diagnostics;
using RadioManager.Api;
using RadioManager.Client;
using RadioManager.Model;

namespace Example
{
    public class GetUserByIdExample
    {
        public void main()
        {
            // Configure API key authorization: API Key
            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 UserApi();
            var id = 789;  // long? | id of User

            try
            {
                // Get user by id
                UserResult result = apiInstance.GetUserById(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.GetUserById: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id long? id of User

Return type

UserResult

Authorization

[API Key](../README.md#API Key)

HTTP request headers

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

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

InviteUserByMail

InviteUserSuccess InviteUserByMail (InviteUserData data)

Invite user by mail

Invite user by mail

Example

using System;
using System.Diagnostics;
using RadioManager.Api;
using RadioManager.Client;
using RadioManager.Model;

namespace Example
{
    public class InviteUserByMailExample
    {
        public void main()
        {
            // Configure API key authorization: API Key
            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 UserApi();
            var data = new InviteUserData(); // InviteUserData | Data **(Required)**

            try
            {
                // Invite user by mail
                InviteUserSuccess result = apiInstance.InviteUserByMail(data);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.InviteUserByMail: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
data InviteUserData Data (Required)

Return type

InviteUserSuccess

Authorization

[API Key](../README.md#API Key)

HTTP request headers

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

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

ListUsers

UserResults ListUsers (long? page = null, long? roleId = null, long? limit = null, string orderBy = null, string orderDirection = null)

Get all users.

List all users.

Example

using System;
using System.Diagnostics;
using RadioManager.Api;
using RadioManager.Client;
using RadioManager.Model;

namespace Example
{
    public class ListUsersExample
    {
        public void main()
        {
            // Configure API key authorization: API Key
            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 UserApi();
            var page = 789;  // long? | Current page *(Optional)* (optional)  (default to 1)
            var roleId = 789;  // long? | Search on Role ID *(Optional)* (optional) 
            var limit = 789;  // long? | Results per page *(Optional)* (optional) 
            var orderBy = orderBy_example;  // string | Field to order the results *(Optional)* (optional) 
            var orderDirection = orderDirection_example;  // string | Direction of ordering *(Optional)* (optional) 

            try
            {
                // Get all users.
                UserResults result = apiInstance.ListUsers(page, roleId, limit, orderBy, orderDirection);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.ListUsers: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
page long? Current page (Optional) [optional] [default to 1]
roleId long? Search on Role ID (Optional) [optional]
limit long? Results per page (Optional) [optional]
orderBy string Field to order the results (Optional) [optional]
orderDirection string Direction of ordering (Optional) [optional]

Return type

UserResults

Authorization

[API Key](../README.md#API Key)

HTTP request headers

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

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