ChoreoService
Source: ChoreoService.ts:4
Service for managing choreographies, participants, and positions.
Constructor
new ChoreoService(): ChoreoServiceInstance Methods
getByTeam(teamId: string): Promise.<Array>
Get all choreographies for a team.
Parameters
teamId(string) — ID of the team
Returns
Promise.<Array>— Array of choreographies
getById(choreoId: string): Promise.<Object>
Get a choreography by its ID.
Parameters
choreoId(string) — ID of the choreography
Returns
Promise.<Object>— Choreography object
changeName(choreoId: string, name: string): Promise.<Object>
Change the name of a choreography.
Parameters
choreoId(string) — ID of the choreographyname(string) — New name for the choreography
Returns
Promise.<Object>— Updated choreography
changeLength(choreoId: string, counts: number): Promise.<Object>
Change the length (counts) of a choreography.
Parameters
choreoId(string) — ID of the choreographycounts(number) — New length in counts
Returns
Promise.<Object>— Updated choreography
changeMatType(
choreoId: string,
matType: string,
): Promise.<Object>
Change the mat type of a choreography.
Parameters
choreoId(string) — ID of the choreographymatType(string) — New mat type
Returns
Promise.<Object>— Updated choreography
addParticipant(
choreoId: string,
MemberId: string,
color: string,
): Promise.<Object>
Add a participant to a choreography.
Parameters
choreoId(string) — ID of the choreographyMemberId(string) — ID of the member to addcolor(string) — Color for the participant
Returns
Promise.<Object>— Added participant
removeParticipant(choreoId: string, MemberId: string): Promise
Remove a participant from a choreography.
Parameters
choreoId(string) — ID of the choreographyMemberId(string) — ID of the member to remove
Returns
Promise
replaceParticipant(
choreoId: string,
memberToRemoveId: string,
memberToAddId: string,
): Promise.<Object>
Replace a participant in a choreography.
Parameters
choreoId(string) — ID of the choreographymemberToRemoveId(string) — ID of the member to removememberToAddId(string) — ID of the member to add
Returns
Promise.<Object>— Updated participant list
changeParticipantColor(
choreoId: string,
participantId: string,
color: string,
): Promise.<Object>
Change the color of a participant in a choreography.
Parameters
choreoId(string) — ID of the choreographyparticipantId(string) — ID of the participantcolor(string) — New color for the participant
Returns
Promise.<Object>— Updated participant
create(
name: string,
counts: number,
matType: string,
seasonTeamId: string,
participants: Array,
): Promise.<Object>
Create a new choreography.
Parameters
name(string) — Name of the choreographycounts(number) — Length of the choreography in countsmatType(string) — Mat type for the choreographyseasonTeamId(string) — ID of the season teamparticipants(Array) — Array of participant objects
Returns
Promise.<Object>— Created choreography
remove(choreoId: string): Promise
Remove a choreography by its ID.
Parameters
choreoId(string) — ID of the choreography to remove
Returns
Promise
getPositionsFromChoreoAndCount(
choreo: Object,
count: number,
teamMembers: Array,
): Array
Get positions for all team members for a given count in a choreography.
Parameters
choreo(Object) — Choreography objectcount(number) — Count for which to get positionsteamMembers(Array) — Array of team member objects
Returns
Array— Array of position objects
Instance Fields
matTypeOptions
Get mat type options for choreography creation.
Returns
Array— Array of mat type option objects