aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site
diff options
context:
space:
mode:
authorGravatar SebastiaanZ <[email protected]>2019-04-28 12:04:12 +0200
committerGravatar SebastiaanZ <[email protected]>2019-04-28 12:04:12 +0200
commit68589f4bab98fc37a341cfcbbd498d1c7fe44505 (patch)
treeef6921ce8f63294990f12283905fb6bab4f04c36 /pydis_site
parentChanging 'end_nomination' endpoint to 'dismiss' (diff)
Changing the docstring response style to REPL prefix style
Diffstat (limited to 'pydis_site')
-rw-r--r--pydis_site/apps/api/viewsets/bot/nomination.py68
1 files changed, 34 insertions, 34 deletions
diff --git a/pydis_site/apps/api/viewsets/bot/nomination.py b/pydis_site/apps/api/viewsets/bot/nomination.py
index b42e53ff..b4e0b463 100644
--- a/pydis_site/apps/api/viewsets/bot/nomination.py
+++ b/pydis_site/apps/api/viewsets/bot/nomination.py
@@ -36,18 +36,18 @@ class NominationViewSet(CreateModelMixin, RetrieveModelMixin, ListModelMixin, Ge
Invalid query parameters are ignored.
#### Response format
- [
- {
- 'id': 1,
- 'active': false,
- 'actor': 336843820513755157,
- 'reason': 'They know how to explain difficult concepts',
- 'user': 336843820513755157,
- 'inserted_at': '2019-04-25T14:02:37.775587Z',
- 'unnominate_reason': 'They were helpered after a staff-vote',
- 'unwatched_at': '2019-04-26T15:12:22.123587Z'
- }
- ]
+ >>> [
+ ... {
+ ... 'id': 1,
+ ... 'active': false,
+ ... 'actor': 336843820513755157,
+ ... 'reason': 'They know how to explain difficult concepts',
+ ... 'user': 336843820513755157,
+ ... 'inserted_at': '2019-04-25T14:02:37.775587Z',
+ ... 'unnominate_reason': 'They were helpered after a staff-vote',
+ ... 'unwatched_at': '2019-04-26T15:12:22.123587Z'
+ ... }
+ ... ]
#### Status codes
- 200: returned on success
@@ -56,16 +56,16 @@ class NominationViewSet(CreateModelMixin, RetrieveModelMixin, ListModelMixin, Ge
Retrieve a single nomination by ID.
### Response format
- {
- 'id': 1,
- 'active': true,
- 'actor': 336843820513755157,
- 'reason': 'They know how to explain difficult concepts',
- 'user': 336843820513755157,
- 'inserted_at': '2019-04-25T14:02:37.775587Z',
- 'unnominate_reason': 'They were helpered after a staff-vote',
- 'unwatched_at': '2019-04-26T15:12:22.123587Z'
- }
+ >>> {
+ ... 'id': 1,
+ ... 'active': true,
+ ... 'actor': 336843820513755157,
+ ... 'reason': 'They know how to explain difficult concepts',
+ ... 'user': 336843820513755157,
+ ... 'inserted_at': '2019-04-25T14:02:37.775587Z',
+ ... 'unnominate_reason': 'They were helpered after a staff-vote',
+ ... 'unwatched_at': '2019-04-26T15:12:22.123587Z'
+ ... }
### Status codes
- 200: returned on succes
@@ -79,11 +79,11 @@ class NominationViewSet(CreateModelMixin, RetrieveModelMixin, ListModelMixin, Ge
allowed one active nomination at a time.
#### Request body
- {
- 'actor': 409107086526644234
- 'reason': 'He would make a great helper',
- 'user': 409107086526644234
- }
+ >>> {
+ ... 'actor': 409107086526644234
+ ... 'reason': 'He would make a great helper',
+ ... 'user': 409107086526644234
+ ... }
### Response format
See `GET /bot/nominations/<id:int>`
@@ -101,10 +101,10 @@ class NominationViewSet(CreateModelMixin, RetrieveModelMixin, ListModelMixin, Ge
nominations, both the `reason` and `unnominate_reason` may be updated.
#### Request body
- {
- 'reason': 'He would make a great helper',
- 'unnominate_reason': 'He needs some time to mature his Python knowledge'
- }
+ >>> {
+ ... 'reason': 'He would make a great helper',
+ ... 'unnominate_reason': 'He needs some time to mature his Python knowledge'
+ ... }
### Response format
See `GET /bot/nominations/<id:int>`
@@ -123,9 +123,9 @@ class NominationViewSet(CreateModelMixin, RetrieveModelMixin, ListModelMixin, Ge
the `unwatched_at` field.
#### Request body
- {
- 'unnominate_reason': 'He needs some time to mature his Python knowledge'
- }
+ >>> {
+ ... 'unnominate_reason': 'He needs some time to mature his Python knowledge'
+ ... }
### Response format
See `GET /bot/nominations/<id:int>`