Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * @apiDefine SuccessGet Response-Content |
| 5 | * |
| 6 | * @apiParam (GET) {String} page Page number of result. |
| 7 | * |
| 8 | * @apiSuccess (Response-Content) {String} current_page page called. |
| 9 | * @apiSuccess (Response-Content) {Array} data Array of asked data. |
| 10 | * @apiSuccess (Response-Content) {String} first_page_url first page url. |
| 11 | * @apiSuccess (Response-Content) {String} next_page_url next page url. |
| 12 | * @apiSuccess (Response-Content) {String} path Base url. |
| 13 | * @apiSuccess (Response-Content) {String} prev_page_url previous page url. |
| 14 | * @apiSuccess (Response-Content) {Integer} from first entry index. |
| 15 | * @apiSuccess (Response-Content) {Integer} per_page nb of entries by page. |
| 16 | * @apiSuccess (Response-Content) {Integer} to last entry index. |
| 17 | * |
| 18 | * |
| 19 | * |
| 20 | * @apiSuccessExample Response-Content (example): |
| 21 | * HTTP/1.1 200 OK |
| 22 | * { |
| 23 | * "current_page": "http://xxxx/xxx?page=2", |
| 24 | * "data": [...], |
| 25 | * "first_page_url": "http://xxxx/xxx?page=1", |
| 26 | * "next_page_url": "http://xxxx/xxx?page=3", |
| 27 | * "path": "http://xxxx/xxx", |
| 28 | * "prev_page_url": "http://xxxx/xxx?page=1", |
| 29 | * "from": 16, |
| 30 | * "per_page": 15, |
| 31 | * "to": 30 |
| 32 | * } |
| 33 | */ |
| 34 | |
| 35 | /** |
| 36 | * @apiDefine EntityError Error 422 |
| 37 | * |
| 38 | * @apiError (Error 422) {json} Unprocessable Entity Something wrong with parameters. |
| 39 | * |
| 40 | * @apiErrorExample {json} 422: |
| 41 | * HTTP/1.1 422 Unprocessable Entity |
| 42 | * { |
| 43 | * "error": "error description" |
| 44 | * } |
| 45 | */ |
| 46 | |
| 47 | /** |
| 48 | * @apiDefine UserId Request-Header |
| 49 | * |
| 50 | * @apiHeader (UserId) {Integer} X-Qwamplify-user-id User-id. |
| 51 | * |
| 52 | * @apiHeaderExample {json} Header (Example) : |
| 53 | * { |
| 54 | * "X-Qwamplify-user-id" : 1 |
| 55 | * } |
| 56 | */ |
| 57 | |
| 58 | /** |
| 59 | * @api {get} http://service_help/api/help-needed 1.1 Help Needed - Get list |
| 60 | * @apiVersion 1.0.0 |
| 61 | * @apiName GetAllHelpNeeded |
| 62 | * @apiGroup 1.Help |
| 63 | * @apiDescription Get all Help needed. |
| 64 | * |
| 65 | * @apiUse UserId |
| 66 | * @apiUse SuccessGet |
| 67 | * |
| 68 | */ |
| 69 | |
| 70 | /** |
| 71 | * @api {get} http://service_help/api/help-needed/{id} 1.2 Help Needed - Get one |
| 72 | * @apiVersion 1.0.0 |
| 73 | * @apiName GetOneHelpNeeded |
| 74 | * @apiGroup 1.Help |
| 75 | * @apiDescription Get One Help Needed. |
| 76 | * |
| 77 | * @apiUse UserId |
| 78 | * |
| 79 | * @apiSuccessExample Response-Data (example): |
| 80 | * HTTP/1.1 200 Ok |
| 81 | * { |
| 82 | * id: 1, |
| 83 | * user_id: 1, |
| 84 | * subject: subject of needed help, |
| 85 | * description: description of needed help, |
| 86 | * url: url, |
| 87 | * screenshot: base64 image, |
| 88 | * logs: {array of logs}, |
| 89 | * created_at: 2018-07-20 12:00:00, |
| 90 | * updated_at: 2018-07-20 12:00:00, |
| 91 | * user: { |
| 92 | * id: 2, |
| 93 | * name: admin, |
| 94 | * email: admin@advertise-me.net, |
| 95 | * email_verified_at: null, |
| 96 | * active: 1, |
| 97 | * google_id: null, |
| 98 | * data: { |
| 99 | * name: admin, |
| 100 | * email: admin@advertise-me.net |
| 101 | * }, |
| 102 | * created_at: 2019-02-12 17:08:02, |
| 103 | * updated_at: 2019-02-12 17:08:02, |
| 104 | * has_password: true |
| 105 | * } |
| 106 | * completed_by: { |
| 107 | * id: 1, |
| 108 | * name: test, |
| 109 | * email: test@advertise-me.net, |
| 110 | * email_verified_at: null, |
| 111 | * active: 1, |
| 112 | * google_id: null, |
| 113 | * data: { |
| 114 | * name: Test, |
| 115 | * email: test@advertise-me.net |
| 116 | * }, |
| 117 | * created_at: 2019-02-12 12:08:02, |
| 118 | * updated_at: 2019-02-12 12:08:02, |
| 119 | * has_password: true |
| 120 | * } |
| 121 | * } |
| 122 | * |
| 123 | */ |
| 124 | |
| 125 | /** |
| 126 | * @api {post} http://service_help/api/help-needed 1.3 Help Needed - Store |
| 127 | * @apiVersion 1.0.0 |
| 128 | * @apiName CreateHelpNeeded |
| 129 | * @apiGroup 1.Help |
| 130 | * @apiDescription Create new Help needed. |
| 131 | * |
| 132 | * @apiUse UserId |
| 133 | * |
| 134 | * @apiParam (POST) {String} subject help's subject. |
| 135 | * @apiParam (POST) {String} description help's decription. |
| 136 | * @apiParam (POST) {String} url help's url of user. |
| 137 | * @apiParam (POST) {String} screenshot help's base 64 image. |
| 138 | * @apiParam (POST) {Array} logs help's array of logs. |
| 139 | * |
| 140 | * |
| 141 | * @apiSuccessExample Response-Data (example): |
| 142 | * HTTP/1.1 201 Created |
| 143 | * { |
| 144 | * status: ok, |
| 145 | * help: 123 |
| 146 | * } |
| 147 | * |
| 148 | * @apiUse EntityError |
| 149 | */ |
| 150 | |
| 151 | /** |
| 152 | * @api {put} http://service_help/api/help-needed/{id} 1.4 Help Needed - Update |
| 153 | * @apiVersion 1.0.0 |
| 154 | * @apiName UpdateHelpNeeded |
| 155 | * @apiGroup 1.Help |
| 156 | * @apiDescription Update existing Help needed. |
| 157 | * |
| 158 | * @apiUse UserId |
| 159 | * |
| 160 | * |
| 161 | * @apiSuccessExample Response-Data (example): |
| 162 | * HTTP/1.1 200 Ok |
| 163 | * { |
| 164 | * status: ok |
| 165 | * } |
| 166 | * |
| 167 | * @apiUse EntityError |
| 168 | */ |
| 169 | |
| 170 | /** |
| 171 | * @api {delete} http://service_help/api/help-needed/{id} 1.5 Help Needed - Destroy |
| 172 | * @apiVersion 1.0.0 |
| 173 | * @apiName DestroyHelpNeeded |
| 174 | * @apiGroup 1.Help |
| 175 | * @apiDescription Remove existing Help needed. |
| 176 | * |
| 177 | * @apiUse UserId |
| 178 | * |
| 179 | * @apiSuccessExample Response-Data (example): |
| 180 | * HTTP/1.1 200 Ok |
| 181 | * { |
| 182 | * status: ok |
| 183 | * } |
| 184 | * |
| 185 | * @apiUse EntityError |
| 186 | */ |
| 187 | |
| 188 |