From 13ae666f0281c7dcfbbe79fdf431f28cd822ec19 Mon Sep 17 00:00:00 2001 From: Amrou Bellalouna Date: Sun, 18 Sep 2022 18:55:18 +0100 Subject: update the RulesView class' docstrings --- pydis_site/apps/api/views.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'pydis_site') diff --git a/pydis_site/apps/api/views.py b/pydis_site/apps/api/views.py index f76a78ff..3cb7e8bd 100644 --- a/pydis_site/apps/api/views.py +++ b/pydis_site/apps/api/views.py @@ -37,12 +37,15 @@ class RulesView(APIView): ## Routes ### GET /rules - Returns a JSON array containing the server's rules: + Returns a JSON array containing the server's rules + coupled with a list of keywords that will be used + when searching for particular rules upon using the + bot's `!rule` command >>> [ - ... "Eat candy.", - ... "Wake up at 4 AM.", - ... "Take your medicine." + ... ("Eat candy.", ["candy", "sweet"]), + ... ("Wake up at 4 AM.", ["wake_up", "early", "early_bird"]), + ... ("Take your medicine.", ["medicine", "health"]) ... ] Since some of the the rules require links, this view -- cgit v1.2.3