From 3689e6aa6e81863bfd3b6a69c7bbbf2d2987af47 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Wed, 26 Dec 2012 21:54:09 +0100 Subject: [PATCH] Reformat and add External API document --- developer_manual/externalapi.rst | 20 +++++++++++++++----- developer_manual/index.rst | 2 +- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/developer_manual/externalapi.rst b/developer_manual/externalapi.rst index 31e52d69a..ac2a5db2b 100644 --- a/developer_manual/externalapi.rst +++ b/developer_manual/externalapi.rst @@ -5,17 +5,23 @@ External API Introduction ------------ -The external API inside ownCloud allows third party developers to access data provided by ownCloud apps. ownCloud version 5.0 will follow the OCS V1.7 specification `found here (draft) `_. +The external API inside ownCloud allows third party developers to access data +provided by ownCloud apps. ownCloud version 5.0 will follow the `OCS v1.7 +specification`_ (draft). + +.. _OCS v1.7 specification: http://www.freedesktop.org/wiki/Specifications/open-collaboration-services-1.7 Usage ------------ -To make use of the external api as an app developer, there are just three things to do. +To make use of the external api as an app developer, there are just three things +to do. #. Add your API routes inside $app/appinfo/routes.php #. Code your API methods in $app/lib/* #. Update the OCS spec with your call -To register your API routes, we make use of the OCP\API::register() method as defined below: +To register your API routes, we make use of the OCP\API::register() method as +defined below: .. php:class:: OCP\\API @@ -35,8 +41,12 @@ To register your API routes, we make use of the OCP\API::register() method as de Routing URLs ~~~~~~~~~~~~~ -The API uses the new routing features inside ownCloud to make it easy to attach api methods to urls which include variables. To register an API method including a variable, simple place the variable name in curly brackets {}. For example: +The API uses the new routing features inside ownCloud to make it easy to attach +api methods to urls which include variables. To register an API method including +a variable, simple place the variable name in curly brackets {}. For example: /cloud/users/{userid} -If the URL /cloud/users/Tom is requested, the api function registered with this url would be called, and passed the parameter 'userid' with the value: 'Tom'. The parameters are passed to the API methods inside an array. \ No newline at end of file +If the URL /cloud/users/Tom is requested, the api function registered with this +url would be called, and passed the parameter 'userid' with the value: 'Tom'. +The parameters are passed to the API methods inside an array. diff --git a/developer_manual/index.rst b/developer_manual/index.rst index 4d8c51ee2..852370d44 100644 --- a/developer_manual/index.rst +++ b/developer_manual/index.rst @@ -36,7 +36,7 @@ Contents access unit-testing compatibility - + externalapi Indices and tables ==================