Started with JSON API module system

This commit is contained in:
Stefan Brannfjell
2014-03-09 04:42:28 +01:00
parent 7861292449
commit 733766dd45
8 changed files with 166 additions and 5 deletions

View File

@@ -0,0 +1,15 @@
<?php require_once '../../module.php';
// Configure module version number
$response['version']['module'] = 1;
// Fetch towns
$response['data']['towns'] = $config['towns'];
// Fetch towns available under character creation
foreach ($config['available_towns'] as $id) {
$response['data']['available'][$id] = $response['data']['towns'][$id];
}
SendResponse($response);
?>