From 297bbd80d905f994752e0a97934d5adbe808903d Mon Sep 17 00:00:00 2001 From: Nicole Lim Date: Wed, 6 Nov 2024 18:09:19 +0800 Subject: [PATCH] Update docs --- backend/communication-service/README.md | 10 +++++----- .../docs/{image1.png => images/postman-setup1.png} | Bin .../docs/{image2.png => images/postman-setup2.png} | Bin .../docs/{image3.png => images/postman-setup3.png} | Bin .../docs/{image4.png => images/postman-setup4.png} | Bin 5 files changed, 5 insertions(+), 5 deletions(-) rename backend/communication-service/docs/{image1.png => images/postman-setup1.png} (100%) rename backend/communication-service/docs/{image2.png => images/postman-setup2.png} (100%) rename backend/communication-service/docs/{image3.png => images/postman-setup3.png} (100%) rename backend/communication-service/docs/{image4.png => images/postman-setup4.png} (100%) diff --git a/backend/communication-service/README.md b/backend/communication-service/README.md index b0f30a74e9..c66f10c2e6 100644 --- a/backend/communication-service/README.md +++ b/backend/communication-service/README.md @@ -30,19 +30,19 @@ - Select the `Socket.IO` option and set URL to `http://localhost:3005`. Click `Connect`. - ![image1.png](./docs/image1.png) + ![image1.png](./docs/images/postman-setup1.png) - Add the following events in the `Events` tab and listen to them. - ![image2.png](./docs/image2.png) + ![image2.png](./docs/images/postman-setup2.png) - To send a message, go to the `Message` tab and ensure that your message is being parsed as `JSON`. - ![image3.png](./docs/image3.png) + ![image3.png](./docs/images/postman-setup3.png) - In the `Event name` input, input the correct event name. Click on `Send` to send a message. - ![image4.png](./docs/image4.png) + ![image4.png](./docs/images/postman-setup4.png) ## Events Available @@ -50,5 +50,5 @@ | --------------------- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | **join** | Joins a communication rooms | `roomId` (string): ID of the room.
`username` (string): Username of the user that joined. | **user_joined**: Notify the other user that a new user has joined the room. | | **send_text_message** | Sends a message to the other user | `roomId` (string): ID of the room.
`message` (string): Message to send.
`username` (string): User that sent the message.
`createdTime` (number): Time that the user sent the message. | **text_message_received**: Notify the user that a message is sent | -| **leave** | Leaves the communication room. | `roomId` (string): ID of the room to leave.
`username` (string): User that wants to leave. | **user_left**: To notify the user when one user leaves. | +| **user_disconnect** | User disconnection. | None | **user_left**: To notify the user when one user leaves. | | **disconnect** | Disconnects from the server. | None | **disconnected**: To notify the user when one user gets disconnected from the server. | diff --git a/backend/communication-service/docs/image1.png b/backend/communication-service/docs/images/postman-setup1.png similarity index 100% rename from backend/communication-service/docs/image1.png rename to backend/communication-service/docs/images/postman-setup1.png diff --git a/backend/communication-service/docs/image2.png b/backend/communication-service/docs/images/postman-setup2.png similarity index 100% rename from backend/communication-service/docs/image2.png rename to backend/communication-service/docs/images/postman-setup2.png diff --git a/backend/communication-service/docs/image3.png b/backend/communication-service/docs/images/postman-setup3.png similarity index 100% rename from backend/communication-service/docs/image3.png rename to backend/communication-service/docs/images/postman-setup3.png diff --git a/backend/communication-service/docs/image4.png b/backend/communication-service/docs/images/postman-setup4.png similarity index 100% rename from backend/communication-service/docs/image4.png rename to backend/communication-service/docs/images/postman-setup4.png