Skip to content

Files

Latest commit

 

History

History
418 lines (318 loc) · 16.6 KB

WorldApi.md

File metadata and controls

418 lines (318 loc) · 16.6 KB

WorldApi

All URIs are relative to https://localhost/api/v5

Method HTTP request Description
createWorld POST /world Create a world
deleteWorld DELETE /world/{world} Delete a world
executeMethod POST /world/{world}/method Execute a method
getWorld GET /world/{world} Get a world
listWorlds GET /world List worlds
modifyWorld PUT /world/{world} Modify a world

createWorld

World createWorld(body, details, accept, pretty)

Create a world

Creates a new world with the specified settings. This does not yet load the world. Required permissions: - world.create

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.WorldApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: ApiKeyHeader
ApiKeyAuth ApiKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyHeader");
ApiKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyHeader.setApiKeyPrefix("Token");

// Configure API key authorization: ApiKeyQuery
ApiKeyAuth ApiKeyQuery = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyQuery");
ApiKeyQuery.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyQuery.setApiKeyPrefix("Token");

WorldApi apiInstance = new WorldApi();
CreateWorldRequest body = new CreateWorldRequest(); // CreateWorldRequest | 
Boolean details = true; // Boolean | Add to include additional details, omit or false otherwise
String accept = "accept_example"; // String | Override the 'Accept' request header (useful for debugging your requests)
Boolean pretty = true; // Boolean | Add to make the Web-API pretty print the response (useful for debugging your requests)
try {
    World result = apiInstance.createWorld(body, details, accept, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WorldApi#createWorld");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body CreateWorldRequest [optional]
details Boolean Add to include additional details, omit or false otherwise [optional]
accept String Override the 'Accept' request header (useful for debugging your requests) [optional] [enum: json, xml]
pretty Boolean Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

World

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml

deleteWorld

World deleteWorld(world, details, accept, pretty)

Delete a world

Deletes an existing world. The world must be unloaded before deleting it Required permissions: - world.delete

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.WorldApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: ApiKeyHeader
ApiKeyAuth ApiKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyHeader");
ApiKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyHeader.setApiKeyPrefix("Token");

// Configure API key authorization: ApiKeyQuery
ApiKeyAuth ApiKeyQuery = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyQuery");
ApiKeyQuery.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyQuery.setApiKeyPrefix("Token");

WorldApi apiInstance = new WorldApi();
String world = "world_example"; // String | The uuid of the world to delete
Boolean details = true; // Boolean | Add to include additional details, omit or false otherwise
String accept = "accept_example"; // String | Override the 'Accept' request header (useful for debugging your requests)
Boolean pretty = true; // Boolean | Add to make the Web-API pretty print the response (useful for debugging your requests)
try {
    World result = apiInstance.deleteWorld(world, details, accept, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WorldApi#deleteWorld");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
world String The uuid of the world to delete
details Boolean Add to include additional details, omit or false otherwise [optional]
accept String Override the 'Accept' request header (useful for debugging your requests) [optional] [enum: json, xml]
pretty Boolean Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

World

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml

executeMethod

ExecuteMethodResponse executeMethod(world, body, details, accept, pretty)

Execute a method

Provides direct access to the underlaying world object and can execute any method on it. Required permissions: - world.method

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.WorldApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: ApiKeyHeader
ApiKeyAuth ApiKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyHeader");
ApiKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyHeader.setApiKeyPrefix("Token");

// Configure API key authorization: ApiKeyQuery
ApiKeyAuth ApiKeyQuery = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyQuery");
ApiKeyQuery.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyQuery.setApiKeyPrefix("Token");

WorldApi apiInstance = new WorldApi();
String world = "world_example"; // String | The uuid of the world on which to execute the method
ExecuteMethodRequest body = new ExecuteMethodRequest(); // ExecuteMethodRequest | 
Boolean details = true; // Boolean | Add to include additional details, omit or false otherwise
String accept = "accept_example"; // String | Override the 'Accept' request header (useful for debugging your requests)
Boolean pretty = true; // Boolean | Add to make the Web-API pretty print the response (useful for debugging your requests)
try {
    ExecuteMethodResponse result = apiInstance.executeMethod(world, body, details, accept, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WorldApi#executeMethod");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
world String The uuid of the world on which to execute the method
body ExecuteMethodRequest [optional]
details Boolean Add to include additional details, omit or false otherwise [optional]
accept String Override the 'Accept' request header (useful for debugging your requests) [optional] [enum: json, xml]
pretty Boolean Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

ExecuteMethodResponse

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml

getWorld

World getWorld(world, details, accept, pretty)

Get a world

Get detailed information about a world. Required permissions: - world.one

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.WorldApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: ApiKeyHeader
ApiKeyAuth ApiKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyHeader");
ApiKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyHeader.setApiKeyPrefix("Token");

// Configure API key authorization: ApiKeyQuery
ApiKeyAuth ApiKeyQuery = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyQuery");
ApiKeyQuery.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyQuery.setApiKeyPrefix("Token");

WorldApi apiInstance = new WorldApi();
String world = "world_example"; // String | The uuid of the world for which to get details
Boolean details = true; // Boolean | Add to include additional details, omit or false otherwise
String accept = "accept_example"; // String | Override the 'Accept' request header (useful for debugging your requests)
Boolean pretty = true; // Boolean | Add to make the Web-API pretty print the response (useful for debugging your requests)
try {
    World result = apiInstance.getWorld(world, details, accept, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WorldApi#getWorld");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
world String The uuid of the world for which to get details
details Boolean Add to include additional details, omit or false otherwise [optional]
accept String Override the 'Accept' request header (useful for debugging your requests) [optional] [enum: json, xml]
pretty Boolean Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

World

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml

listWorlds

List<World> listWorlds(details, accept, pretty)

List worlds

Get a list of all the worlds on the server. Required permissions: - world.list

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.WorldApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: ApiKeyHeader
ApiKeyAuth ApiKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyHeader");
ApiKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyHeader.setApiKeyPrefix("Token");

// Configure API key authorization: ApiKeyQuery
ApiKeyAuth ApiKeyQuery = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyQuery");
ApiKeyQuery.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyQuery.setApiKeyPrefix("Token");

WorldApi apiInstance = new WorldApi();
Boolean details = true; // Boolean | Add to include additional details, omit or false otherwise
String accept = "accept_example"; // String | Override the 'Accept' request header (useful for debugging your requests)
Boolean pretty = true; // Boolean | Add to make the Web-API pretty print the response (useful for debugging your requests)
try {
    List<World> result = apiInstance.listWorlds(details, accept, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WorldApi#listWorlds");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
details Boolean Add to include additional details, omit or false otherwise [optional]
accept String Override the 'Accept' request header (useful for debugging your requests) [optional] [enum: json, xml]
pretty Boolean Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

List<World>

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml

modifyWorld

World modifyWorld(world, body, details, accept, pretty)

Modify a world

Modify the properties of an existing world. Required permissions: - world.modify

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.WorldApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: ApiKeyHeader
ApiKeyAuth ApiKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyHeader");
ApiKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyHeader.setApiKeyPrefix("Token");

// Configure API key authorization: ApiKeyQuery
ApiKeyAuth ApiKeyQuery = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyQuery");
ApiKeyQuery.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyQuery.setApiKeyPrefix("Token");

WorldApi apiInstance = new WorldApi();
String world = "world_example"; // String | The uuid of the world which to update
UpdateWorldRequest body = new UpdateWorldRequest(); // UpdateWorldRequest | 
Boolean details = true; // Boolean | Add to include additional details, omit or false otherwise
String accept = "accept_example"; // String | Override the 'Accept' request header (useful for debugging your requests)
Boolean pretty = true; // Boolean | Add to make the Web-API pretty print the response (useful for debugging your requests)
try {
    World result = apiInstance.modifyWorld(world, body, details, accept, pretty);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WorldApi#modifyWorld");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
world String The uuid of the world which to update
body UpdateWorldRequest [optional]
details Boolean Add to include additional details, omit or false otherwise [optional]
accept String Override the 'Accept' request header (useful for debugging your requests) [optional] [enum: json, xml]
pretty Boolean Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

World

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml