Ejemplo n.º 1
0
def deleteGroup(groupName):
    """Delete a group from the database
                Args:
                        Groupname - String - the name of the group
                Return:
                        None 
        """
    Group.deleteGroup(groupName)
Ejemplo n.º 2
0
def createGroup(name, created_by):
    """Creates a group
        Args:
                name - String - Name of the group
                created_by  -String  - Usename of the group creator
        Return:
                None
        Rasies:

        """
    Group.createGroup(name, created_by)
Ejemplo n.º 3
0
def getAGroupInfo(group_id):
    """Gets the id, name, created_by attributes of a group
                Args:
                        Groupid - int - the group id number
                Return:
                        id, name, created_by of the group 
        """
    return Group.getAGroupInfo(group_id)
Ejemplo n.º 4
0
def Group_created_by(Groupname):
    """Gets the name of the user that created the group
                Args:
                        Groupname - String - the name of the group
                Return:
                        Usename of the group creator 
        """
    return Group.Group_created_by(Groupname)
Ejemplo n.º 5
0
def getGroups():
    """Gets the all the groups in the database
                Args:
                        None
                Return:
                        List of groups created 
                        
        """
    return Group.getGroups()
Ejemplo n.º 6
0
def getGroupId(groupName):
    """This function gets a group id number
    
                args:
                        name    String      the group name

                Return:
                        GroupId     Int     the group id number
        """
    return Group.getGroupId(str(groupName))
Ejemplo n.º 7
0
def AddMemberToGroup(group_id, user_id):
    """This function adds a user to a group

                args:
                        group_id    Int     the group id number
                        user_id     Int     the user id number
    
                Return:
                        None
        """
    Group.AddMemberToGroup(group_id, user_id)
Ejemplo n.º 8
0
def getGroupMembers(group_id):
    """This function gets the user_id of a members of a particular group

                args:
                        group_id    int     the group id number

                Return:
                        members     List    A list containing (membership_id, user-id, group_id) attributes of a user
    
    """
    return Group.getGroupMembers(group_id)