1 package pl
.smsapi
.api
.action
.sender
;
4 import java
.net
.URISyntaxException
;
6 import org
.json
.JSONObject
;
7 import pl
.smsapi
.api
.action
.BaseAction
;
8 import pl
.smsapi
.api
.response
.CountableResponse
;
10 public class Delete
extends BaseAction
<CountableResponse
> {
13 public URI
uri() throws URISyntaxException
{
17 query
= paramsLoginToQuery();
19 query
+= paramsOther();
21 return new URI(proxy
.getProtocol(), null, proxy
.getHost(), proxy
.getPort(), proxy
.getPath()+"sender.do", query
, null);
24 public Delete
setSender(String sendername
) {
25 params
.put("delete", sendername
);
29 protected CountableResponse
createResponse(String data
) {
30 JSONObject jsonObject
= new JSONObject(data
);
31 return new CountableResponse(jsonObject
.getInt("count"));