ResponseMeta.py 658 B

123456789101112131415161718192021222324
  1. # Copyright (c) 2021 Ultimaker B.V.
  2. from typing import Optional
  3. from .PaginationMetadata import PaginationMetadata
  4. class ResponseMeta:
  5. """Class representing the metadata included in a Digital Library response (if any)"""
  6. def __init__(self,
  7. page: Optional[PaginationMetadata] = None,
  8. **kwargs) -> None:
  9. """
  10. Creates a new digital factory project response object
  11. :param page: Metadata related to pagination
  12. :param kwargs:
  13. """
  14. self.page = page
  15. self.__dict__.update(kwargs)
  16. def __str__(self) -> str:
  17. return "Response Meta | {}".format(self.page)