Improve JSON API documentation

This commit is contained in:
Francis Lachapelle
2015-01-13 11:30:23 -05:00
parent 64615ea6fa
commit 8286fb68a4
7 changed files with 129 additions and 27 deletions
+16 -1
View File
@@ -83,6 +83,21 @@
return defaultUserID;
}
/**
* @api {get} /so/:username/:folderPath/acls Get ACLs
* @apiVersion 1.0.0
* @apiName GetAcls
* @apiGroup Common
* @apiExample {curl} Example usage:
* curl -i http://localhost/SOGo/so/sogo1/Calendar/personal/acls
*
* @apiSuccess (Success 200) {Object[]} users List of users with ACL for the folder
* @apiSuccess (Success 200) {String} uid User ID
* @apiSuccess (Success 200) {String} userClass Either 'normal-user', 'normal-group' or 'public-access'
* @apiSuccess (Success 200) {Number} isSubscribed 1 if the user is subscribed to the folder
* @apiSuccess (Success 200) {String} [cn] User fullname
* @apiSuccess (Success 200) {String} [c_email] User main email address
*/
- (id <WOActionResults>) aclsAction
{
id <WOActionResults> result;
@@ -145,7 +160,7 @@
}
result = [self responseWithStatus: 200
andString: [users jsonRepresentation]];
andJSONRepresentation: [NSDictionary dictionaryWithObject: users forKey: @"users"]];
return result;
}