-
Users
-
Register
Route : /users/register (POST)
Body :
Field Type Required Notes email string yes unique password string yes minimal panjang 6 karakter username string yes unique age number yes umur harus diatas 8 -
Login
Route : /users/login (POST)
Body :
Field Type Required Notes email string yes unique password string yes minimal panjang 6 karakter -
Update User
Route : /users/:userId (PUT)
Header : Authorization (Bearer token)
Body :
Field Type Required Notes email string yes unique username string yes unique -
Delete User
Route : /users (DELETE)
Header : Authorization (Bearer token)
-
-
Photos
-
Get All Photos
Route : /photos (GET)Header : Authorization (Bearer token)
-
Get Photo By User ID
Route : /photos/:photoId (GET)Header : Authorization (Bearer token)
-
Create Photo
Route : /photos (POST)
Header : Authorization (Bearer token)
Body :
Field Type Required Notes title string yes photo_url string yes caption string no -
Update Photo
Route : /photos/:photoId (PUT)
Header : Authorization (Bearer token)
Body :
Field Type Required Notes title string yes photo_url string yes caption string no -
Delete Photo
Route : /photos/:photoId (DELETE)Header : Authorization (Bearer token)
-
-
Comments
-
Get All Comments
Route : /comments/all (GET)Header : Authorization (Bearer token)
-
Get Comment By User
Route : /comments (GET)Header : Authorization (Bearer token)
-
Create Comment
Route : /comments (POST)
Header : Authorization (Bearer token)
Body :
Field Type Required Notes message string yes photo_id number yes -
Update Comment
Route : /comments/:commentId (PUT)
Header : Authorization (Bearer token)
Body :
Field Type Required Notes message string yes -
Delete Comment
Route : /comments/:commentId (DELETE)Header : Authorization (Bearer token)
Social Media
-
Get All Social Media
Route : /socialmedias/all (GET)Header : Authorization (Bearer token)
-
Get Social Media By User
Route : /socialmedias (GET)Header : Authorization (Bearer token)
-
Create Comment
Route : /socialmedias (POST)
Header : Authorization (Bearer token)
Body :
Field Type Required Notes name string yes social_media_url string yes -
Update Comment
Route : /socialmedias/:socialMediaId (PUT)
Header : Authorization (Bearer token)
Body :
Field Type Required Notes name string yes social_media_url string yes -
Delete Social Medias
Route : /socialmedias/:socialMediaId (DELETE)Header : Authorization (Bearer token)
-