All URIs are relative to https://localhost/api/v5
Method | HTTP request | Description |
---|---|---|
createChunkAt | POST /chunk/{world}/{x}/{z} | Load & Generate a chunk |
getChunkAt | GET /chunk/{world}/{x}/{z} | Get a chunk |
listChunks | GET /chunk/{world} | List chunks |
\Swagger\Client\Model\Chunk createChunkAt($world, $x, $z, $details, $accept, $pretty)
Load & Generate a chunk
Forces a chunk to be loaded into memory, and created if it does not exist. Required permissions: - chunk.create
<?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\ChunkApi(
// 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 in which to create the chunk
$x = 56; // int | The x-coordinate of the chunk (in chunk coordinates)
$z = 56; // int | The z-coordinate of the chunk (in chunk coordinates)
$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->createChunkAt($world, $x, $z, $details, $accept, $pretty);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ChunkApi->createChunkAt: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
world | string | The uuid of the world in which to create the chunk | |
x | int | The x-coordinate of the chunk (in chunk coordinates) | |
z | int | The z-coordinate of the chunk (in chunk coordinates) | |
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] |
- 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]
\Swagger\Client\Model\Chunk getChunkAt($world, $x, $z, $details, $accept, $pretty)
Get a chunk
Get detailed information about a chunk Required permissions: - chunk.one
<?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\ChunkApi(
// 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 in which to get the chunk
$x = 56; // int | The x-coordinate of the chunk (in chunk coordinates)
$z = 56; // int | The z-coordinate of the chunk (in chunk coordinates)
$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->getChunkAt($world, $x, $z, $details, $accept, $pretty);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ChunkApi->getChunkAt: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
world | string | The uuid of the world in which to get the chunk | |
x | int | The x-coordinate of the chunk (in chunk coordinates) | |
z | int | The z-coordinate of the chunk (in chunk coordinates) | |
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] |
- 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]
\Swagger\Client\Model\Chunk[] listChunks($world, $details, $accept, $pretty)
List chunks
Gets a list of all the loaded chunks for the specified world. Required permissions: - chunk.list
<?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\ChunkApi(
// 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 for which to get all chunks
$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->listChunks($world, $details, $accept, $pretty);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ChunkApi->listChunks: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
world | string | The uuid of the for which to get all chunks | |
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] |
- 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]