All URIs are relative to https://project-ile.net:1038/v1
Method | HTTP request | Description |
---|---|---|
GameActionSessionIDActionIDTargetIDPost | POST /game/action/{sessionID}/{actionID}/{targetID} | Perform action on a game |
GameGet | GET /game | Get list of games |
GameSessionSessionIDDelete | DELETE /game/session/{sessionID} | Leave a game |
GameSessionSessionIDGet | GET /game/session/{sessionID} | Get game session |
GameSessionSessionIDPost | POST /game/session/{sessionID} | Join a game |
GetGameById | GET /game/{gameId} | Find game by ID |
Game GameActionSessionIDActionIDTargetIDPost (string sessionID, long? actionID, long? targetID)
Perform action on a game
Perform action of a user on a game
using System;
using System.Diagnostics;
using WerewolfAPI.Api;
using WerewolfAPI.Client;
using WerewolfAPI.Model;
namespace Example
{
public class GameActionSessionIDActionIDTargetIDPostExample
{
public void main()
{
var apiInstance = new GameApi();
var sessionID = sessionID_example; // string | ID of player'session to perform action
var actionID = 789; // long? | ID of action to perform
var targetID = 789; // long? | ID of target of the action
try
{
// Perform action on a game
Game result = apiInstance.GameActionSessionIDActionIDTargetIDPost(sessionID, actionID, targetID);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling GameApi.GameActionSessionIDActionIDTargetIDPost: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
sessionID | string | ID of player'session to perform action | |
actionID | long? | ID of action to perform | |
targetID | long? | ID of target of the action |
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 GameGet ()
Get list of games
using System;
using System.Diagnostics;
using WerewolfAPI.Api;
using WerewolfAPI.Client;
using WerewolfAPI.Model;
namespace Example
{
public class GameGetExample
{
public void main()
{
var apiInstance = new GameApi();
try
{
// Get list of games
List<Game> result = apiInstance.GameGet();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling GameApi.GameGet: " + 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]
Game GameSessionSessionIDDelete (string sessionID)
Leave a game
Leave game as a player
using System;
using System.Diagnostics;
using WerewolfAPI.Api;
using WerewolfAPI.Client;
using WerewolfAPI.Model;
namespace Example
{
public class GameSessionSessionIDDeleteExample
{
public void main()
{
var apiInstance = new GameApi();
var sessionID = sessionID_example; // string | ID of player'session to leave game
try
{
// Leave a game
Game result = apiInstance.GameSessionSessionIDDelete(sessionID);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling GameApi.GameSessionSessionIDDelete: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
sessionID | string | ID of player'session to leave game |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Game GameSessionSessionIDGet (string sessionID)
Get game session
Get game session information
using System;
using System.Diagnostics;
using WerewolfAPI.Api;
using WerewolfAPI.Client;
using WerewolfAPI.Model;
namespace Example
{
public class GameSessionSessionIDGetExample
{
public void main()
{
var apiInstance = new GameApi();
var sessionID = sessionID_example; // string | ID of player'session to get game information
try
{
// Get game session
Game result = apiInstance.GameSessionSessionIDGet(sessionID);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling GameApi.GameSessionSessionIDGet: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
sessionID | string | ID of player'session to get game information |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Game GameSessionSessionIDPost (string sessionID)
Join a game
Join an available game as a player
using System;
using System.Diagnostics;
using WerewolfAPI.Api;
using WerewolfAPI.Client;
using WerewolfAPI.Model;
namespace Example
{
public class GameSessionSessionIDPostExample
{
public void main()
{
var apiInstance = new GameApi();
var sessionID = sessionID_example; // string | ID of player'session to join game
try
{
// Join a game
Game result = apiInstance.GameSessionSessionIDPost(sessionID);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling GameApi.GameSessionSessionIDPost: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
sessionID | string | ID of player'session to join game |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Game GetGameById (long? gameId)
Find game by ID
Returns a single game
using System;
using System.Diagnostics;
using WerewolfAPI.Api;
using WerewolfAPI.Client;
using WerewolfAPI.Model;
namespace Example
{
public class GetGameByIdExample
{
public void main()
{
var apiInstance = new GameApi();
var gameId = 789; // long? | ID of game to return
try
{
// Find game by ID
Game result = apiInstance.GetGameById(gameId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling GameApi.GetGameById: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
gameId | long? | ID of game 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]