[bulbul~subversion:26] liste silme eklendi
- From: Mitotic.Spindle@kenai.com
- To: commits@bulbul.kenai.com
- Subject: [bulbul~subversion:26] liste silme eklendi
- Date: Mon, 25 Jan 2010 19:08:12 +0000
Project: bulbul
Repository: subversion
Revision: 26
Author: Mitotic.Spindle
Date: 2010-01-25 19:08:07 UTC
Link:
Log Message:
------------
liste silme eklendi
Revisions:
----------
26
Modified Paths:
---------------
Bulbul/src/net/orhanbalci/bulbul/Bulbul.java
Diffs:
------
Index: Bulbul/src/net/orhanbalci/bulbul/Bulbul.java
===================================================================
--- Bulbul/src/net/orhanbalci/bulbul/Bulbul.java (revision 25)
+++ Bulbul/src/net/orhanbalci/bulbul/Bulbul.java (revision 26)
@@ -34,6 +34,7 @@
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
+import org.apache.http.client.methods.HttpDelete;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.utils.URIUtils;
@@ -817,6 +818,34 @@
}
}
+ public BulbulRequestResult deleteListOfUser(String userName, String
listId, BulbulList bl) throws URISyntaxException, IOException
+ {
+ URI deleteList = URIUtils.createURI("http", "api.twitter.com", -1,
"/1/" + userName + "/lists/" + listId + ".xml", null, null);
+ HttpDelete hPost = new HttpDelete(deleteList);
+ try {
+ consumer.sign(hPost);
+ } catch (OAuthMessageSignerException ex) {
+ Logger.getLogger(Bulbul.class.getName()).log(Level.SEVERE, null,
ex);
+ } catch (OAuthExpectationFailedException ex) {
+ Logger.getLogger(Bulbul.class.getName()).log(Level.SEVERE, null,
ex);
+ }
+ HttpResponse hr = client_.execute(hPost);
+ HttpEntity hEnt = hr.getEntity();
+ if (hEnt != null) {
+ if (hEnt != null) {
+ InputStream is = hEnt.getContent();
+ bl.loadFrom(is);
+ }
+ }
+ int statusCode = hr.getStatusLine().getStatusCode();
+
+ if (statusCode == 200) {
+ return BulbulRequestResult.STATUS_OK;
+ } else {
+ return BulbulRequestResult.STATUS_NOT_FOUND;
+ }
+ }
+
public boolean authenticate() {
boolean result = false;
consumer = new CommonsHttpOAuthConsumer(
|
[bulbul~subversion:26] liste silme eklendi |
Mitotic . Spindle | 01/25/2010 |





