* @param selectiveSync whether the folder should use selective syncing or not
* @return <code>true</code> if the folder was added to Sync; <code>false</code> otherwise (call
* {@link #getLastError()} for cause)
*/
public boolean addFolder(String dir, String secret, boolean selectiveSync) {
BTSyncResponse response = this.client.target(this.baseUrl + "method=add_folder&dir=" + dir + "&secret=" + secret + "&selective_sync=" + (selectiveSync ? "1" : "0"))
.request()
.get(BTSyncResponse.class);
if(response.isSuccess()) {
return true;
} else {
this.lastError = response;
return false;
}