0% found this document useful (0 votes)
5 views1 page

Project Goal: Chat Server Administration API

Uploaded by

haniflgnd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Project Goal: Chat Server Administration API

Uploaded by

haniflgnd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Full Stack Django DRF and React Chat Application

Project Goal
To create a chat service that provides a seamless communication experience for users, with
real-time messaging, high-quality voice chat, and powerful server management tools. The
service should be secure, scalable, and accessible to users on multiple platforms. Our goal
is to create a chat service that offers a fun and engaging community space for users to
connect, share, and collaborate with others.

Chat Server Administration API


Specifications

The goal of these specifications is to define the behaviour and functionality of a viewset,
which is responsible for retrieving a list of servers based on various query parameters. By
following these specifications, the resulting viewset should be able to retrieve and return a
list of servers that meet the specified criteria, and raise appropriate errors if any parameters
are invalid or if the user is not authenticated. The resulting list of servers should also be
properly serialised using the ServerSerializer, with the context including the 'number of
members' field if requested. Overall, the goal is to create a functional and reliable viewset
that provides a useful and customizable way for users to retrieve a list of servers in the
system.

Summary of the specifications for the ServerListViewSet:

The ServerListViewSet viewset is responsible for retrieving a list of servers.


The viewset supports the following query parameters: qty (int), category (str), by_user
(bool), with_num_members (bool), all_channels (bool), by_serverid (int).
If the 'by_user' parameter is true, and the user is not authenticated, an
AuthenticationFailed error should be raised.
If the 'category' parameter is specified, the queryset should be filtered to only include
servers with the specified category.
If the 'by_user' parameter is true, the queryset should be filtered to only include
servers where the current user is a member.
If the 'qty' parameter is specified, the queryset should be limited to the specified
number of servers.
If the 'with_num_members' parameter is true, the number of members in each server
should be annotated in the queryset.
If the 'all_channels' parameter is true, and a 'server_id' parameter is specified, the
queryset should be filtered to only include channels from the specified server.
If the 'by_serverid' parameter is specified, the queryset should be filtered to only
include the server with the specified id.
If the 'by_serverid' parameter is specified, and the specified id is invalid or does not
exist, a ValidationError should be raised.
The resulting list of servers should be serialised using the ServerSerializer, with the
context including the 'num_members' field if 'with_num_members' is true.
The serialised list of servers should be returned as the response.

You might also like