public Response leave(String groupId, boolean deletePhotos) throws JinxException {
    JinxUtils.validateParams(groupId);
    Map<String, String> params = new TreeMap<>();
    params.put("method", "flickr.groups.leave");
    params.put("group_id", groupId);
    if (deletePhotos) {
      params.put("delete_photos", "true");
    }
    return jinx.flickrPost(params, Response.class);
  }
public Response leave ( String groupId , boolean deletePhotos ) throws JinxException { JinxUtils . validateParams ( groupId ) ; Map < String , String > params = new TreeMap < > ( ) ; params . put ( "method" , "flickr.groups.leave" ) ; params . put ( "group_id" , groupId ) ; if ( deletePhotos ) { params . put ( "delete_photos" , "true" ) ; } return jinx . flickrPost ( params , Response . class ) ; }
Leave a group.
<br>
If the user is the only administrator left, and there are other members,
the oldest member will be promoted to administrator.
<br>
If the user is the last person in the group, the group will be deleted.
<br>
This method requires authentication with 'delete' permission.
<br>

@param groupId      (Required) The NSID of the Group to leave.
@param deletePhotos Delete all photos by this user from the group.
@return object with response from Flickr indicating ok or fail.
@throws JinxException if required parameters are missing, or if there are any errors.
@see <a href="https://www.flickr.com/services/api/flickr.groups.leave.html">flickr.groups.leave</a>