Adds one entry point for both JSON and MP APIs

Removes endpoints folder and moves versions to the root
JSON API folder
This commit is contained in:
Vlad
2017-05-10 18:20:32 -04:00
parent 3c7ac5488a
commit 8b13889c7a
30 changed files with 49 additions and 48 deletions

View File

@ -20,12 +20,11 @@ class API {
'v1'
);
const CURRENT_VERSION = 'v1';
const ENDPOINTS_LOCATION = 'Endpoints';
function __construct() {
foreach($this->_available_api_versions as $available_api_version) {
$this->addEndpointNamespace(
sprintf('%s\%s\%s', __NAMESPACE__, self::ENDPOINTS_LOCATION, $available_api_version),
sprintf('%s\%s', __NAMESPACE__, $available_api_version),
$available_api_version
);
}