Skip to content

Latest commit

 

History

History
406 lines (306 loc) · 18 KB

WorldApi.md

File metadata and controls

406 lines (306 loc) · 18 KB

Swagger\Client\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

\Swagger\Client\Model\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

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyHeader
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WebAPI-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WebAPI-Key', 'Bearer');
// Configure API key authorization: ApiKeyQuery
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('key', 'Bearer');

$apiInstance = new Swagger\Client\Api\WorldApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$body = new \Swagger\Client\Model\CreateWorldRequest(); // \Swagger\Client\Model\CreateWorldRequest | 
$details = true; // bool | Add to include additional details, omit or false otherwise
$accept = "accept_example"; // string | Override the 'Accept' request header (useful for debugging your requests)
$pretty = true; // bool | Add to make the Web-API pretty print the response (useful for debugging your requests)

try {
    $result = $apiInstance->createWorld($body, $details, $accept, $pretty);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorldApi->createWorld: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Swagger\Client\Model\CreateWorldRequest [optional]
details bool Add to include additional details, omit or false otherwise [optional]
accept string Override the 'Accept' request header (useful for debugging your requests) [optional]
pretty bool Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

\Swagger\Client\Model\World

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteWorld

\Swagger\Client\Model\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

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyHeader
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WebAPI-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WebAPI-Key', 'Bearer');
// Configure API key authorization: ApiKeyQuery
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('key', 'Bearer');

$apiInstance = new Swagger\Client\Api\WorldApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$world = "world_example"; // string | The uuid of the world to delete
$details = true; // bool | Add to include additional details, omit or false otherwise
$accept = "accept_example"; // string | Override the 'Accept' request header (useful for debugging your requests)
$pretty = true; // bool | Add to make the Web-API pretty print the response (useful for debugging your requests)

try {
    $result = $apiInstance->deleteWorld($world, $details, $accept, $pretty);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorldApi->deleteWorld: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

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

Return type

\Swagger\Client\Model\World

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

executeMethod

\Swagger\Client\Model\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

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyHeader
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WebAPI-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WebAPI-Key', 'Bearer');
// Configure API key authorization: ApiKeyQuery
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('key', 'Bearer');

$apiInstance = new Swagger\Client\Api\WorldApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$world = "world_example"; // string | The uuid of the world on which to execute the method
$body = new \Swagger\Client\Model\ExecuteMethodRequest(); // \Swagger\Client\Model\ExecuteMethodRequest | 
$details = true; // bool | Add to include additional details, omit or false otherwise
$accept = "accept_example"; // string | Override the 'Accept' request header (useful for debugging your requests)
$pretty = true; // bool | Add to make the Web-API pretty print the response (useful for debugging your requests)

try {
    $result = $apiInstance->executeMethod($world, $body, $details, $accept, $pretty);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorldApi->executeMethod: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

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

Return type

\Swagger\Client\Model\ExecuteMethodResponse

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWorld

\Swagger\Client\Model\World getWorld($world, $details, $accept, $pretty)

Get a world

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

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyHeader
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WebAPI-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WebAPI-Key', 'Bearer');
// Configure API key authorization: ApiKeyQuery
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('key', 'Bearer');

$apiInstance = new Swagger\Client\Api\WorldApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$world = "world_example"; // string | The uuid of the world for which to get details
$details = true; // bool | Add to include additional details, omit or false otherwise
$accept = "accept_example"; // string | Override the 'Accept' request header (useful for debugging your requests)
$pretty = true; // bool | Add to make the Web-API pretty print the response (useful for debugging your requests)

try {
    $result = $apiInstance->getWorld($world, $details, $accept, $pretty);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorldApi->getWorld: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

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

Return type

\Swagger\Client\Model\World

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listWorlds

\Swagger\Client\Model\World[] listWorlds($details, $accept, $pretty)

List worlds

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

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyHeader
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WebAPI-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WebAPI-Key', 'Bearer');
// Configure API key authorization: ApiKeyQuery
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('key', 'Bearer');

$apiInstance = new Swagger\Client\Api\WorldApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$details = true; // bool | Add to include additional details, omit or false otherwise
$accept = "accept_example"; // string | Override the 'Accept' request header (useful for debugging your requests)
$pretty = true; // bool | Add to make the Web-API pretty print the response (useful for debugging your requests)

try {
    $result = $apiInstance->listWorlds($details, $accept, $pretty);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorldApi->listWorlds: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

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

Return type

\Swagger\Client\Model\World[]

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

modifyWorld

\Swagger\Client\Model\World modifyWorld($world, $body, $details, $accept, $pretty)

Modify a world

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

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyHeader
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-WebAPI-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-WebAPI-Key', 'Bearer');
// Configure API key authorization: ApiKeyQuery
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('key', 'Bearer');

$apiInstance = new Swagger\Client\Api\WorldApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$world = "world_example"; // string | The uuid of the world which to update
$body = new \Swagger\Client\Model\UpdateWorldRequest(); // \Swagger\Client\Model\UpdateWorldRequest | 
$details = true; // bool | Add to include additional details, omit or false otherwise
$accept = "accept_example"; // string | Override the 'Accept' request header (useful for debugging your requests)
$pretty = true; // bool | Add to make the Web-API pretty print the response (useful for debugging your requests)

try {
    $result = $apiInstance->modifyWorld($world, $body, $details, $accept, $pretty);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorldApi->modifyWorld: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
world string The uuid of the world which to update
body \Swagger\Client\Model\UpdateWorldRequest [optional]
details bool Add to include additional details, omit or false otherwise [optional]
accept string Override the 'Accept' request header (useful for debugging your requests) [optional]
pretty bool Add to make the Web-API pretty print the response (useful for debugging your requests) [optional]

Return type

\Swagger\Client\Model\World

Authorization

ApiKeyHeader, ApiKeyQuery

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]