mirror of
https://github.com/nextcloud/ocsms.git
synced 2026-08-11 16:32:55 +00:00
Prepare api v2 calls to retrieve messages from the server
This commit is contained in:
+6
-1
@@ -26,11 +26,16 @@ $application->registerRoutes($this, array('routes' => array(
|
||||
array('name' => 'settings#set_messagelimit', 'url'=> '/set/msglimit', 'verb' => 'POST'),
|
||||
array('name' => 'settings#set_notification_state', 'url'=> '/set/notification_state', 'verb' => 'POST'),
|
||||
|
||||
// Android API v1 doesn't have a version in the URL, be careful
|
||||
array('name' => 'api#get_api_version', 'url' => '/get/apiversion', 'verb' => 'GET'), // Android APIv1
|
||||
array('name' => 'api#push', 'url' => '/push', 'verb' => 'POST'), // Android API
|
||||
array('name' => 'api#replace', 'url' => '/replace', 'verb' => 'POST'), // Android API
|
||||
array('name' => 'api#retrieve_all_ids', 'url' => '/get/smsidlist', 'verb' => 'GET'), // Android APIv1
|
||||
array('name' => 'api#retrieve_all_ids_with_status', 'url' => '/get/smsidstate', 'verb' => 'GET'), // Android APIv1
|
||||
array('name' => 'api#retrieve_last_timestamp', 'url' => '/get/lastmsgtime', 'verb' => 'GET'), // Android APIv1
|
||||
array('name' => 'api#get_all_stored_phone_numbers', 'url' => 'get/phones/numberlist', 'verb' => 'GET'), // Android APIv2
|
||||
|
||||
// API v2
|
||||
array('name' => 'api#get_all_stored_phone_numbers', 'url' => '/api/v2/get/phones/numberlist', 'verb' => 'GET'), // Android APIv2
|
||||
array('name' => 'api#fetch_messages', 'url' => '/api/v2/messages/{start}/{limit}', 'verb' => 'GET'), // Android APIv2
|
||||
array('name' => 'api#fetch_messages_for_number', 'url' => '/api/v2/messages/{phonenumber}/{start}/{limit}', 'verb' => 'GET'), // Android APIv2
|
||||
)));
|
||||
|
||||
Reference in New Issue
Block a user