Class: User

User(name, del, getProjects, addProject, deleteProject)

new User(name, del, getProjects, addProject, deleteProject)

Creates an User object.
Parameters:
Name Type Description
name string name of the user
del function function to delete the user
getProjects function function to get the projects of the user
addProject function function to add a project
deleteProject function function to delete a project
Source:

Members

name :string

name of the User
Type:
  • string
Source:

Methods

addProject(projectname) → {Promise.<Project, error>}

Adds a project.
Parameters:
Name Type Description
projectname string name of the new project
Source:
Returns:
Type
Promise.<Project, error>

delete() → {Promise.<void, error>}

Deletes the user.
Source:
Returns:
Type
Promise.<void, error>

deleteProject(projectname) → {Promise.<void, error>}

Deletes a project.
Parameters:
Name Type Description
projectname string name of the project
Source:
Returns:
Type
Promise.<void, error>

getProjects() → {Promise.<Array.<Project>, error>}

Get the projects of the user.
Source:
Returns:
Type
Promise.<Array.<Project>, error>