ChoreoService

new ChoreoService()

Service for managing choreographies, participants, and positions.

Members

matTypeOptions

Get mat type options for choreography creation.

Methods

addParticipant(choreoId, MemberId, color) → {Promise.<Object>}

Add a participant to a choreography.

Parameters:
NameTypeDescription
choreoIdstring

ID of the choreography

MemberIdstring

ID of the member to add

colorstring

Color for the participant

Returns:

Added participant

Type: 
Promise.<Object>

changeLength(choreoId, counts) → {Promise.<Object>}

Change the length (counts) of a choreography.

Parameters:
NameTypeDescription
choreoIdstring

ID of the choreography

countsnumber

New length in counts

Returns:

Updated choreography

Type: 
Promise.<Object>

changeMatType(choreoId, matType) → {Promise.<Object>}

Change the mat type of a choreography.

Parameters:
NameTypeDescription
choreoIdstring

ID of the choreography

matTypestring

New mat type

Returns:

Updated choreography

Type: 
Promise.<Object>

changeName(choreoId, name) → {Promise.<Object>}

Change the name of a choreography.

Parameters:
NameTypeDescription
choreoIdstring

ID of the choreography

namestring

New name for the choreography

Returns:

Updated choreography

Type: 
Promise.<Object>

changeParticipantColor(choreoId, participantId, color) → {Promise.<Object>}

Change the color of a participant in a choreography.

Parameters:
NameTypeDescription
choreoIdstring

ID of the choreography

participantIdstring

ID of the participant

colorstring

New color for the participant

Returns:

Updated participant

Type: 
Promise.<Object>

create(name, counts, matType, seasonTeamId, participants) → {Promise.<Object>}

Create a new choreography.

Parameters:
NameTypeDescription
namestring

Name of the choreography

countsnumber

Length of the choreography in counts

matTypestring

Mat type for the choreography

seasonTeamIdstring

ID of the season team

participantsArray

Array of participant objects

Returns:

Created choreography

Type: 
Promise.<Object>

getById(choreoId) → {Promise.<Object>}

Get a choreography by its ID.

Parameters:
NameTypeDescription
choreoIdstring

ID of the choreography

Returns:

Choreography object

Type: 
Promise.<Object>

getByTeam(teamId) → {Promise.<Array>}

Get all choreographies for a team.

Parameters:
NameTypeDescription
teamIdstring

ID of the team

Returns:

Array of choreographies

Type: 
Promise.<Array>

getPositionsFromChoreoAndCount(choreo, count, teamMembers) → {Array}

Get positions for all team members for a given count in a choreography.

Parameters:
NameTypeDescription
choreoObject

Choreography object

countnumber

Count for which to get positions

teamMembersArray

Array of team member objects

Returns:

Array of position objects

Type: 
Array

remove(choreoId) → {Promise}

Remove a choreography by its ID.

Parameters:
NameTypeDescription
choreoIdstring

ID of the choreography to remove

Returns:
Type: 
Promise

removeParticipant(choreoId, MemberId) → {Promise}

Remove a participant from a choreography.

Parameters:
NameTypeDescription
choreoIdstring

ID of the choreography

MemberIdstring

ID of the member to remove

Returns:
Type: 
Promise

replaceParticipant(choreoId, memberToRemoveId, memberToAddId) → {Promise.<Object>}

Replace a participant in a choreography.

Parameters:
NameTypeDescription
choreoIdstring

ID of the choreography

memberToRemoveIdstring

ID of the member to remove

memberToAddIdstring

ID of the member to add

Returns:

Updated participant list

Type: 
Promise.<Object>