Chen-Gary / Chen-Gary/note-squared
Note Operations Explanation
- Dominant language
- Vue
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
# Note Operations
This document explains the note apis
All the operations here need user authentication
---
## Post operations
### Modify Notes
#### modify note: create
* http://localhost:3000/api/note/modify-note
* Function: create a note under a folder
* arguments: `mode: new`, `note fields` (you can refer to the testing documentation)
#### modify note: edit:
* http://localhost:3000/api/note/modify-note
* Function: edit fields of a certain note
* Arguments: `mode: edit`, `noteId`, `the new field values` (if no need to change, pass empty string or null)
### Modify Folders
#### Modify folder: create
* http://localhost:3000/api/note/modify-note
* Function: create a new folder
* Arguments: `mode: new`, `title`
#### Modify folder: edit
* http://localhost:3000/api/note/modify-note
* Function: edit the folder info (eg: change title), you cannot edit file here
* Arguments: `mode: edit`, `folderId`, `title`
### Delete folders / notes
* http://localhost:3000/api/note/delete-note and http://localhost:3000/api/note/delete-note
* Function: do deletion (note: if you delete a folder, all the notes under the folder will be deleted)
### Move notes
* http://localhost:3000/api/note/delete-note
* Function: move the note from one folder to another folder
* Arguments: `noteId`, `oldFolderId`, `newFolderId`
### Like notes
* http://localhost:3000/api/note/like-note
* Function: you can like a note, or cancel the like (note: each user can like a note once, you can like your own note)
* Arguments: `mode: like / dislike`, `noteId`
### Fork notes
* http://localhost:3000/api/note/like-note
* Function: copy other's note to the local folder (note: only public notes can be forked, you cannot fork your own note)
* Arguments: `noteId` (note to be forked), `folderId` (where the new note will be saved)
---
## Get operations
### get single note
* http://localhost:3000/api/note/note-get/:noteId
* Function: get note information by passing the noteId as params (note: the operation is for reading notes)
* Params: `noteId`
### Get local folders and notes
* http://localhost:3000/api/note/local-folder-notes-get
* Function: get the user's local folder list and note list
* No parameter needed
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.