def _get_number_of_print_items()

in backend-printing/helper/sap_client.py [0:0]


    def _get_number_of_print_items(self, queue_name):
        """Get the number of print items in a queue

        Args:
            queue_name (string): queue name

        Returns:
            requests.Response: Response object from the request
        """
        try:
            response = self._call_sap_api(
                f"{self.api_url}{GET_NUMBER_OF_PRINT_ITEMS}?Qname='{queue_name}'"
            )
            return response["d"]["NrOfNewItems"] if response else 0
        except Exception as e:
            raise Exception(f"Error occurred while getting number of print items: {e}")