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

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/DigitalLibrary/src/ResponseMeta.py')
-rw-r--r--plugins/DigitalLibrary/src/ResponseMeta.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/plugins/DigitalLibrary/src/ResponseMeta.py b/plugins/DigitalLibrary/src/ResponseMeta.py
new file mode 100644
index 0000000000..a1dbc949db
--- /dev/null
+++ b/plugins/DigitalLibrary/src/ResponseMeta.py
@@ -0,0 +1,24 @@
+# Copyright (c) 2021 Ultimaker B.V.
+
+from typing import Optional
+
+from .PaginationMetadata import PaginationMetadata
+
+
+class ResponseMeta:
+ """Class representing the metadata included in a Digital Library response (if any)"""
+
+ def __init__(self,
+ page: Optional[PaginationMetadata] = None,
+ **kwargs) -> None:
+ """
+ Creates a new digital factory project response object
+ :param page: Metadata related to pagination
+ :param kwargs:
+ """
+
+ self.page = page
+ self.__dict__.update(kwargs)
+
+ def __str__(self) -> str:
+ return "Response Meta | {}".format(self.page)