a note taking app that hold the imp or read later articles or notes
Post /api/v1/signup
{
"username":"krisn",
"password":"123123"
}
Constrainst -
-
username should be 3-10 lettes.
-
password should e 8 to 20 letter, should have atlest one uppercase, one lowercase. on special character, one number .
Responses
- Status 200 - Sign up
- Status 422 - Error in inputs
- Status 403 - User already exists with this username
- Status 500 - Server error
POST /api/v1/signin
{
"username":"krisn",
"password:"1232112"
}
Returns 200
{
"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NTc1MjY5NDAsInVzZXJJZCI6IjM0ZDYxZWJjLTcxODYtNGExOS1hMzcyLWQwZGQ3ZDU3NzE3YiJ9.t7b-kzkpZQokyxFEAToam0g5XW-njmCL9jH1D1K2TV0"
}
403 - Wrong email password 500 - Internal server error
Note: only auth person add
POST /api/v1/content
{
"type":"document" | "tweet" | "youtube" | "link",
"link":"url",
"title":"Title of dc/video",
"tags":["productivity", "politics",...]
}
Return 200
GET /api/v1/content
Returns
{
"content": [
{
"id": 1,
"type": "document" | "tweet" | "youtube" | "link",
"link": "url",
"title": "Title of doc/video",
"tags": ["productivity", "politics", ...]
}
]
}
GET /api/v1/content/:query
return
{
"ai_response":"string",
"original_content:" "content": [
{
"id": 1,
"type": "document" | "tweet" | "youtube" | "link",
"link": "url",
"title": "Title of doc/video",
"tags": ["productivity", "politics", ...]
}
]"
}
DELETE /api/v1/content
{
"contentId": "1"
}
Returns
- 200 - Delete suceeded
- 403 - Trying to delete a doc you don't own