From 4d75b397665e0ca651f68fbd206467b4ecda4200 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Thu, 26 Nov 2015 23:07:18 -0500 Subject: [PATCH] Fix category endpoint, start work on apiDoc --- api/category/index.php | 4 ++-- api/status/index.php | 53 ++++++++++++++++++++++++++++++++++++++++++ apidoc.json | 7 ++++++ 3 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 apidoc.json diff --git a/api/category/index.php b/api/category/index.php index d759c659..a3f498ef 100644 --- a/api/category/index.php +++ b/api/category/index.php @@ -1,6 +1,6 @@ + * `yes`: Both customers/staff,
+ * `conly`: Only customers,
+ * `sonly`: Only staff,
+ * `no`: No one + * @apiSuccess {String} key The language key. This is deprecated and should not be used. + * @apiSuccess {Object[]} keys The language strings for each language + * @apiSuccess {String} keys.language The language for the status name + * @apiSuccess {String} keys.text The translated string of the status + * + * @apiSuccessExample {json} Success-Response: + * { + * "id": 0, + * "textColor": "#FF0000", + * "isNewTicketStatus": true, + * "isClosed": false, + * "isClosedByClient": false, + * "isCustomerReplyStatus": false, + * "isStaffClosedOption": false, + * "isStaffReopenedStatus": false, + * "isDefaultStaffReplyStatus": false, + * "lockedTicketStatus": false, + * "isAutocloseOption": false, + * "closable": "yes", + * "key": null, + * "keys": [ + * { + * "language": "English", + * "text": "New" + * }, + * { + * "language": "EspaƱol", + * "text": "Nuevo" + * } + * ] + * } + */ if ($request_method == 'GET') { if (isset($_GET['id'])) { $results = get_status($hesk_settings, $_GET['id']); diff --git a/apidoc.json b/apidoc.json new file mode 100644 index 00000000..083e8d79 --- /dev/null +++ b/apidoc.json @@ -0,0 +1,7 @@ +{ + "name": "Mods for HESK API", + "version": "0.0.1", + "description": "Mods for HESK API", + "title": "Mods for HESK API", + "url": "https://mods-for-hesk.mkochcs.com/" +}