From 7ea252e0ab4cd23bf1e89dda7cb56d8d332893e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot=20=28=40U-Exp=29?= Date: Sun, 30 Nov 2014 20:19:34 +0100 Subject: [PATCH] Prepare a call to APIv2 call --- .../owncloud_sms/engine/OCSMSOwnCloudClient.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/fr/unix_experience/owncloud_sms/engine/OCSMSOwnCloudClient.java b/src/fr/unix_experience/owncloud_sms/engine/OCSMSOwnCloudClient.java index b5ae1a4..4ecf90e 100644 --- a/src/fr/unix_experience/owncloud_sms/engine/OCSMSOwnCloudClient.java +++ b/src/fr/unix_experience/owncloud_sms/engine/OCSMSOwnCloudClient.java @@ -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();