All URIs are relative to https://project-ile.net:1038/v1
| Method | HTTP request | Description |
|---|---|---|
| AddPlayer | POST /player | Add a new player to the system |
| DeletePlayer | DELETE /player/{playerId} | Deletes a player |
| FindPlayersByGame | GET /player/findByGame/{gameID} | Finds Players by game |
| GetPlayerById | GET /player/{playerId} | Find player by ID |
| LoginPlayer | POST /player/login | Login into a player account |
| LogoutPlayer | GET /player/logout/{sessionID} | Player logout |
| PlayerGet | GET /player | Get list of players |
| UpdatePlayer | PUT /player | Update an existing player |
Player AddPlayer (Player body)
Add a new player to the system
using System;
using System.Diagnostics;
using WerewolfAPI.Api;
using WerewolfAPI.Client;
using WerewolfAPI.Model;
namespace Example
{
public class AddPlayerExample
{
public void main()
{
var apiInstance = new PlayerApi();
var body = new Player(); // Player | Player object that needs to be added to the system
try
{
// Add a new player to the system
Player result = apiInstance.AddPlayer(body);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling PlayerApi.AddPlayer: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| body | Player | Player object that needs to be added to the system |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeletePlayer (long? playerId)
Deletes a player
using System;
using System.Diagnostics;
using WerewolfAPI.Api;
using WerewolfAPI.Client;
using WerewolfAPI.Model;
namespace Example
{
public class DeletePlayerExample
{
public void main()
{
var apiInstance = new PlayerApi();
var playerId = 789; // long? | Player id to delete
try
{
// Deletes a player
apiInstance.DeletePlayer(playerId);
}
catch (Exception e)
{
Debug.Print("Exception when calling PlayerApi.DeletePlayer: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| playerId | long? | Player id to delete |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List FindPlayersByGame (string gameID)
Finds Players by game
using System;
using System.Diagnostics;
using WerewolfAPI.Api;
using WerewolfAPI.Client;
using WerewolfAPI.Model;
namespace Example
{
public class FindPlayersByGameExample
{
public void main()
{
var apiInstance = new PlayerApi();
var gameID = gameID_example; // string | Game id
try
{
// Finds Players by game
List<Player> result = apiInstance.FindPlayersByGame(gameID);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling PlayerApi.FindPlayersByGame: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| gameID | string | Game id |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Player GetPlayerById (long? playerId)
Find player by ID
Returns a single player
using System;
using System.Diagnostics;
using WerewolfAPI.Api;
using WerewolfAPI.Client;
using WerewolfAPI.Model;
namespace Example
{
public class GetPlayerByIdExample
{
public void main()
{
var apiInstance = new PlayerApi();
var playerId = 789; // long? | ID of player to return
try
{
// Find player by ID
Player result = apiInstance.GetPlayerById(playerId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling PlayerApi.GetPlayerById: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| playerId | long? | ID of player to return |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Player LoginPlayer (Player body)
Login into a player account
using System;
using System.Diagnostics;
using WerewolfAPI.Api;
using WerewolfAPI.Client;
using WerewolfAPI.Model;
namespace Example
{
public class LoginPlayerExample
{
public void main()
{
var apiInstance = new PlayerApi();
var body = new Player(); // Player | Player object that at least contains login/password
try
{
// Login into a player account
Player result = apiInstance.LoginPlayer(body);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling PlayerApi.LoginPlayer: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| body | Player | Player object that at least contains login/password |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List LogoutPlayer (string sessionID)
Player logout
using System;
using System.Diagnostics;
using WerewolfAPI.Api;
using WerewolfAPI.Client;
using WerewolfAPI.Model;
namespace Example
{
public class LogoutPlayerExample
{
public void main()
{
var apiInstance = new PlayerApi();
var sessionID = sessionID_example; // string | ID of player's session to logout
try
{
// Player logout
List<Player> result = apiInstance.LogoutPlayer(sessionID);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling PlayerApi.LogoutPlayer: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| sessionID | string | ID of player's session to logout |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List PlayerGet ()
Get list of players
using System;
using System.Diagnostics;
using WerewolfAPI.Api;
using WerewolfAPI.Client;
using WerewolfAPI.Model;
namespace Example
{
public class PlayerGetExample
{
public void main()
{
var apiInstance = new PlayerApi();
try
{
// Get list of players
List<Player> result = apiInstance.PlayerGet();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling PlayerApi.PlayerGet: " + e.Message );
}
}
}
}This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void UpdatePlayer (Player body)
Update an existing player
using System;
using System.Diagnostics;
using WerewolfAPI.Api;
using WerewolfAPI.Client;
using WerewolfAPI.Model;
namespace Example
{
public class UpdatePlayerExample
{
public void main()
{
var apiInstance = new PlayerApi();
var body = new Player(); // Player | Player object that needs to be added to the system
try
{
// Update an existing player
apiInstance.UpdatePlayer(body);
}
catch (Exception e)
{
Debug.Print("Exception when calling PlayerApi.UpdatePlayer: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| body | Player | Player object that needs to be added to the system |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]