コード例 #1
0
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")
コード例 #2
0
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")
コード例 #3
0
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})
コード例 #4
0
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)
    )