def get_all_posts(self, post_type: str) -> List[dict]:
        """Retrieve all posts of a specific type, handling pagination."""
        posts = []
        next_page = 1

        while True:
            response = self.get_posts_page(post_type, next_page)
            posts.extend(response["articles"])
            next_page = response["next_page"]

            if next_page is None:
                break

        return posts
Retrieve all posts of a specific type, handling pagination.
llama-index-integrations/readers/llama-index-readers-wordpress/llama_index/readers/wordpress/base.py