PaginatedHistory#

class gafaelfawr.models.history.PaginatedHistory(entries, count, next_cursor=None, prev_cursor=None)#

Bases: Generic[E]

Encapsulates paginated history entries with pagination information.

Holds a paginated list of a generic type, complete with a count and cursors. Can hold any type of entry, but uses a HistoryCursor, so implicitly requires the type be one that is meaningfully paginated by that type of cursor.

Parameters:

Attributes Summary

next_cursor

Cursor for the next batch of entries.

prev_cursor

Cursor for the previous batch of entries.

Methods Summary

link_header(base_url)

Construct an RFC 8288 Link header for a paginated result.

Attributes Documentation

next_cursor: HistoryCursor | None = None#

Cursor for the next batch of entries.

prev_cursor: HistoryCursor | None = None#

Cursor for the previous batch of entries.

Methods Documentation

Construct an RFC 8288 Link header for a paginated result.

Parameters:

base_url (URL) – The starting URL of the current group of entries.

Return type:

str