You are here

leaveSite

public Site leaveSite(Site site) - Removes the current user from the given site. If the operation is successful a new Site object is returned reflecting the changed state. If the request can not be completed successfully an exception is thrown with error code 400.

Parameters

Site site
A site object representing the site to be left.

Returns

A modified Site object.

Exception

Throws an SkyVaultServiceException if the operation cannot be carried out with an error code of 400.

Example


  case LEAVE:
  	site = siteService.leaveSite(site);
  	message = "You left site "+site.getShortName();
  	break;
        
      
Note: This method was added in version 1.1.