[ckan-changes] [okfn/ckan] 5e8acd: [#2345] Sphinxify action/get.py:member_list() docs...

GitHub noreply at github.com
Fri May 4 11:03:01 UTC 2012


  Branch: refs/heads/feature-2345-action-api-autodocs
  Home:   https://github.com/okfn/ckan
  Commit: 5e8acd9e1989529b86b666bd534dd5c0816a00ba
      https://github.com/okfn/ckan/commit/5e8acd9e1989529b86b666bd534dd5c0816a00ba
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-05-04 (Fri, 04 May 2012)

  Changed paths:
    M ckan/logic/action/get.py

  Log Message:
  -----------
  [#2345] Sphinxify action/get.py:member_list() docstring


diff --git a/ckan/logic/action/get.py b/ckan/logic/action/get.py
index a9e9817..cc303f4 100644
--- a/ckan/logic/action/get.py
+++ b/ckan/logic/action/get.py
@@ -205,20 +205,24 @@ def related_list(context, data_dict=None):
 
 
 def member_list(context, data_dict=None):
-    """
-    Returns a list of (id,type,capacity) tuples that are members of the
-    specified group if the user has permission to 'get' the group.
-
-    context:
-        model - The CKAN model module
-        user  - The name of the current user
-
-    data_dict:
-        id - The ID of the group to which we want to list members
-        object_type - The optional name of the type being added, all lowercase,
-                      e.g. package, or user
-        capacity - The optional capacity of objects that we want to retrieve
-    """
+    '''
+    Return the members of a group.
+
+    The user must have permission to 'get' the group.
+
+    :param id: the id or name of the group
+    :type id: string
+    :param object_type: restrict the members returned to those of a given type,
+      e.g. 'user' or 'package' (optional, default: None)
+    :type object_type: string
+    :param capacity: restrict the members returned to those with a given
+      capacity, e.g. 'member', 'editor', 'admin', 'public', 'private'
+      (optional, default: None)
+    :type capacity: string
+    :returns: the members of the group
+    :rtype: list of (id, type, capacity) tuples
+
+    '''
     model = context['model']
     user = context['user']
 


================================================================



More information about the ckan-changes mailing list