From: Bjoern Schiessle Date: Wed, 4 Sep 2013 12:32:05 +0000 (+0200) Subject: initial commit, start implementing the ocs share api X-Git-Tag: v6.0.0alpha2~95^2~34 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=985758305f66d80f2b0625423b0bee68fce2a2d9;p=nextcloud-server.git initial commit, start implementing the ocs share api --- diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php index 895d446a336..ffdcbf05109 100644 --- a/apps/files_sharing/appinfo/app.php +++ b/apps/files_sharing/appinfo/app.php @@ -7,6 +7,7 @@ OC::$CLASSPATH['OC\Files\Cache\Shared_Cache'] = 'files_sharing/lib/cache.php'; OC::$CLASSPATH['OC\Files\Cache\Shared_Permissions'] = 'files_sharing/lib/permissions.php'; OC::$CLASSPATH['OC\Files\Cache\Shared_Updater'] = 'files_sharing/lib/updater.php'; OC::$CLASSPATH['OC\Files\Cache\Shared_Watcher'] = 'files_sharing/lib/watcher.php'; +OC::$CLASSPATH['OCA\Files\Share\Api'] = 'files_sharing/lib/api.php'; OCP\Util::connectHook('OC_Filesystem', 'setup', '\OC\Files\Storage\Shared', 'setup'); OCP\Share::registerBackend('file', 'OC_Share_Backend_File'); OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file'); diff --git a/apps/files_sharing/appinfo/routes.php b/apps/files_sharing/appinfo/routes.php index 02815b5eb42..15af5226e18 100644 --- a/apps/files_sharing/appinfo/routes.php +++ b/apps/files_sharing/appinfo/routes.php @@ -2,4 +2,55 @@ $this->create('core_ajax_public_preview', '/publicpreview.png')->action( function() { require_once __DIR__ . '/../ajax/publicpreview.php'; -}); \ No newline at end of file +}); + +//TODO: GET: share status of a given file/folder +//TODO: GET: share status of all files in a given folder? +//TODO: SET: share (unshare) +//TODO: SET: permissions +//TODO: SET: expire date +//TODO: SET: mail notification + +OC_API::register('get', + '/apps/files_sharing/api/share/{path}', + array('\OCA\Files\Share\Api', 'getShare'), + 'files_sharing', + OC_API::USER_AUTH, + array('path' => ''), + array('path' => '.+')); //allow slashes in parameter path +/* +OC_API::register('get', + '/apps/files_sharing/api/share/group/{path}', + array('\OCA\Files\Share\Api', 'getShare'), + 'files_sharing', + OC_API::USER_AUTH, + array('path' => '')); + +OC_API::register('get', + '/apps/files_sharing/api/share/user/{path}', + array('\OCA\Files\Share\Api', 'getShare'), + 'files_sharing', + OC_API::USER_AUTH, + array('path' => '')); + +OC_API::register('get', + '/apps/files_sharing/api/permission/{path}', + array('\OCA\Files\Share\Api', 'getShare'), + 'files_sharing', + OC_API::USER_AUTH, + array('path' => '')); + +OC_API::register('get', + '/apps/files_sharing/api/expire/{path}', + array('\OCA\Files\Share\Api', 'getShare'), + 'files_sharing', + OC_API::USER_AUTH, + array('path' => '')); + +OC_API::register('get', + '/apps/files_sharing/api/notify/{path}', + array('\OCA\Files\Share\Api', 'getShare'), + 'files_sharing', + OC_API::USER_AUTH, + array('path' => '')); +*/