From 1e72079691fb1acf61390edad496736d332362ca Mon Sep 17 00:00:00 2001 From: kosayoda Date: Thu, 16 Jul 2020 10:39:23 +0800 Subject: Document mentions in ReminderViewSet --- pydis_site/apps/api/viewsets/bot/reminder.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pydis_site/apps/api/viewsets') diff --git a/pydis_site/apps/api/viewsets/bot/reminder.py b/pydis_site/apps/api/viewsets/bot/reminder.py index 147f6dbc..5a44b7d3 100644 --- a/pydis_site/apps/api/viewsets/bot/reminder.py +++ b/pydis_site/apps/api/viewsets/bot/reminder.py @@ -27,6 +27,11 @@ class ReminderViewSet( ... { ... 'active': True, ... 'author': 1020103901030, + ... 'mentions': [ + ... 336843820513755157, + ... 165023948638126080, + ... 267628507062992896 + ... ], ... 'content': "Make dinner", ... 'expiration': '5018-11-20T15:52:00Z', ... 'id': 11 -- cgit v1.2.3 From 4c288387097dcb65feadce360857c9fbe1b2593f Mon Sep 17 00:00:00 2001 From: kosayoda Date: Thu, 16 Jul 2020 10:46:56 +0800 Subject: Document POSTing mentions in ReminderViewSet --- pydis_site/apps/api/viewsets/bot/reminder.py | 1 + 1 file changed, 1 insertion(+) (limited to 'pydis_site/apps/api/viewsets') diff --git a/pydis_site/apps/api/viewsets/bot/reminder.py b/pydis_site/apps/api/viewsets/bot/reminder.py index 5a44b7d3..b31330a0 100644 --- a/pydis_site/apps/api/viewsets/bot/reminder.py +++ b/pydis_site/apps/api/viewsets/bot/reminder.py @@ -48,6 +48,7 @@ class ReminderViewSet( #### Request body >>> { ... 'author': int, + ... 'mentions': List[int], ... 'content': str, ... 'expiration': str # ISO-formatted datetime ... } -- cgit v1.2.3 From 5cc5f5e2c7d4a6fa5b74aa33a6dbc7ffcf4bcc99 Mon Sep 17 00:00:00 2001 From: kosayoda Date: Thu, 16 Jul 2020 10:52:21 +0800 Subject: Document PATCH for reminders --- pydis_site/apps/api/viewsets/bot/reminder.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'pydis_site/apps/api/viewsets') diff --git a/pydis_site/apps/api/viewsets/bot/reminder.py b/pydis_site/apps/api/viewsets/bot/reminder.py index b31330a0..940d19d4 100644 --- a/pydis_site/apps/api/viewsets/bot/reminder.py +++ b/pydis_site/apps/api/viewsets/bot/reminder.py @@ -58,6 +58,22 @@ class ReminderViewSet( - 400: if the body format is invalid - 404: if no user with the given ID could be found + ### PATCH /bot/reminders/ + Update the user with the given `id`. + All fields in the request body are optional. + + #### Request body + >>> { + ... 'mentions': List[int], + ... 'content': str, + ... 'expiration': str # ISO-formatted datetime + ... } + + #### Status codes + - 200: returned on success + - 400: if the body format is invalid + - 404: if no user with the given ID could be found + ### DELETE /bot/reminders/ Delete the reminder with the given `id`. -- cgit v1.2.3 From 806b27bb30ceb32603bd90d31e32ae30bf8f499e Mon Sep 17 00:00:00 2001 From: kosayoda Date: Thu, 16 Jul 2020 14:11:35 +0800 Subject: Document more undocumented stuff --- pydis_site/apps/api/viewsets/bot/reminder.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'pydis_site/apps/api/viewsets') diff --git a/pydis_site/apps/api/viewsets/bot/reminder.py b/pydis_site/apps/api/viewsets/bot/reminder.py index 940d19d4..f4921d44 100644 --- a/pydis_site/apps/api/viewsets/bot/reminder.py +++ b/pydis_site/apps/api/viewsets/bot/reminder.py @@ -34,7 +34,9 @@ class ReminderViewSet( ... ], ... 'content': "Make dinner", ... 'expiration': '5018-11-20T15:52:00Z', - ... 'id': 11 + ... 'id': 11, + ... 'channel_id': 634547009956872193, + ... 'jump_url': "https://discord.com/channels///" ... }, ... ... ... ] @@ -50,7 +52,9 @@ class ReminderViewSet( ... 'author': int, ... 'mentions': List[int], ... 'content': str, - ... 'expiration': str # ISO-formatted datetime + ... 'expiration': str, # ISO-formatted datetime + ... 'channel_id': int, + ... 'jump_url': Optional[str] ... } #### Status codes -- cgit v1.2.3 From 387b763af7dfe3675a476ab6a2b9815e2ac8e83a Mon Sep 17 00:00:00 2001 From: kosayoda Date: Sun, 19 Jul 2020 12:50:01 +0800 Subject: Fix misleading documentation --- pydis_site/apps/api/viewsets/bot/reminder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pydis_site/apps/api/viewsets') diff --git a/pydis_site/apps/api/viewsets/bot/reminder.py b/pydis_site/apps/api/viewsets/bot/reminder.py index f4921d44..6f8a28f2 100644 --- a/pydis_site/apps/api/viewsets/bot/reminder.py +++ b/pydis_site/apps/api/viewsets/bot/reminder.py @@ -54,7 +54,7 @@ class ReminderViewSet( ... 'content': str, ... 'expiration': str, # ISO-formatted datetime ... 'channel_id': int, - ... 'jump_url': Optional[str] + ... 'jump_url': str ... } #### Status codes -- cgit v1.2.3