PaginatedHistory¶
- class gafaelfawr.models.history.PaginatedHistory(entries, next_cursor=None, prev_cursor=None, count=None)¶
Bases:
PaginatedList
,Generic
[E
]A paginated list of history entries, including total count.
- Parameters:
Attributes Summary
Total count of entries.
Cursor for the next batch of entries.
Cursor for the previous batch of entries.
Methods Summary
first_url
(current_url)Construct a URL to the first group of results for this query.
link_header
(current_url)Construct an RFC 8288
Link
header for a paginated result.next_url
(current_url)Construct a URL to the next group of results for this query.
prev_url
(current_url)Construct a URL to the previous group of results for this query.
Attributes Documentation
-
next_cursor:
Optional
[TypeVar
(C
, bound= PaginationCursor)] = None¶ Cursor for the next batch of entries.
-
prev_cursor:
Optional
[TypeVar
(C
, bound= PaginationCursor)] = None¶ Cursor for the previous batch of entries.
Methods Documentation
- first_url(current_url)¶
Construct a URL to the first group of results for this query.
- Parameters:
current_url (
URL
) – The starting URL of the current group of entries.- Returns:
URL to the first group of entries for this query.
- Return type:
- link_header(current_url)¶
Construct an RFC 8288
Link
header for a paginated result.- Parameters:
current_url (
URL
) – The starting URL of the current group of entries.- Returns:
Contents of an RFC 8288
Link
header.- Return type:
- next_url(current_url)¶
Construct a URL to the next group of results for this query.