diff options
author | 2022-09-18 18:55:18 +0100 | |
---|---|---|
committer | 2022-09-18 18:55:18 +0100 | |
commit | 13ae666f0281c7dcfbbe79fdf431f28cd822ec19 (patch) | |
tree | 0032c8a52a4399cb9124968bd3476c35e3a29dfd | |
parent | Merge branch 'main' into map-rules-to-keywords (diff) |
update the RulesView class' docstrings
-rw-r--r-- | pydis_site/apps/api/views.py | 11 |
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 |