aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps
diff options
context:
space:
mode:
authorGravatar Boris Muratov <[email protected]>2021-03-12 15:35:47 +0200
committerGravatar Boris Muratov <[email protected]>2021-03-12 15:35:47 +0200
commitf4a67489b81f95978912582189cb23afb2169e8e (patch)
treeaa0c8d7a86d66899b657b05467d0945e73df26af /pydis_site/apps
parentMerge branch 'master' into mbaruh/channel-activity (diff)
Document endpoint in viewset docstring
Diffstat (limited to 'pydis_site/apps')
-rw-r--r--pydis_site/apps/api/viewsets/bot/user.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/pydis_site/apps/api/viewsets/bot/user.py b/pydis_site/apps/api/viewsets/bot/user.py
index 5e1f8775..25722f5a 100644
--- a/pydis_site/apps/api/viewsets/bot/user.py
+++ b/pydis_site/apps/api/viewsets/bot/user.py
@@ -119,6 +119,22 @@ class UserViewSet(ModelViewSet):
- 200: returned on success
- 404: if a user with the given `snowflake` could not be found
+ ### GET /bot/users/<snowflake:int>/metricity_review_data
+ Gets metricity data for a single user's review by ID.
+
+ #### Response format
+ >>> {
+ ... 'joined_at': '2020-08-26T08:09:43.507000',
+ ... 'top_channel_activity': [['off-topic', 15],
+ ... ['talent-pool', 4],
+ ... ['defcon', 2]],
+ ... 'total_messages': 22
+ ... }
+
+ #### Status codes
+ - 200: returned on success
+ - 404: if a user with the given `snowflake` could not be found
+
### POST /bot/users
Adds a single or multiple new users.
The roles attached to the user(s) must be roles known by the site.