6.3 KiB
\CardApi
All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
create_card | POST /cards | Create a new Card |
delete_card | DELETE /cards/{id} | Deletes a Card by ID |
draw_done | PUT /cards/{id}/d | Draws a card item as done. |
draw_start | PATCH /users/{id}/card/start | Draws a card item as done. |
list_card | GET /cards | List Cards |
read_card | GET /cards/{id} | Find a Card by ID |
read_card_owner | GET /cards/{id}/owner | Find the attached User |
update_card | PATCH /cards/{id} | Updates a Card |
create_card
models::CardCreate create_card(create_card_request) Create a new Card
Creates a new Card and persists it to storage.
Parameters
Name | Type | Description | Required | Notes |
---|---|---|---|---|
create_card_request | CreateCardRequest | Card to create | [required] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_card
delete_card(id) Deletes a Card by ID
Deletes the Card with the requested ID.
Parameters
Name | Type | Description | Required | Notes |
---|---|---|---|---|
id | i32 | ID of the Card | [required] |
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
draw_done
draw_done(id) Draws a card item as done.
Parameters
Name | Type | Description | Required | Notes |
---|---|---|---|---|
id | i32 | [required] |
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
draw_start
draw_start(id) Draws a card item as done.
Parameters
Name | Type | Description | Required | Notes |
---|---|---|---|---|
id | i32 | [required] |
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list_card
Vecmodels::CardList list_card(page, items_per_page) List Cards
List Cards.
Parameters
Name | Type | Description | Required | Notes |
---|---|---|---|---|
page | Option<i32> | what page to render | ||
items_per_page | Option<i32> | item count to render per page |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
read_card
models::CardRead read_card(id) Find a Card by ID
Finds the Card with the requested ID and returns it.
Parameters
Name | Type | Description | Required | Notes |
---|---|---|---|---|
id | i32 | ID of the Card | [required] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
read_card_owner
models::CardOwnerRead read_card_owner(id) Find the attached User
Find the attached User of the Card with the given ID
Parameters
Name | Type | Description | Required | Notes |
---|---|---|---|---|
id | i32 | ID of the Card | [required] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_card
models::CardUpdate update_card(id, update_card_request) Updates a Card
Updates a Card and persists changes to storage.
Parameters
Name | Type | Description | Required | Notes |
---|---|---|---|---|
id | i32 | ID of the Card | [required] | |
update_card_request | UpdateCardRequest | Card properties to update | [required] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]