Namespaces
Methods
-
.create(team [, force])
-
creates team.//TESTED//
Attention: It throws an error if the specified team already exists.Parameters:
Name Type Argument Default Description team
Properties
Name Type Argument Default Description id
Number id of the team to create
name
Number <optional>
"" name of the team to create
available
Number <optional>
true id of the team to create
force
Boolean <optional>
false if true, it creates the specified team regardless of wheter the name specified already exists
Throws:
-
AlreadyExists
- Type
- Promise
Returns:
Created team
- Type
- Promise.<Team>
-
-
.delete(team)
-
deletes specified team.//TESTED//
Attention: It throws an error if the specified team does not exist.Parameters:
Name Type Description team
Properties
Name Type Description id
Number id of the team to delete
Throws:
-
DoesNotExist
- Type
- Promise
Returns:
Deleted team
- Type
- Promise.<Team>
-
-
.find(team)
-
finds on specified condition(No side effect)//TESTED//
Parameters:
Name Type Description team
Properties
Name Type Argument Description id
Number <optional>
id of the team to find
name
Number <optional>
name of the team to find
available
Number <optional>
id of the team to find
Returns:
Teams
- Type
- Promise.<Array.<Team>>
-
.read()
-
returns all teams(No side effect)
Returns:
Teams
- Type
- Promise.<Array.<Team>>
-
.update(team)
-
checks whether specified team exists
Parameters:
Name Type Description team
Properties
Name Type Argument Description id
Number <optional>
id of the team to update
name
Number <optional>
name of the team to update
available
Number <optional>
id of the team to update
Throws:
DoesNotExist
Returns:
- Type
- Promise.<Boolean>
-
.update(team)
-
updates specified team//TESTED//
Attention: It throws an error if the specified team does not exist.Parameters:
Name Type Description team
Properties
Name Type Argument Default Description id
Number id of the team to update
name
Number <optional>
"" name of the team to update
available
Number <optional>
true id of the team to update
Throws:
DoesNotExist
Returns:
Updated team
- Type
- Promise.<Team>