All URIs are relative to http://game.host/v1
Method | HTTP request | Description |
---|---|---|
DeleteMap | DELETE /maps/{map_name} | Delete Map |
GetMap | GET /maps/{map_name} | Get map |
GetMaps | GET /maps/ | Get Map Names |
SaveMap | POST /maps/ | Save Map |
void DeleteMap (string mapName)
Delete Map
Delete a map by its name
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 DeleteMapExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://game.host/v1";
// Configure API key authorization: admin-access
config.AddApiKey("skey", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("skey", "Bearer");
var apiInstance = new MapRepoApi(config);
var mapName = mapName_example; // string |
try
{
// Delete Map
apiInstance.DeleteMap(mapName);
}
catch (ApiException e)
{
Debug.Print("Exception when calling MapRepoApi.DeleteMap: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
mapName | string |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | Deleted | - |
404 | Not Found | - |
500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MapInfo GetMap (string mapName)
Get map
Get a map by its name
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 GetMapExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://game.host/v1";
// Configure API key authorization: admin-access
config.AddApiKey("skey", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("skey", "Bearer");
var apiInstance = new MapRepoApi(config);
var mapName = mapName_example; // string |
try
{
// Get map
MapInfo result = apiInstance.GetMap(mapName);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling MapRepoApi.GetMap: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
mapName | string |
- 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]
List<string> GetMaps ()
Get Map Names
Returns a list of all map names
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 GetMapsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://game.host/v1";
// Configure API key authorization: admin-access
config.AddApiKey("skey", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("skey", "Bearer");
var apiInstance = new MapRepoApi(config);
try
{
// Get Map Names
List<string> result = apiInstance.GetMaps();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling MapRepoApi.GetMaps: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This endpoint does not need any parameter.
List
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void SaveMap (Map map = null)
Save Map
Saves a map to the repository
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 SaveMapExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://game.host/v1";
// Configure API key authorization: admin-access
config.AddApiKey("skey", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("skey", "Bearer");
var apiInstance = new MapRepoApi(config);
var map = new Map(); // Map | The map to save (optional)
try
{
// Save Map
apiInstance.SaveMap(map);
}
catch (ApiException e)
{
Debug.Print("Exception when calling MapRepoApi.SaveMap: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
map | Map | The map to save | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]