1
0
mirror of https://github.com/nerzhul/ownCloud-SMS-App.git synced 2025-06-07 07:56:14 +00:00

Prepare a call to APIv2 call

This commit is contained in:
Loïc Blot (@U-Exp) 2014-11-30 20:19:34 +01:00
parent dfb92097e4
commit 7ea252e0ab

View File

@ -173,6 +173,10 @@ public class OCSMSOwnCloudClient {
return createGetRequest(OC_GET_ALL_SMS_IDS_WITH_STATUS);
}
public GetMethod createGetLastSmsTimestampRequest() {
return createGetRequest(OC_GET_LAST_MSG_TIMESTAMP);
}
private GetMethod createGetRequest(String oc_call) {
GetMethod get = new GetMethod(_ocClient.getBaseUri() + oc_call);
get.addRequestHeader("OCS-APIREQUEST", "true");
@ -344,6 +348,7 @@ public class OCSMSOwnCloudClient {
private static String OC_GET_VERSION = "/index.php/apps/ocsms/get/apiversion?format=json";
private static String OC_GET_ALL_SMS_IDS = "/index.php/apps/ocsms/get/smsidlist?format=json";
private static String OC_GET_ALL_SMS_IDS_WITH_STATUS = "/index.php/apps/ocsms/get/smsidstate?format=json";
private static String OC_GET_LAST_MSG_TIMESTAMP = "/index.php/apps/ocsms/get/lastmsgtime?format=json";
private static String OC_PUSH_ROUTE = "/index.php/apps/ocsms/push?format=json";
private static final String TAG = OCSMSOwnCloudClient.class.getSimpleName();