All URIs are relative to http://game.host/v1
Method | HTTP request | Description |
---|---|---|
GetGameMap | GET /games/{game_id}/map | Get Map |
GetMapInfo | GET /games/{game_id}/map/info | Get Map info |
GetTile | GET /games/{game_id}/map/tiles/{x}/{y} | Get tile |
Map GetGameMap (int gameId)
Get Map
Returns the map of this specific game including the tiles (data)
using System.Collections.Generic;
using System.Diagnostics;
using Tgm.Roborally.Api.Api;
using Tgm.Roborally.Api.Client;
using Tgm.Roborally.Api.Model;
namespace Example
{
public class GetGameMapExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://game.host/v1";
// Configure API key authorization: player-auth
config.AddApiKey("pat", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("pat", "Bearer");
var apiInstance = new MapApi(config);
var gameId = 56; // int | The id of the game to interact with
try
{
// Get Map
Map result = apiInstance.GetGameMap(gameId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling MapApi.GetGameMap: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
gameId | int | The id of the game to interact with |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
404 | Not Found | - |
500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MapInfo GetMapInfo (int gameId)
Get Map info
Get meta information abouzt the map of the game
using System.Collections.Generic;
using System.Diagnostics;
using Tgm.Roborally.Api.Api;
using Tgm.Roborally.Api.Client;
using Tgm.Roborally.Api.Model;
namespace Example
{
public class GetMapInfoExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://game.host/v1";
// Configure API key authorization: player-auth
config.AddApiKey("pat", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("pat", "Bearer");
var apiInstance = new MapApi(config);
var gameId = 56; // int | The id of the game to interact with
try
{
// Get Map info
MapInfo result = apiInstance.GetMapInfo(gameId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling MapApi.GetMapInfo: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
gameId | int | The id of the game to interact with |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Tile GetTile (int gameId, int x, int y)
Get tile
Inspect a tile of the map
using System.Collections.Generic;
using System.Diagnostics;
using Tgm.Roborally.Api.Api;
using Tgm.Roborally.Api.Client;
using Tgm.Roborally.Api.Model;
namespace Example
{
public class GetTileExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://game.host/v1";
// Configure API key authorization: player-auth
config.AddApiKey("pat", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("pat", "Bearer");
var apiInstance = new MapApi(config);
var gameId = 56; // int | The id of the game to interact with
var x = 56; // int | The x codinate of the tile
var y = 56; // int | The y codinate of the tile
try
{
// Get tile
Tile result = apiInstance.GetTile(gameId, x, y);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling MapApi.GetTile: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
gameId | int | The id of the game to interact with | |
x | int | The x codinate of the tile | |
y | int | The y codinate of the tile |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]