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 *
24 * @apiSuccessExample Response-Content (example):
25 *     HTTP/1.1 200 OK
26 *     {
27 *      "first_page_url": "http://xxxx/xxx?page=2",
28 *      "from": 16,
29 *      "last_page": 4,
30 *      "last_page_url": "http://xxxx/xxx?page=4",
31 *      "next_page_url": http://xxxx/xxx?page=3,
32 *      "path": "http://david-api-digital.advertise-me.net/api/latest/user/users",
33 *      "per_page": 15,
34 *      "prev_page_url": http://xxxx/xxx?page=1,
35 *      "to": 30,
36 *      "total": 60
37 *     }
38 */
39
40/**
41 * @apiDefine EntityError Error 422
42 *
43 * @apiError (Error 422) {json} Unprocessable Entity Something wrong with parameters.
44 *
45 * @apiErrorExample {json} 422:
46 *     HTTP/1.1 422 Unprocessable Entity
47 *     {
48 *       "error": "error description"
49 *     }
50 */
51
52/**
53 * @apiDefine UserId Request-Header
54 *
55 * @apiHeader (UserId) {Integer} X-Qwamplify-user-id User-id.
56 *
57 * @apiHeaderExample {json} Header (Example) :
58 *     {
59 *           "X-Qwamplify-user-id" : 1
60 *     }
61 */
62
63/**
64 * @api {get} http://service_ocr/api/ocr Index
65 * @apiVersion 1.0.0
66 * @apiName GetAllOcrRequest
67 * @apiGroup Ocr
68 * @apiDescription Get all ocr request
69 * @apiPermission xxx
70 *
71 * @apiUse UserId
72 * @apiUse SuccessGet
73 *
74 */
75
76/**
77 * @api {get} http://service_ocr/api/ocr/{id} Show
78 * @apiVersion 1.0.0
79 * @apiName GetOneOcrRequest
80 * @apiGroup Ocr
81 * @apiDescription Get one ocr request 
82 * @apiPermission xxx
83 *
84 * @apiUse UserId
85 *
86 * @apiSuccessExample Response-Data (example):
87 *     HTTP/1.1 200 Ok
88 *     {
89 *          id: 1,
90 *          img_link: https://exemple.fr/img_test.jpg,
91 *          data_type: invoice,
92 *          response: RESPONSE EXEMPLE,
93 *          callback_url: https://callback.exemple/,
94 *          succeded: 1,
95 *          created_at: 2021-11-29 11:28:35,
96 *          updated_at: 2021-11-29 11:28:35,
97 *     }
98 *
99 */
100
101/**
102 * @api {post} http://service_ocr/api/ocr Store
103 * @apiVersion 1.0.0
104 * @apiName CreateOcrRequest
105 * @apiGroup Ocr
106 * @apiDescripti1on Create ocr request
107 * @apiPermission xxx
108 *
109 * @apiUse UserId
110 *
111 * @apiParam (POST) {String} img_link         url to a public image or image base64 encoded
112 * @apiParam (POST) {String} data_type        type of image to analyse
113 * @apiParam (POST) {String} callback_url     url to call when job finish
114 *
115 * @apiSuccessExample Response-Data (example):
116 *     HTTP/1.1 201 Created
117 *     {
118 *         status: ok,
119 *         id: 1
120 *     }
121 *
122 * @apiUse EntityError
123 */
124
125/**
126 * @api {put} http://service_ocr/api/ocr/{id} xxx
127 * @apiVersion 1.0.0
128 * @apiName xxx
129 * @apiGroup xxx
130 * @apiDescription xxx
131 * @apiPermission xxx
132 *
133 * @apiUse UserId
134 *
135 *
136 *
137 * @apiSuccessExample Response-Data (example):
138 *     HTTP/1.1 200 Ok
139 *     {
140 *         status: ok
141 *     }
142 *
143 * @apiUse EntityError
144 */
145
146/**
147 * @api {delete} http://service_ocr/api/ocr/{id} xxx
148 * @apiVersion 1.0.0
149 * @apiName xxx
150 * @apiGroup xxx
151 * @apiDescription xxx
152 * @apiPermission xxx
153 *
154 * @apiUse UserId
155 *
156 * @apiSuccessExample Response-Data (example):
157 *     HTTP/1.1 200 Ok
158 *     {
159 *         status: ok
160 *     }
161 *
162 * @apiUse EntityError
163 */
164
165/**
166 * @api {get} http://service_ocr/api/ocr/show-response/{id} ShowResponse
167 * @apiVersion 1.0.0
168 * @apiName GetResponseFromOcrRequest
169 * @apiGroup Ocr
170 * @apiDescription Get response from an ocr request
171 * @apiPermission xxx
172 *
173 * @apiUse UserId
174 *
175 * @apiSuccessExample Response-Data (example):
176 *     HTTP/1.1 200 Ok
177 *     {
178 *          status: ok,
179 *          message: SHOW RESPONSE EXEMPLE
180 *     }
181 *
182 */
183
184/**
185 * @api {post} http://service_ocr/api/ocr/eval-response/{id} EvalResponse
186 * @apiVersion 1.0.0
187 * @apiName EvalValuesWithOcrResponse
188 * @apiGroup Ocr
189 * @apiDescription Evaluate values with an ocr response
190 * @apiPermission xxx
191 *
192 * @apiUse UserId
193 *
194 * @apiSuccessExample Response-Data (example):
195 *     HTTP/1.1 200 Ok
196 *     {
197 *          status: ok,
198 *          message: {
199 *              field1: true,
200 *              field2: false
201 *          }
202 *     }
203 *
204 */