def METHOD_NAME(self, url, folder_id=None):
    params = {
        "from_id"  : None,
        "folder_id": folder_id,
    }
    while True:
        data = self.request(url, params=params).json()
        if not data:
            return
        params["from_id"] = data[-1]["id"]
        for post in data:
            if not folder_id or folder_id == post["folder_id"]:
                yield post