Skip to content

Commit 2ec2b42

Browse files
[add] routs description related to comments and votes
1 parent 312d02d commit 2ec2b42

File tree

9 files changed

+243
-21
lines changed

9 files changed

+243
-21
lines changed

docs/api/api_overview.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,20 @@ new kanban.Toolbar("#toolbar", {
197197
| [](api/provider/rest_routes/get_routes/js_kanban_get_users_route.md)| @getshort(api/provider/rest_routes/get_routes/js_kanban_get_users_route.md) |
198198
| [](api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md)| @getshort(api/provider/rest_routes/get_routes/js_kanban_get_uploads_route.md) |
199199
| [](api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md)| @getshort(api/provider/rest_routes/post_routes/js_kanban_post_cards_route.md) |
200+
| [](api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md)| @getshort(api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route.md) |
201+
| [](api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md)| @getshort(api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route.md) |
200202
| [](api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md)| @getshort(api/provider/rest_routes/post_routes/js_kanban_post_columns_route.md) |
201203
| [](api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md)| @getshort(api/provider/rest_routes/post_routes/js_kanban_post_rows_route.md) |
202204
| [](api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md)| @getshort(api/provider/rest_routes/post_routes/js_kanban_post_uploads_route.md) |
203205
| [](api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md)| @getshort(api/provider/rest_routes/put_routes/js_kanban_put_cards_route.md) |
206+
| [](api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md)| @getshort(api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route.md) |
207+
| [](api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md)| @getshort(api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route.md) |
204208
| [](api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md)| @getshort(api/provider/rest_routes/put_routes/js_kanban_put_columns_route.md) |
205209
| [](api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md)| @getshort(api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route.md) |
206210
| [](api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md)| @getshort(api/provider/rest_routes/put_routes/js_kanban_put_rows_route.md) |
207211
| [](api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md)| @getshort(api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route.md) |
208212
| [](api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md)| @getshort(api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md) |
213+
| [](api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md)| @getshort(api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route.md) |
214+
| [](api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md)| @getshort(api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route.md) |
209215
| [](api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md)| @getshort(api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route.md) |
210216
| [](api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md)| @getshort(api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route.md) |
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
sidebar_label: DELETE /cards/{id}/comments/{id}
3+
title: DELETE /cards/{cardId}/comments/{commentId}
4+
description: You can learn about the DELETE /cards/{cardId}/comments/{commentId} REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban.
5+
---
6+
7+
# DELETE /cards/{cardId}/comments/{cardId}
8+
9+
### Description
10+
11+
@short: Removes a comment from a card
12+
13+
The route handles the **HTTP DELETE** request made to the **'cards/{cardId}/comments/{cardId}'** path.
14+
15+
### Query parameters
16+
17+
The query parameter is sent in the request line:
18+
19+
| Name | Type | Description |
20+
| ----------- | ----------- | ----------- |
21+
| `cardId` | number | *Required*. The ID of the card, from which the comment will be deleted. |
22+
| `commentId` | number | *Required*. The ID of the comment to be removed. |
23+
24+
### Payload
25+
26+
No payload is required.
27+
28+
### Response
29+
30+
The server returns a json object with a card ID.
31+
32+
Example:
33+
34+
~~~json
35+
{
36+
"id": 4
37+
}
38+
~~~
39+
40+
The HTTP status code shows whether the request succeeds (response.status == 200) or fails (response.status == 500).
41+
42+
---
43+
44+
**Related articles**: [Working with server](guides/working_with_server.md)

docs/api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ The route handles the **HTTP DELETE** request made to the **'/cards/{id}'** path
1717
The next parameter is sent in the request line:
1818

1919
| Name | Type | Description |
20-
| ----------- | ----------- | ----------- |
21-
| `id` | number | *Required*. The ID of the card to be deleted.|
20+
| ---------- | ----------- | ----------- |
21+
| `id` | number | *Required*. The ID of the card to be deleted.|
2222

2323
### Payload
2424

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
sidebar_label: DELETE /cards/{id}/vote
3+
title: DELETE /cards/{cardId}/vote
4+
description: You can learn about the DELETE /cards/{cardId}/vote REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban.
5+
---
6+
7+
# DELETE /cards/{cardId}/vote
8+
9+
### Description
10+
11+
@short: Removes a vote from a card
12+
13+
The route handles the **HTTP DELETE** request made to the **'/cards/{cardId}/vote'** path.
14+
15+
### Query parameters
16+
17+
The next parameter is sent in the request line:
18+
19+
| Name | Type | Description |
20+
| ---------- | ----------- | ----------- |
21+
| `cardId` | number | *Required*. The ID of the card, from which the vote will be removed.|
22+
23+
### Payload
24+
25+
No payload is required.
26+
27+
### Response
28+
29+
No data is returned back. The HTTP status code shows whether the request succeeds (response.status == 200) or fails (response.status == 500).
30+
31+
---
32+
33+
**Related articles**: [Working with server](guides/working_with_server.md)
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
sidebar_label: POST /cards/{id}/comments
3+
title: POST /cards/{cardId}/comments
4+
description: You can learn about the POST /cards/{cardId}/comments REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban.
5+
---
6+
7+
# POST /cards/{cardId}/comments
8+
9+
### Description
10+
11+
@short: Adds a new comment(s) to the card and returns a json object with the card ID
12+
13+
The route handles the **HTTP POST** request made to the **'/cards/{cardId}/comments'** path.
14+
15+
### Payload
16+
17+
The server expects to receive a json object with the next properties:
18+
19+
| Name | Type | Description |
20+
| ----------- | ----------- | ----------- |
21+
| `text` | number | *Required*. The comment's text.|
22+
| `date` | object | *Required*. The comment's date.|
23+
24+
Example:
25+
26+
~~~json
27+
{
28+
"text": "The comment content",
29+
"date": "2023-05-18T09:13:56.656Z",
30+
}
31+
~~~
32+
33+
### Response
34+
35+
The route returns a json object with a card ID, to which the new comment(s) will be added to.
36+
37+
Example:
38+
39+
~~~json
40+
{
41+
"id": 1
42+
}
43+
~~~
44+
45+
The HTTP status code shows whether the request succeeds (response.status == 200) or fails (response.status == 500).
46+
47+
---
48+
49+
**Related articles**: [Working with server](guides/working_with_server.md)
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
sidebar_label: POST /cards/{id}/vote
3+
title: POST /cards/{cardId}/vote
4+
description: You can learn about the POST /cards/{cardId}/vote REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban.
5+
---
6+
7+
# POST /cards/{cardId}/vote
8+
9+
### Description
10+
11+
@short: Adds a new vote to the card and returns a json object with the card ID
12+
13+
The route handles the **HTTP POST** request made to the **'/cards/{cardId}/vote'** path.
14+
15+
### Payload
16+
17+
No payload is required.
18+
19+
### Response
20+
21+
The route returns a json object with a card ID, to which the vote will be added to.
22+
23+
Example:
24+
25+
~~~json
26+
{
27+
"id": 1
28+
}
29+
~~~
30+
31+
The HTTP status code shows whether the request succeeds (response.status == 200) or fails (response.status == 500).
32+
33+
---
34+
35+
**Related articles**: [Working with server](guides/working_with_server.md)
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
sidebar_label: PUT /cards/{id}/comments/{id}
3+
title: PUT /cards/{cardId}/comments/{commentId}
4+
description: You can learn about the PUT /cards/{cardId}/comments/{cardId} REST route in the documentation of the DHTMLX JavaScript Kanban library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Kanban.
5+
---
6+
7+
# PUT /cards/{cardId}/comments/{cardId}
8+
9+
### Description
10+
11+
@short: Updates a comment in a card and returns a json object with the card ID
12+
13+
The route handles the **HTTP PUT** request made to the **'cards/{cardId}/comments/{cardId}'** path.
14+
15+
### Query parameters
16+
17+
The query parameter is sent in the request line:
18+
19+
| Name | Type | Description |
20+
| ----------- | ----------- | ----------- |
21+
| `cardId` | number | *Required*. The ID of the card, which comment is updated. |
22+
| `commentId` | number | *Required*. The ID of the comment to be updated. |
23+
24+
### Payload
25+
26+
The server expects to receive a json object with the next properties:
27+
28+
| Name | Type | Description |
29+
| ----------- | ----------- | ----------- |
30+
| `text` | number | *Required*. The comment's text.|
31+
| `date` | object | *Required*. The comment's date.|
32+
33+
Example:
34+
35+
~~~json
36+
{
37+
"text": "The comment's content",
38+
"date": "2023-05-18T09:13:56.656Z",
39+
}
40+
~~~
41+
42+
### Response
43+
44+
The server returns a json object with a card ID.
45+
46+
Example:
47+
48+
~~~json
49+
{
50+
"id": 4
51+
}
52+
~~~
53+
54+
The HTTP status code shows whether the request succeeds (response.status == 200) or fails (response.status == 500).
55+
56+
---
57+
58+
**Related articles**: [Working with server](guides/working_with_server.md)

docs/guides/working_with_server.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,18 @@ JavaScript Kanban has the **RestDataProvider** service that completely supports
1818

1919
- ***"add-card"***
2020
- ***"add-column"***
21+
- ***"add-comment"***
2122
- ***"add-row"***
2223
- ***"delete-card"***
2324
- ***"delete-column"***
25+
- ***"delete-comment"***
2426
- ***"delete-row"***
2527
- ***"move-card"***
2628
- ***"move-column"***
2729
- ***"move-row"***
2830
- ***"update-card"***
2931
- ***"update-column"***
32+
- ***"update-comment"***
3033
- ***"update-row"***
3134

3235
## REST methods

sidebars.js

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,6 @@ module.exports = {
282282
]
283283
},
284284
// RestDataProvider api
285-
286285
{
287286
type: "category",
288287
label: "RestDataProvider API",
@@ -322,7 +321,6 @@ module.exports = {
322321
id: "api/overview/rest_routes_overview"
323322

324323
},
325-
326324
items: [
327325
{
328326
type: "category",
@@ -331,8 +329,8 @@ module.exports = {
331329
link: {
332330
type: 'generated-index',
333331
title: "GET routes",
334-
keywords: ['routes'],
335-
image: '/img/docusaurus.png'
332+
keywords: ['routes'],
333+
image: '/img/docusaurus.png'
336334
},
337335
items: [
338336
"api/provider/rest_routes/get_routes/js_kanban_get_cards_route",
@@ -341,7 +339,6 @@ module.exports = {
341339
"api/provider/rest_routes/get_routes/js_kanban_get_users_route",
342340
"api/provider/rest_routes/get_routes/js_kanban_get_uploads_route",
343341
]
344-
345342
},
346343
{
347344
type: "category",
@@ -350,17 +347,17 @@ module.exports = {
350347
link: {
351348
type: 'generated-index',
352349
title: "POST routes",
353-
keywords: ['routes'],
354-
image: '/img/docusaurus.png'
350+
keywords: ['routes'],
351+
image: '/img/docusaurus.png'
355352
},
356353
items: [
357354
"api/provider/rest_routes/post_routes/js_kanban_post_cards_route",
355+
"api/provider/rest_routes/post_routes/js_kanban_post_cards_comments_route",
356+
"api/provider/rest_routes/post_routes/js_kanban_post_cards_votes_route",
358357
"api/provider/rest_routes/post_routes/js_kanban_post_rows_route",
359358
"api/provider/rest_routes/post_routes/js_kanban_post_columns_route",
360359
"api/provider/rest_routes/post_routes/js_kanban_post_uploads_route",
361-
362360
]
363-
364361
},
365362
{
366363
type: "category",
@@ -369,41 +366,38 @@ module.exports = {
369366
link: {
370367
type: 'generated-index',
371368
title: "PUT routes",
372-
keywords: ['routes'],
373-
image: '/img/docusaurus.png'
369+
keywords: ['routes'],
370+
image: '/img/docusaurus.png'
374371
},
375372
items: [
376373
"api/provider/rest_routes/put_routes/js_kanban_put_cards_route",
377374
"api/provider/rest_routes/put_routes/js_kanban_put_cards_move_route",
375+
"api/provider/rest_routes/put_routes/js_kanban_put_cards_comments_route",
378376
"api/provider/rest_routes/put_routes/js_kanban_put_rows_route",
379377
"api/provider/rest_routes/put_routes/js_kanban_put_rows_move_route",
380378
"api/provider/rest_routes/put_routes/js_kanban_put_columns_route",
381379
"api/provider/rest_routes/put_routes/js_kanban_put_columns_move_route",
382-
383380
]
384-
385381
},
386-
387382
{
388383
type: "category",
389384
label: "DELETE routes",
390385
collapsed: true,
391386
link: {
392387
type: 'generated-index',
393388
title: "DELETE routes",
394-
keywords: ['routes'],
395-
image: '/img/docusaurus.png'
389+
keywords: ['routes'],
390+
image: '/img/docusaurus.png'
396391
},
397392
items: [
398393
"api/provider/rest_routes/delete_routes/js_kanban_delete_cards_route",
394+
"api/provider/rest_routes/delete_routes/js_kanban_delete_cards_comments_route",
395+
"api/provider/rest_routes/delete_routes/js_kanban_delete_cards_votes_route",
399396
"api/provider/rest_routes/delete_routes/js_kanban_delete_rows_route",
400397
"api/provider/rest_routes/delete_routes/js_kanban_delete_columns_route",
401-
402398
]
403-
404399
}
405400
]
406-
407401
}
408402
]
409403
},

0 commit comments

Comments
 (0)