Skip to content

Get all room endpoint

Alvin Cheng edited this page Apr 23, 2023 · 2 revisions

Description

This is the get-all room endpoint is an endpoint in which a user is inputted, and all the rooms that the user belongs in will be returned. The source of the endpoint can be found at /src/endpoints/getAllRooms.ts. Furthermore, the endpoint will return a status of '200' on success, '401' on invalid API key or '500' on server internal error. As I mentioned above, the 'user' argument is the user to search up.

Example

fetch("http://<URL>/api/get-rooms?key=<YOUR_API_KEY>&user=<USER>")
  .then((res) => {
    console.log(res);
  })
  .catch((err) => {
    console.error(err);
  });
Clone this wiki locally