This document provides an overview of the backend API endpoints and functionality for managing users and speaker data.
-
Clone the repository:
git clone https://github.com/Narsumku/Cloud-Computing.git
-
Navigate to the project directory:
cd Cloud-Computing -
Install dependencies:
npm install
-
Start the server:
npm run start
This is Postman Documentation : https://documenter.getpostman.com/view/34625130/2sA3XTffj5
-
REGISTER
- Method: POST
- URL:
[BASE_URL]/register - Body:
{ "username": "user", "email": "user@com", "password": "123" }
-
LOGIN
- Method: POST
- URL:
[BASE_URL]/login - Body:
{ "email": "user1@example.com", "password": "password123" }
-
SUBMIT PREFERENCE
- Method: POST
- URL:
[BASE_URL]/preference/7 - Headers:
Authorization: Bearer <token>Content-Type: application/json
- Body:
{ "fields": ["Tech", "Healthcare", "Politics", "Academic"] }
-
GET RECOMMENDATIONS
- Method: GET
- URL:
[BASE_URL]/users/3 - Headers:
Authorization: Bearer <token>
-
MOST POPULAR
- Method: GET
- URL:
[BASE_URL]/popular - Headers:
Authorization: Bearer <token>
-
DETAIL USER BY ID
- Method: GET
- URL:
[BASE_URL]/users/7 - Headers:
Authorization: Bearer <token>
-
ALL USER
- Method: GET
- URL:
[BASE_URL]/users - Headers:
Authorization: Bearer <token>
-
UPDATE USER
- Method: PATCH
- URL:
[BASE_URL]/users/update/7 - Headers:
Authorization: Bearer <token>
- Body:
{ "username": "user", "email": "user@com", "password": "111" }
-
DELETE USER
- Method: DELETE
- URL:
[BASE_URL]/users/delete/7 - Headers:
Authorization: Bearer <token>
- Body:
{ "username": "user", "email": "user@com", "password": "111" }
-
DETAIL SPEAKER BY ID
- Method: GET
- URL:
[BASE_URL]/speaker/speaker_43
-
MOST FAVORITE SPEAKER
- Method: GET
- URL:
[BASE_URL]/popular
-
SEARCH SPEAKER BY FIELD
- Method: GET
- URL:
[BASE_URL]/search?keyword=aca
-
ADD FAVORITE SPEAKER
- Method: POST
- URL:
[BASE_URL]/favorites - Body:
{ "userId": "2", "speakerId": "speaker_3" }
-
GET FAVORITE SPEAKER
- Method: GET
- URL:
[BASE_URL]/favorites/2
-
DELETE FAVORITE SPEAKER
- Method: DELETE
- URL:
[BASE_URL]/favorites - Body:
{ "userId": "2", "speakerId": "speaker_3" }
-
RECOMMENDATIONS BY PREFERENCE
- Method: GET
- URL:
[BASE_URL]/recommendations/2
-
SUBMIT PREFERENCE TO GET RECOMMENDATIONS
- Method: POST
- URL:
[BASE_URL]/preference/6 - Body:
{ "fields": ["Tech", "Sport", "academic", "Politics"] }
Replace <token> with the actual JWT token obtained from the authentication process.
This collection covers various endpoints for user management, preferences, recommendations, and speaker operations within the NARSUMKU-REST API.
This project is licensed under the MIT License.
