aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site
diff options
context:
space:
mode:
authorGravatar Amrou Bellalouna <[email protected]>2022-09-18 18:55:18 +0100
committerGravatar Amrou Bellalouna <[email protected]>2022-09-18 18:55:18 +0100
commit13ae666f0281c7dcfbbe79fdf431f28cd822ec19 (patch)
tree0032c8a52a4399cb9124968bd3476c35e3a29dfd /pydis_site
parentMerge branch 'main' into map-rules-to-keywords (diff)
update the RulesView class' docstrings
Diffstat (limited to 'pydis_site')
-rw-r--r--pydis_site/apps/api/views.py11
1 files changed, 7 insertions, 4 deletions
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