Methods
-
.create(dict)
-
sets debaters to a team.
Attention: It throws an error if the specified team has debaters.Parameters:
Name Type Description dict
Properties
Name Type Description id
Number id of the team to set debaters
debaters
Array.<Number> debaters to set
r
Number round where the team has the debaters
Throws:
-
AlreadyExists
- Type
- Promise
Returns:
Created team
- Type
- Promise
-
-
.delete(options)
-
deletes debaters from specified team.
Attention: It throws an error if the specified team does not exist.Parameters:
Name Type Description options
Properties
Name Type Description id
Number id of the team to delete
r
Number round where the team has the debaters
Throws:
-
DoesNotExist
- Type
- Promise
Returns:
Team
- Type
- Promise
-
-
.find(options)
-
finds on specified condition(No side effect)
Parameters:
Name Type Description options
Properties
Name Type Argument Description id
Number <optional>
id of the team to delete
r
Number <optional>
round where the team has the debaters
debaters
Array.<Number> <optional>
debaters
Returns:
Teams
- Type
- Promise
-
.read()
-
returns teams to debaters(No side effect)
Returns:
Teams to debaters
- Type
- Promise
-
.update(options)
-
updates debaters of specified team
Attention: It throws an error if the specified team does not exist.Parameters:
Name Type Description options
Properties
Name Type Description id
Number id of the team
r
Number round where the team has the debaters
debaters
Array.<Number> debaters of the team
Throws:
DoesNotExist
Returns:
Team
- Type
- Promi