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 |
Members
name :string
name of the User
Type:
- string
Methods
addProject(projectname) → {Promise.<Project, error>}
Adds a project.
Parameters:
| Name | Type | Description |
|---|---|---|
projectname |
string | name of the new project |
Returns:
- Type
- Promise.<Project, error>
delete() → {Promise.<void, error>}
Deletes the user.
Returns:
- Type
- Promise.<void, error>
deleteProject(projectname) → {Promise.<void, error>}
Deletes a project.
Parameters:
| Name | Type | Description |
|---|---|---|
projectname |
string | name of the project |
Returns:
- Type
- Promise.<void, error>
getProjects() → {Promise.<Array.<Project>, error>}
Get the projects of the user.
Returns:
- Type
- Promise.<Array.<Project>, error>