function deletePagesFromWiki(service, token, spacekey)

pages = getPages(service, activateService(service), spacekey);

h = waitbar(0,'Please wait...');

for i = 1:size(pages,1)
    waitbar(i/size(pages,1));
    disp(pages(i).title)
    result = removePage(service, activateService(service),  pages(i).id);
end
close(h)


