Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Sample to list all user members from a group (issue 5536049)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ala...@google.com  
View profile  
 More options Jan 20 2012, 6:44 pm
From: ala...@google.com
Date: Fri, 20 Jan 2012 23:44:47 +0000
Local: Fri, Jan 20 2012 6:44 pm
Subject: Re: Sample to list all user members from a group (issue 5536049)

http://codereview.appspot.com/5536049/diff/2002/samples/apps/list_gro...
File samples/apps/list_group_members.py (right):

http://codereview.appspot.com/5536049/diff/2002/samples/apps/list_gro...
samples/apps/list_group_members.py:17: """Sample to list all the user
members of a group.
s/user //

http://codereview.appspot.com/5536049/diff/2002/samples/apps/list_gro...
samples/apps/list_group_members.py:37: """Get an OAuth 2.0 for the given
credentials.
"Get an OAuth 2.0 token using the provided client_id and client_secret."

Also,  add a link to the API console explaining how to get those 2
values.

http://codereview.appspot.com/5536049/diff/2002/samples/apps/list_gro...
samples/apps/list_group_members.py:40: client_id: String client id of
the developer.
s/String/String,/

Same below.

http://codereview.appspot.com/5536049/diff/2002/samples/apps/list_gro...
samples/apps/list_group_members.py:58: """Lists all user members
including the users from member groups.
"Lists all members including members of sub-groups."

http://codereview.appspot.com/5536049/diff/2002/samples/apps/list_gro...
samples/apps/list_group_members.py:67: group_members =
group_client.RetrieveAllMembers(group_id)
Add try/except block to catch API errors.

Also, out of curiosity, does this handle paging?

http://codereview.appspot.com/5536049/diff/2002/samples/apps/list_gro...
samples/apps/list_group_members.py:71: # Assuming there is no cycle,
i.e. groups are not members of each other
As an improvement, you can use a set of visited group ID in order to
avoid cycles and maybe use a max_depth variable as well.

http://codereview.appspot.com/5536049/diff/2002/samples/apps/list_gro...
samples/apps/list_group_members.py:79: usage = 'Usage: %prog [options]'
If the arguments are mandatory, there are not options. Please change the
usage.

http://codereview.appspot.com/5536049/diff/2002/samples/apps/list_gro...
samples/apps/list_group_members.py:92: and options.GROUP_ID):
Fix indentation.

http://codereview.appspot.com/5536049/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
vicfry...@google.com  
View profile  
 More options Jan 20 2012, 10:27 pm
From: vicfry...@google.com
Date: Sat, 21 Jan 2012 03:27:09 +0000
Local: Fri, Jan 20 2012 10:27 pm
Subject: Re: Sample to list all user members from a group (issue 5536049)

http://codereview.appspot.com/5536049/diff/2002/samples/apps/list_gro...
File samples/apps/list_group_members.py (right):

http://codereview.appspot.com/5536049/diff/2002/samples/apps/list_gro...
samples/apps/list_group_members.py:31:
2 lines between imports and first statement

http://codereview.appspot.com/5536049/diff/2002/samples/apps/list_gro...
samples/apps/list_group_members.py:56:
Again, 2 lines between all top-level members.

http://codereview.appspot.com/5536049/diff/2002/samples/apps/list_gro...
samples/apps/list_group_members.py:78: def main():
docstring

http://codereview.appspot.com/5536049/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »