Skip to content

Commit

Permalink
Added new functionality: remove folder.
Browse files Browse the repository at this point in the history
Also, this method and the 'deleteTodo' returns a new delete generic response as it is exactly the same.

No testing yet.
  • Loading branch information
lant authored and lant committed Jan 19, 2010
1 parent 69a7951 commit 898a1cf
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/org/loststone/toodledo/response/GenericDeleteResponse.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package org.loststone.toodledo.response;

import org.loststone.toodledo.exception.ToodledoApiException;


public class GenericDeleteResponse extends Response {

public GenericDeleteResponse(String resp) {
super(resp);
}

public String getResponseContent() throws ToodledoApiException {
String result = null;
// check for errors:
if (!this.succeeded()) {
throw new ToodledoApiException(response.substring(response.indexOf("<error>")+7,
response.indexOf("</error>")));
}

result = response.substring(response.indexOf("<success>")+9, response.indexOf("</success>"));
return result;
}

}

0 comments on commit 898a1cf

Please sign in to comment.