I can't seem to figure this one out.
The class:
class Assets {
function getOne($id) {
$asset = DBO_Asset::getOneByPublicId($id);
return $asset->id;
}
}
The index.php:
require_once 'restler/restler.php';
require_once 'API/Assets.php';
$rest = new Restler();
$rest->addAPIClass("Assets");
$rest->handle();
The URL:
http://localhost/api/index.php/assets/getOne/8TWVTZAU
The result:
{
"error": {
"code": 404,
"message": "Not Found"
}
}
I have no idea why this is creating a 404, but I followed the instructions, and I am still not getting anywhere. Can someone please help me figure this out?