# HG changeset patch # User Marcin Kuzminski # Date 1332278762 -7200 # Node ID ee45677c4edc3990e2feae84fe551829d941981b # Parent f8e66d942dcbade061b537b857ad1dc04d1ee025 Api docs fixes - return proper type instead of type_ - members return now also a type user or users_group diff -r f8e66d942dcb -r ee45677c4edc README.rst --- a/README.rst Tue Mar 20 13:23:38 2012 +0200 +++ b/README.rst Tue Mar 20 23:26:02 2012 +0200 @@ -100,7 +100,7 @@ - Intelligent cache with invalidation after push or project change, provides high performance and always up to date data. - Rss / atom feeds, gravatar support, download sources as zip/tar/gz -- Async tasks for speed and performance using celery_ (works without them too) +- Optional async tasks for speed and performance using celery_ - Backup scripts can do backup of whole app and send it over scp to desired location - Based on pylons / sqlalchemy / sqlite / whoosh / vcs diff -r f8e66d942dcb -r ee45677c4edc docs/api/api.rst --- a/docs/api/api.rst Tue Mar 20 13:23:38 2012 +0200 +++ b/docs/api/api.rst Tue Mar 20 23:26:02 2012 +0200 @@ -380,7 +380,8 @@ get_repo -------- -Gets an existing repository by it's name or repository_id. This command can +Gets an existing repository by it's name or repository_id. Members will return +either users_group or user associated to that repository. This command can be executed only using api_key belonging to user with admin rights. @@ -402,7 +403,9 @@ "type" : "", "description" : "", "members" : [ - { "id" : "", + { + "type": "user", + "id" : "", "username" : "", "firstname": "", "lastname" : "", @@ -413,7 +416,8 @@ "permission" : "repository.(read|write|admin)" }, … - { + { + "type": "users_group", "id" : "", "name" : "", "active": "", diff -r f8e66d942dcb -r ee45677c4edc rhodecode/controllers/api/api.py --- a/rhodecode/controllers/api/api.py Tue Mar 20 13:23:38 2012 +0200 +++ b/rhodecode/controllers/api/api.py Tue Mar 20 23:26:02 2012 +0200 @@ -283,7 +283,7 @@ @HasPermissionAllDecorator('hg.admin') def add_user_to_users_group(self, apiuser, group_name, username): """" - Add a user to a group + Add a user to a users group :param apiuser: :param group_name: @@ -361,7 +361,7 @@ user = user.user members.append( dict( - type_="user", + type="user", id=user.user_id, username=user.username, firstname=user.name, @@ -378,7 +378,7 @@ users_group = users_group.users_group members.append( dict( - type_="users_group", + type="users_group", id=users_group.users_group_id, name=users_group.users_group_name, active=users_group.users_group_active,