def details(request): members = False group = None email = None if request.method == "GET": email = request.GET.get("email") if request.method == "POST": form = SearchForm(request.POST) if form.is_valid(): cd = form.cleaned_data email = cd["email"] else: form = SearchForm() if email: # group settings manager gm = GroupManager() service = gm.service() # build the groupsettings service connection try: group = service.groups().get( groupUniqueId=email, alt='json' ).execute() except Exception, e: if e.resp: group = e.resp.status else: group = e
def details(request): members = False group = None email = None if request.method == "GET": email = request.GET.get("email") if request.method == "POST": form = SearchForm(request.POST) if form.is_valid(): cd = form.cleaned_data email = cd["email"] else: form = SearchForm() if email: # group settings manager gm = GroupManager() service = gm.service() # build the groupsettings service connection try: group = service.groups().get(groupUniqueId=email, alt='json').execute() except Exception, e: if e.resp: group = e.resp.status else: group = e
def main(): """ Fetch and display all of the google groups from a given domain """ # group settings manager gm = GroupManager() # retrieve all groups in the domain group_list = gm.groups_list() # cycle through the groups for group in group_list: # fetch the group settings g = gm.group_settings(group["email"]) # fetch the group members members = gm.group_members(group["email"]) # fetch the group owner owner = gm.group_owner(members) if owner: owner = owner["email"] # dump print u"{}|{}|{}|{}|{}|{}|{}|{}|{}|{}".format( group["name"], owner, g["email"], g["whoCanJoin"], g["whoCanViewGroup"] , g["whoCanViewMembership"], g["whoCanPostMessage"], g["membersCanPostAsTheGroup"], g["whoCanContactOwner"], g["whoCanInvite"] ).encode("utf-8")
def main(): """ Fetch and display all of the google groups from a given domain """ # group settings manager gm = GroupManager() # retrieve all groups in the domain group_list = gm.groups_list() # cycle through the groups for group in group_list: # fetch the group settings g = gm.group_settings(group["email"]) # fetch the group members members = gm.group_members(group["email"]) # fetch the group owner owner = gm.group_owner(members) if owner: owner = owner["email"] # dump print u"{}|{}|{}|{}|{}|{}|{}|{}|{}|{}".format( group["name"], owner, g["email"], g["whoCanJoin"], g["whoCanViewGroup"], g["whoCanViewMembership"], g["whoCanPostMessage"], g["membersCanPostAsTheGroup"], g["whoCanContactOwner"], g["whoCanInvite"]).encode("utf-8")
def index(request): """ Fetch and display all of the google groups from a given domain """ # group settings manager gm = GroupManager() # retrieve all groups in the domain group_list = gm.groups_list() # cycle through the groups for group in group_list: # fetch the group settings group["settings"] = gm.group_settings(group["email"]) # fetch the group members group["members"] = gm.group_members(group["email"]) # fetch the group owner group["owner"] = gm.group_owner(group["members"]) return render_to_response( 'groups/home.html', { 'groups': group_list }, context_instance=RequestContext(request) )
def index(request): """ Fetch and display all of the google groups from a given domain """ # group settings manager gm = GroupManager() # retrieve all groups in the domain group_list = gm.groups_list() # cycle through the groups for group in group_list: # fetch the group settings group["settings"] = gm.group_settings(group["email"]) # fetch the group members group["members"] = gm.group_members(group["email"]) # fetch the group owner group["owner"] = gm.group_owner(group["members"]) return render(request, 'groups/home.html', {'groups': group_list})