Fixes issue #134 - Delete a list with the API
This commit is contained in:
parent
b8cd4f671b
commit
239ee8e3bf
|
@ -1183,6 +1183,24 @@ public class API {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete a list by its id
|
||||||
|
* @param id String, the id of the list
|
||||||
|
* @return APIResponse
|
||||||
|
*/
|
||||||
|
public int deleteList(String id){
|
||||||
|
try {
|
||||||
|
HttpsConnection httpsConnection = new HttpsConnection();
|
||||||
|
httpsConnection.delete(getAbsoluteUrl(String.format("/lists/%s", id)), 60, null, prefKeyOauthTokenT);
|
||||||
|
actionCode = httpsConnection.getActionCode();
|
||||||
|
} catch (HttpsConnection.HttpsConnectionException e) {
|
||||||
|
setError(e.getStatusCode(), e);
|
||||||
|
}catch (Exception e) {
|
||||||
|
setDefaultError();
|
||||||
|
}
|
||||||
|
return actionCode;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse json response an unique account
|
* Parse json response an unique account
|
||||||
* @param resobj JSONObject
|
* @param resobj JSONObject
|
||||||
|
|
Loading…
Reference in New Issue