Welcome to mirror list, hosted at ThFree Co, Russian Federation.

PaginationLinks.py « src « DigitalLibrary « plugins - github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 06ed1839445b1580452be77bff8ba9602ad5455f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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)