def METHOD_NAME(self, folder_id):
    links = []
    json_data = self.api_request(
        "files",
        q="'{}' in parents".format(folder_id),
        pageSize=100,
        fields="files/id,files/mimeType,nextPageToken",
        supportsAllDrives="true",
        includeItemsFromAllDrives="true",
    )
    if json_data is None:
        self.fail("API error")
    if "error" in json_data:
        self.fail(json_data["error"]["message"])
    for f in json_data.get("files", []):
        if f["mimeType"] != "application/vnd.google-apps.folder":
            links.append("https://drive.google.com/file/d/" + f["id"])
        elif self.config.get("dl_subfolders"):
            if self.config.get("package_subfolder"):
                links.append("https://drive.google.com/drive/folders/" + f["id"])
            else:
                links.extend(self.METHOD_NAME(f["id"]))
    next_page = json_data.get("nextPageToken", None)
    while next_page:
        json_data = self.api_request(
            "files",
            q="'{}' in parents".format(folder_id),
            pageToken=next_page,
            pageSize=100,
            fields="files/id,files/mimeType,nextPageToken",
            supportsAllDrives="true",
            includeItemsFromAllDrives="true",
        )
        if json_data is None:
            self.fail("API error")
        if "error" in json_data:
            self.fail(json_data["error"]["message"])
        for f in json_data.get("files", []):
            if f["mimeType"] != "application/vnd.google-apps.folder":
                links.append("https://drive.google.com/file/d/" + f["id"])
            elif self.config.get("dl_subfolders"):
                if self.config.get("package_subfolder"):
                    links.append(
                        "https://drive.google.com/drive/folders/" + f["id"]
                    )
                else:
                    links.extend(self.METHOD_NAME(f["id"]))
        next_page = json_data.get("nextPageToken", None)
    return links