def METHOD_NAME(self, recursive=True):
    """Returns a flat list of the repository's contents.
    Args:
        recursive (True): whether to recursively traverse subdirectories
    Returns:
        a list of file info dicts
    """
    if self.ref:
        ref = self.ref
    else:
        ref = self.get_repo_info()["default_branch"]
    url = f"https://api.github.com/repos/{self.user}/{self.repo}/git/trees/{ref}?recursive={int(recursive)}"
    return self._get(url)["tree"]