Is there a way to retrieve all the new google sites, including the classic sites? I tried using getAllSites(domain, start, max).
// This writes the a list of sites in domain yourdomain.com to the log.
function getNumberOfSites() {
var pageStart = 0;
var pageSize = 50;
while (true) {
Logger.log("Loading sites starting at %s", pageStart, pageSize);
var sites = SitesApp.getAllSites("yourdomain.com", pageStart, pageSize);
// Logger.log(sites);
if (sites.length == 0) {
break;
}
Logger.log("Got %s sites back", sites.length);
pageStart += sites.length;
for(var i in sites) {
Logger.log("Found site: %s", sites[i].getUrl());
}
}
}
But I could only retrieve the classic sites which has a prefix /a/
(eg: https://sites.google.com/a/yourdomain.com/demo/). Is there a way I can retrieve both classic and new google sites (which doesn't have a prefix /a/
eg: https://sites.google.com/yourdomain.com/demo/)?