From b32f5b86d51eb2af4d959bc78450ec049e8b563f Mon Sep 17 00:00:00 2001 From: Matteo Bertucci Date: Sat, 24 Apr 2021 16:44:06 +0200 Subject: Pagination: Use REPL style examples --- pydis_site/apps/api/pagination.py | 54 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'pydis_site/apps/api/pagination.py') diff --git a/pydis_site/apps/api/pagination.py b/pydis_site/apps/api/pagination.py index faf33687..2a325460 100644 --- a/pydis_site/apps/api/pagination.py +++ b/pydis_site/apps/api/pagination.py @@ -11,35 +11,35 @@ class LimitOffsetPaginationExtended(LimitOffsetPagination): For example: ## Default response - { - "count": 1, - "next": null, - "previous": null, - "results": [{ - "id": 6, - "inserted_at": "2021-01-26T21:13:35.477879Z", - "expires_at": null, - "active": false, - "user": 1, - "actor": 2, - "type": "warning", - "reason": null, - "hidden": false - }] - } + >>> { + ... "count": 1, + ... "next": None, + ... "previous": None, + ... "results": [{ + ... "id": 6, + ... "inserted_at": "2021-01-26T21:13:35.477879Z", + ... "expires_at": None, + ... "active": False, + ... "user": 1, + ... "actor": 2, + ... "type": "warning", + ... "reason": null, + ... "hidden": false + ... }] + ... } ## Required response - [{ - "id": 6, - "inserted_at": "2021-01-26T21:13:35.477879Z", - "expires_at": null, - "active": false, - "user": 1, - "actor": 2, - "type": "warning", - "reason": null, - "hidden": false - }] + >>> [{ + ... "id": 6, + ... "inserted_at": "2021-01-26T21:13:35.477879Z", + ... "expires_at": None, + ... "active": False, + ... "user": 1, + ... "actor": 2, + ... "type": "warning", + ... "reason": None, + ... "hidden": False + ... }] """ default_limit = 100 -- cgit v1.2.3