json-api/shared/main.php

14 lines
245 B
PHP
Raw Normal View History

2019-09-14 17:38:35 +02:00
<?php
$webApiVersion = '0.2.0';
2019-09-14 17:38:35 +02:00
function sendResponse($apiResponse) {
global $webApiVersion;
$response = [
'response' => $apiResponse,
'jsonApiVersion' => $webApiVersion,
];
2019-09-14 18:49:41 +02:00
echo json_encode($response)."\n";
2019-09-14 17:38:35 +02:00
}