mirror of
https://github.com/nerzhul/ownCloud-SMS-App.git
synced 2025-06-07 16:06:18 +00:00
Prepare a call to APIv2 call
This commit is contained in:
parent
dfb92097e4
commit
7ea252e0ab
@ -173,6 +173,10 @@ public class OCSMSOwnCloudClient {
|
|||||||
return createGetRequest(OC_GET_ALL_SMS_IDS_WITH_STATUS);
|
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) {
|
private GetMethod createGetRequest(String oc_call) {
|
||||||
GetMethod get = new GetMethod(_ocClient.getBaseUri() + oc_call);
|
GetMethod get = new GetMethod(_ocClient.getBaseUri() + oc_call);
|
||||||
get.addRequestHeader("OCS-APIREQUEST", "true");
|
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_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 = "/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_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 String OC_PUSH_ROUTE = "/index.php/apps/ocsms/push?format=json";
|
||||||
|
|
||||||
private static final String TAG = OCSMSOwnCloudClient.class.getSimpleName();
|
private static final String TAG = OCSMSOwnCloudClient.class.getSimpleName();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user