diff options
author | Kostas Karmas <konskarm@gmail.com> | 2021-04-20 12:30:49 +0300 |
---|---|---|
committer | Kostas Karmas <konskarm@gmail.com> | 2021-04-20 12:30:49 +0300 |
commit | d972c505d012fc83499c395123641c1aa0fb5863 (patch) | |
tree | 5ba2619bb3835d5bff45e4d4a8b2346160e14067 /plugins/DigitalLibrary/src/PaginationLinks.py | |
parent | e19d5545bc36b21152f41de2ba7e153ac1933e8d (diff) |
Initial commit for the DL
Diffstat (limited to 'plugins/DigitalLibrary/src/PaginationLinks.py')
-rw-r--r-- | plugins/DigitalLibrary/src/PaginationLinks.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/plugins/DigitalLibrary/src/PaginationLinks.py b/plugins/DigitalLibrary/src/PaginationLinks.py new file mode 100644 index 0000000000..06ed183944 --- /dev/null +++ b/plugins/DigitalLibrary/src/PaginationLinks.py @@ -0,0 +1,30 @@ +# Copyright (c) 2021 Ultimaker B.V. + +from typing import Optional + + +class PaginationLinks: + """Model containing pagination links.""" + + def __init__(self, + first: Optional[str] = None, + last: Optional[str] = None, + next: Optional[str] = None, + prev: Optional[str] = None, + **kwargs) -> None: + """ + Creates a new digital factory project response object + :param first: The URL for the first page. + :param last: The URL for the last page. + :param next: The URL for the next page. + :param prev: The URL for the prev page. + :param kwargs: + """ + + self.first_page = first + self.last_page = last + self.next_page = next + self.prev_page = prev + + def __str__(self) -> str: + return "Pagination Links | First: {}, Last: {}, Next: {}, Prev: {}".format(self.first_page, self.last_page, self.next_page, self.prev_page) |