Skip to content

Latest commit

 

History

History
126 lines (94 loc) · 2.74 KB

File metadata and controls

126 lines (94 loc) · 2.74 KB

WerewolfAPI.Api.RoleApi

All URIs are relative to https://project-ile.net:1038/v1

Method HTTP request Description
GetRoleById GET /role/{roleId} Find role by ID
RoleGet GET /role Get list of roles

GetRoleById

Role GetRoleById (long? roleId)

Find role by ID

Returns a single role

Example

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

namespace Example
{
    public class GetRoleByIdExample
    {
        public void main()
        {
            var apiInstance = new RoleApi();
            var roleId = 789;  // long? | ID of role to return

            try
            {
                // Find role by ID
                Role result = apiInstance.GetRoleById(roleId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RoleApi.GetRoleById: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
roleId long? ID of role to return

Return type

Role

Authorization

No authorization required

HTTP request headers

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

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

RoleGet

List RoleGet ()

Get list of roles

Example

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

namespace Example
{
    public class RoleGetExample
    {
        public void main()
        {
            var apiInstance = new RoleApi();

            try
            {
                // Get list of roles
                List<Role> result = apiInstance.RoleGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RoleApi.RoleGet: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

List

Authorization

No authorization required

HTTP request headers

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

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