0

ID를 사용하여 Google 사이트를 삭제하는 방법을 찾을 수 없습니다. 나는 해당 사이트에 SiteEntry을 생성하고 delete() 메서드를 호출해야하지만, ID가있는 SiteEntry을 만드는 방법에 대해서는 알지 못합니다.Google 사이트를 ID로 삭제하는 방법

이 내가 사이트를 만드는 오전 방법입니다

SitesService client = new SitesService("domain-AppName-v1"); 
client.setUserCredentials("[email protected]", "password"); 

//Define Site 
SiteEntry entry = new SiteEntry(); 
entry.setTitle(new PlainTextConstruct("Accounting 001")); 
entry.setSummary(new PlainTextConstruct("Accounting 001")); 

entry.getCategories().add(new Category(TagCategory.Scheme.TAG, "Course Sessions", null)); 

//Create the site 
SiteEntry result = client.insert(new URL("https://sites.google.com/feeds/site/domain.com/"), entry); 

//This Delete does not work 
result.delete(); 

//Trying to setup the id in a SiteEntry, it doesn't work either 
SiteEntry e = new SiteEntry(); 
e.setId(result.getId()); 
e.delete(); 

답변

1

이 바보 같은 질문으로 밝혀졌다.

먼저 은 API가 아직 사이트 삭제를 지원하지 않으며 웹 패널을 통해 수동으로 삭제해야한다고 명시합니다. 내가 현재 API로 만든 수백 개의 사이트를 가지고 있고 수동으로 삭제하는 것이 엉덩이의 고통이기 때문에 이것은 정말 짜증 난다 .-

둘째, siteEntry.delete()는 "delete not implemented" .

SitesService client = <initialize the service> 
SiteEntry site = client.getEntry(new URL(siteID), SiteEntry.class); 
: 질문의 코드에서 작업을 마지막으로

,이 같은 수행해야 SiteEntry를 검색하는 것을 추가 할 때 그래서 내가 잘못했다