def get_all(self, resource_name: str) -> Pager: """ Get all items of the given resource. .. see also:: https://tableau.github.io/server-client-python/docs/page-through-results :param resource_name: The name of the resource to paginate. For example: jobs or workbooks :type resource_name: str :return: all items by returning a Pager. :rtype: tableauserverclient.Pager """ resource = getattr(self.server, resource_name) return Pager(resource.get)
def get_all(self, resource_name: str) -> Pager: """ Get all items of the given resource. .. see also:: https://tableau.github.io/server-client-python/docs/page-through-results :param resource_name: The name of the resource to paginate. For example: jobs or workbooks. :return: all items by returning a Pager. :rtype: tableauserverclient.Pager """ try: resource = getattr(self.server, resource_name) except AttributeError: raise ValueError(f"Resource name {resource_name} is not found.") return Pager(resource.get)