Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit e53df9c

Browse files
committed
Cloud API upload
1 parent 74bf02f commit e53df9c

File tree

115 files changed

+10663
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+10663
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
config/

api/_apidoc.js

Lines changed: 315 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,315 @@
1+
/**
2+
* @api {get} /v1/json/classifier/all GET - List all chunks
3+
* @apiVersion 1.0.0
4+
* @apiGroup List_All_Data
5+
* @apiSuccess {String} _id Unique ID of chunk
6+
* @apiSuccess {String} hid Unique HID of chunk
7+
* @apiSuccess {String} chunk chunk of data
8+
* @apiSuccess {Number} has_space Has Office Space
9+
* @apiSuccessExample {json} Success
10+
* HTTP/1.1 200 OK
11+
* X-Powered-By: Express
12+
* Access-Control-Allow-Origin: *
13+
* Access-Control-Allow-Methods: GET, POST, PUT, DELETE
14+
* Access-Control-Allow-Headers: X-Requested-With,content-type
15+
* Access-Control-Allow-Credentials: true
16+
* X-RateLimit-Limit: 35
17+
* X-RateLimit-Remaining: 34
18+
* Connection: keep-alive
19+
*
20+
* @apiErrorExample {json} List error
21+
* HTTP/1.1 500 Internal Server Error
22+
*/
23+
24+
/**
25+
* @api {post} /v1/json/classifier/all POST - List all chunks
26+
* @apiVersion 1.0.0
27+
* @apiGroup List_All_Data
28+
* @apiSuccess {String} _id Unique ID of chunk
29+
* @apiSuccess {String} hid Unique HID of chunk
30+
* @apiSuccess {String} chunk chunk of data
31+
* @apiSuccess {Number} has_space Has Office Space
32+
* @apiSuccessExample {json} Success
33+
* HTTP/1.1 200 OK
34+
* X-Powered-By: Express
35+
* Access-Control-Allow-Origin: *
36+
* Access-Control-Allow-Methods: GET, POST, PUT, DELETE
37+
* Access-Control-Allow-Headers: X-Requested-With,content-type
38+
* Access-Control-Allow-Credentials: true
39+
* X-RateLimit-Limit: 35
40+
* X-RateLimit-Remaining: 34
41+
* ETag: W/"7d98-qAuTtBOu2UgtcfuPUACrkAwUgfk"
42+
* Connection: keep-alive
43+
*
44+
*
45+
* @apiErrorExample {json} List error
46+
* HTTP/1.1 500 Internal Server Error
47+
*/
48+
49+
/**
50+
* @api {post} /v1/json/classifier/create POST - New Chunk of Data
51+
* @apiVersion 1.0.0
52+
* @apiSampleRequest off
53+
* @apiGroup Create New Chunk
54+
* @apiParamExample x-www-form-urlencoded Input
55+
* {
56+
* "hid" : "3GV1I4SEO9CX1NTBXKN9TIFKTSQ6LN",
57+
* "chunk": "Demo Chunk Data test display",
58+
* "has_space": 0,
59+
* }
60+
*
61+
* @apiSuccess {String} message Message OF success
62+
* @apiSuccess {String} _id Unique ID of chunk
63+
* @apiSuccess {String} hid Unique HID of chunk
64+
* @apiSuccess {String} chunk chunk of data
65+
* @apiSuccess {Number} has_space Has Office Space
66+
* @apiSuccessExample {json} Success
67+
* HTTP/1.1 200 OK
68+
* X-Powered-By: Express
69+
* Access-Control-Allow-Origin: *
70+
* Access-Control-Allow-Methods: GET, POST, PUT, DELETE
71+
* Access-Control-Allow-Headers: X-Requested-With,content-type
72+
* Access-Control-Allow-Credentials: true
73+
* X-RateLimit-Limit: 35
74+
* X-RateLimit-Remaining: 34
75+
* ETag: W/"7d98-qAuTtBOu2UgtcfuPUACrkAwUgfk"
76+
* Connection: keep-alive
77+
*
78+
*
79+
* @apiErrorExample {json} Chunk Create error
80+
* HTTP/1.1 400 Bad Request
81+
*/
82+
83+
/**
84+
* @api {post} /v1/json/classifier/id POST - Read Chunk by id
85+
* @apiVersion 1.0.0
86+
* @apiSampleRequest off
87+
* @apiGroup Operations using ID
88+
* @apiParamExample x-www-form-urlencoded Input
89+
* {
90+
* "id": "5a925bb92c8bcf5455832e6a"
91+
* }
92+
* @apiSuccess {String} id Unique ID of chunk
93+
* @apiSuccess {String} hid Unique HID of chunk
94+
* @apiSuccess {String} chunk chunk of data
95+
* @apiSuccess {Number} has_space Has Office Space
96+
* @apiSuccessExample {json} Success
97+
* HTTP/1.1 200 OK
98+
* X-Powered-By: Express
99+
* Access-Control-Allow-Origin: *
100+
* Access-Control-Allow-Methods: GET, POST, PUT, DELETE
101+
* Access-Control-Allow-Headers: X-Requested-With,content-type
102+
* Access-Control-Allow-Credentials: true
103+
* X-RateLimit-Limit: 35
104+
* X-RateLimit-Remaining: 34
105+
* ETag: W/"7d98-qAuTtBOu2UgtcfuPUACrkAwUgfk"
106+
* Connection: keep-alive
107+
*
108+
*
109+
* @apiErrorExample {json} Not Found or Bad Request
110+
* HTTP/1.1 400 Bad Request
111+
*/
112+
113+
/**
114+
* @api {get} /v1/json/classifier/id/:chunkId GET - Chunk by id
115+
* @apiVersion 1.0.0
116+
* @apiSampleRequest off
117+
* @apiGroup Operations using ID
118+
* @apiParam {String} id Unique id of chunk
119+
* @apiSuccess {String} id Unique ID of chunk
120+
* @apiSuccess {String} hid Unique HID of chunk
121+
* @apiSuccess {String} chunk chunk of data
122+
* @apiSuccess {Number} has_space Has Office Space
123+
* @apiSuccessExample {json} Success
124+
* HTTP/1.1 200 OK
125+
* X-Powered-By: Express
126+
* Access-Control-Allow-Origin: *
127+
* Access-Control-Allow-Methods: GET, POST, PUT, DELETE
128+
* Access-Control-Allow-Headers: X-Requested-With,content-type
129+
* Access-Control-Allow-Credentials: true
130+
* X-RateLimit-Limit: 35
131+
* X-RateLimit-Remaining: 34
132+
* ETag: W/"7d98-qAuTtBOu2UgtcfuPUACrkAwUgfk"
133+
* Connection: keep-alive
134+
*
135+
*
136+
* @apiErrorExample {json} Not Found or Bad Request
137+
* HTTP/1.1 400 Bad Request
138+
*/
139+
140+
/**
141+
* @api {put} /v1/json/classifier/id/:chunkId PUT - Update Chunk data
142+
* @apiVersion 1.0.0
143+
* @apiSampleRequest off
144+
* @apiGroup Operations using ID
145+
* @apiParam {String} id Unique Id of chunk
146+
* @apiParamExample x-www-form-urlencoded Input
147+
* {
148+
* "hid": "3GV1I4SEO9CX1NTBXKN9TIFKTSQ6LN",
149+
* "chunk": "Demo Chunk Data test display",
150+
* "has_space": 0,
151+
* }
152+
* @apiSuccess {String} _id Unique ID of chunk
153+
* @apiSuccess {String} hid Unique HID of chunk
154+
* @apiSuccess {String} chunk chunk of data
155+
* @apiSuccess {Number} has_space Has Office Space
156+
* @apiSuccessExample {json} Success
157+
* HTTP/1.1 200 OK
158+
* X-Powered-By: Express
159+
* Access-Control-Allow-Origin: *
160+
* Access-Control-Allow-Methods: GET, POST, PUT, DELETE
161+
* Access-Control-Allow-Headers: X-Requested-With,content-type
162+
* Access-Control-Allow-Credentials: true
163+
* X-RateLimit-Limit: 35
164+
* X-RateLimit-Remaining: 34
165+
* ETag: W/"7d98-qAuTtBOu2UgtcfuPUACrkAwUgfk"
166+
* Connection: keep-alive
167+
*
168+
*
169+
* @apiErrorExample {json} Not Found or Bad Request
170+
* HTTP/1.1 400 Bad Request
171+
*/
172+
173+
/**
174+
* @api {delete} /v1/json/classifier/id/:chunkId DELETE - Chunk by id
175+
* @apiVersion 1.0.0
176+
* @apiSampleRequest off
177+
* @apiGroup Operations using ID
178+
* @apiParam {String} id Unique HID of chunk
179+
*
180+
* @apiSuccess {String} message Message of delete successfull
181+
* @apiSuccess {String} data.n Number of chunk deleted
182+
* @apiSuccess {String} data.ok Is Delete Request run successfully on Database
183+
* @apiSuccessExample {json} Success
184+
* HTTP/1.1 200 OK
185+
* X-Powered-By: Express
186+
* Access-Control-Allow-Origin: *
187+
* Access-Control-Allow-Methods: GET, POST, PUT, DELETE
188+
* Access-Control-Allow-Headers: X-Requested-With,content-type
189+
* Access-Control-Allow-Credentials: true
190+
* X-RateLimit-Limit: 35
191+
* X-RateLimit-Remaining: 34
192+
* ETag: W/"7d98-qAuTtBOu2UgtcfuPUACrkAwUgfk"
193+
* Connection: keep-alive
194+
*
195+
*
196+
* @apiErrorExample {json} Not Found or Bad Request
197+
* HTTP/1.1 400 Bad Request
198+
*/
199+
200+
/**
201+
* @api {post} /v1/json/classifier/hid POST - Read Chunk by hid
202+
* @apiVersion 1.0.0
203+
* @apiSampleRequest off
204+
* @apiGroup Operations using HID
205+
* @apiParamExample x-www-form-urlencoded Input
206+
* {
207+
* "hid": "3GV1I4SEO9CX1NTBXKN9TIFKTSQ6LN"
208+
* }
209+
* @apiSuccess {String} _id Unique ID of chunk
210+
* @apiSuccess {String} hid Unique HID of chunk
211+
* @apiSuccess {String} chunk chunk of data
212+
* @apiSuccess {Number} has_space Has Office Space
213+
* @apiSuccessExample {json} Success
214+
* HTTP/1.1 200 OK
215+
* X-Powered-By: Express
216+
* Access-Control-Allow-Origin: *
217+
* Access-Control-Allow-Methods: GET, POST, PUT, DELETE
218+
* Access-Control-Allow-Headers: X-Requested-With,content-type
219+
* Access-Control-Allow-Credentials: true
220+
* X-RateLimit-Limit: 35
221+
* X-RateLimit-Remaining: 34
222+
* ETag: W/"7d98-qAuTtBOu2UgtcfuPUACrkAwUgfk"
223+
* Connection: keep-alive
224+
*
225+
*
226+
* @apiErrorExample {json} Not Found or Bad Request
227+
* HTTP/1.1 400 Bad Request
228+
*/
229+
230+
/**
231+
* @api {get} /v1/json/classifier/hid/:chunkHid GET - Chunk by hid
232+
* @apiVersion 1.0.0
233+
* @apiSampleRequest off
234+
* @apiGroup Operations using HID
235+
* @apiParam {String} hid Unique HID of chunk
236+
* @apiSuccess {String} _id Unique ID of chunk
237+
* @apiSuccess {String} hid Unique HID of chunk
238+
* @apiSuccess {String} chunk chunk of data
239+
* @apiSuccess {Number} has_space Has Office Space
240+
* @apiSuccessExample {json} Success
241+
* HTTP/1.1 200 OK
242+
* X-Powered-By: Express
243+
* Access-Control-Allow-Origin: *
244+
* Access-Control-Allow-Methods: GET, POST, PUT, DELETE
245+
* Access-Control-Allow-Headers: X-Requested-With,content-type
246+
* Access-Control-Allow-Credentials: true
247+
* X-RateLimit-Limit: 35
248+
* X-RateLimit-Remaining: 34
249+
* ETag: W/"7d98-qAuTtBOu2UgtcfuPUACrkAwUgfk"
250+
* Connection: keep-alive
251+
*
252+
*
253+
* @apiErrorExample {json} Not Found or Bad Request
254+
* HTTP/1.1 400 Bad Request
255+
*/
256+
257+
/**
258+
* @api {put} /v1/json/classifier/hid/:chunkHid PUT - Update Chunk data
259+
* @apiVersion 1.0.0
260+
* @apiSampleRequest off
261+
* @apiGroup Operations using HID
262+
* @apiParam {String} hid Unique HID of chunk
263+
* @apiParamExample x-www-form-urlencoded Input
264+
* {
265+
* "hid": "3GV1I4SEO9CX1NTBXKN9TIFKTSQ6LN",
266+
* "chunk": "Demo Chunk Data test display",
267+
* "has_space": 0,
268+
* }
269+
* @apiSuccess {String} _id Unique ID of chunk
270+
* @apiSuccess {String} hid Unique HID of chunk
271+
* @apiSuccess {String} chunk chunk of data
272+
* @apiSuccess {Number} has_space Has Office Space
273+
* @apiSuccessExample {json} Success
274+
* HTTP/1.1 200 OK
275+
* X-Powered-By: Express
276+
* Access-Control-Allow-Origin: *
277+
* Access-Control-Allow-Methods: GET, POST, PUT, DELETE
278+
* Access-Control-Allow-Headers: X-Requested-With,content-type
279+
* Access-Control-Allow-Credentials: true
280+
* X-RateLimit-Limit: 35
281+
* X-RateLimit-Remaining: 34
282+
* ETag: W/"7d98-qAuTtBOu2UgtcfuPUACrkAwUgfk"
283+
* Connection: keep-alive
284+
*
285+
*
286+
* @apiErrorExample {json} Not Found or Bad Request
287+
* HTTP/1.1 400 Bad Request
288+
*/
289+
290+
/**
291+
* @api {delete} /v1/json/classifier/hid/:chunkHid DELETE - Chunk by hid
292+
* @apiVersion 1.0.0
293+
* @apiSampleRequest off
294+
* @apiGroup Operations using HID
295+
* @apiParam {String} hid Unique HID of chunk
296+
*
297+
* @apiSuccess {String} message Message of delete successfull
298+
* @apiSuccess {String} data.n Number of chunk deleted
299+
* @apiSuccess {String} data.ok Is Delete Request run successfully on Database
300+
* @apiSuccessExample {json} Success
301+
* HTTP/1.1 200 OK
302+
* X-Powered-By: Express
303+
* Access-Control-Allow-Origin: *
304+
* Access-Control-Allow-Methods: GET, POST, PUT, DELETE
305+
* Access-Control-Allow-Headers: X-Requested-With,content-type
306+
* Access-Control-Allow-Credentials: true
307+
* X-RateLimit-Limit: 35
308+
* X-RateLimit-Remaining: 34
309+
* ETag: W/"7d98-qAuTtBOu2UgtcfuPUACrkAwUgfk"
310+
* Connection: keep-alive
311+
*
312+
*
313+
* @apiErrorExample {json} Not Found or Bad Request
314+
* HTTP/1.1 400 Bad Request
315+
*/

0 commit comments

Comments
 (0)