From cf0cbaf75c025c9f05e24372f69ea12b038990d5 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Fri, 8 Jul 2016 21:17:06 +0200 Subject: [PATCH] Added template content for API resource controllers. --- .../controllers/api/v1/Appointments.php | 54 ++++++++++++++++--- 1 file changed, 48 insertions(+), 6 deletions(-) diff --git a/src/application/controllers/api/v1/Appointments.php b/src/application/controllers/api/v1/Appointments.php index ffa6a3b2..9a584c3a 100644 --- a/src/application/controllers/api/v1/Appointments.php +++ b/src/application/controllers/api/v1/Appointments.php @@ -11,20 +11,62 @@ * @since v1.2.0 * ---------------------------------------------------------------------------- */ +require_once __DIR__ . '/API_V1_Controller.php'; + /** * Appointments Controller * * @package Controllers - * @subpackage API + * @subpackage API */ -class Appointments extends CI_Controller { - - public function get($id = null) { - echo 'hello ' . $id; +class Appointments extends API_V1_Controller { + /** + * Class Constructor + */ + public function __construct() { + parent::__construct(); } + /** + * GET API Method + * + * @param int $id Optional (null), the record ID to be returned. + * + * @return \Engine\Api\V1\Response Returns data response. + */ + public function get($id = null) { + + } + + /** + * POST API Method + * + * @return @return \Engine\Api\V1\Response Returns data response. + */ public function post() { - echo 'post'; + + } + + /** + * PUT API Method + * + * @param int $id The record ID to be updated. + * + * @return @return \Engine\Api\V1\Response Returns data response. + */ + public function put($id) { + + } + + /** + * DELETE API Method + * + * @param int $id The record ID to be deleted. + * + * @return @return \Engine\Api\V1\Response Returns data response. + */ + public function delete($id) { + } }