new ChoreoService()
Service for managing choreographies, participants, and positions.
- Source
Members
matTypeOptions
Get mat type options for choreography creation.
- Source
Methods
addParticipant(choreoId, MemberId, color) → {Promise.<Object>}
Add a participant to a choreography.
| Name | Type | Description |
|---|---|---|
choreoId | string | ID of the choreography |
MemberId | string | ID of the member to add |
color | string | Color for the participant |
Added participant
- Type:
- Promise.<Object>
changeLength(choreoId, counts) → {Promise.<Object>}
Change the length (counts) of a choreography.
| Name | Type | Description |
|---|---|---|
choreoId | string | ID of the choreography |
counts | number | New length in counts |
- Source
Updated choreography
- Type:
- Promise.<Object>
changeMatType(choreoId, matType) → {Promise.<Object>}
Change the mat type of a choreography.
| Name | Type | Description |
|---|---|---|
choreoId | string | ID of the choreography |
matType | string | New mat type |
- Source
Updated choreography
- Type:
- Promise.<Object>
changeName(choreoId, name) → {Promise.<Object>}
Change the name of a choreography.
| Name | Type | Description |
|---|---|---|
choreoId | string | ID of the choreography |
name | string | New name for the choreography |
- Source
Updated choreography
- Type:
- Promise.<Object>
changeParticipantColor(choreoId, participantId, color) → {Promise.<Object>}
Change the color of a participant in a choreography.
| Name | Type | Description |
|---|---|---|
choreoId | string | ID of the choreography |
participantId | string | ID of the participant |
color | string | New color for the participant |
Updated participant
- Type:
- Promise.<Object>
create(name, counts, matType, seasonTeamId, participants) → {Promise.<Object>}
Create a new choreography.
| Name | Type | Description |
|---|---|---|
name | string | Name of the choreography |
counts | number | Length of the choreography in counts |
matType | string | Mat type for the choreography |
seasonTeamId | string | ID of the season team |
participants | Array | Array of participant objects |
Created choreography
- Type:
- Promise.<Object>
getById(choreoId) → {Promise.<Object>}
Get a choreography by its ID.
| Name | Type | Description |
|---|---|---|
choreoId | string | ID of the choreography |
- Source
Choreography object
- Type:
- Promise.<Object>
getByTeam(teamId) → {Promise.<Array>}
Get all choreographies for a team.
| Name | Type | Description |
|---|---|---|
teamId | string | ID of the team |
- Source
Array of choreographies
- Type:
- Promise.<Array>
getPositionsFromChoreoAndCount(choreo, count, teamMembers) → {Array}
Get positions for all team members for a given count in a choreography.
| Name | Type | Description |
|---|---|---|
choreo | Object | Choreography object |
count | number | Count for which to get positions |
teamMembers | Array | Array of team member objects |
Array of position objects
- Type:
- Array
remove(choreoId) → {Promise}
Remove a choreography by its ID.
| Name | Type | Description |
|---|---|---|
choreoId | string | ID of the choreography to remove |
- Type:
- Promise
removeParticipant(choreoId, MemberId) → {Promise}
Remove a participant from a choreography.
| Name | Type | Description |
|---|---|---|
choreoId | string | ID of the choreography |
MemberId | string | ID of the member to remove |
- Type:
- Promise
replaceParticipant(choreoId, memberToRemoveId, memberToAddId) → {Promise.<Object>}
Replace a participant in a choreography.
| Name | Type | Description |
|---|---|---|
choreoId | string | ID of the choreography |
memberToRemoveId | string | ID of the member to remove |
memberToAddId | string | ID of the member to add |
Updated participant list
- Type:
- Promise.<Object>