PositionService
Source: PositionService.ts:3
Service for managing positions in a lineup.
Constructor
new PositionService(): PositionServiceInstance Methods
create(
lineupId: string,
x: number,
y: number,
MemberId: string,
timeOfManualUpdate: string,
): Promise.<Object>
Create a new position in a lineup.
Parameters
lineupId(string) — ID of the lineupx(number) — X coordinate of the positiony(number) — Y coordinate of the positionMemberId(string) — ID of the member for this positiontimeOfManualUpdate(string) — manually specified time of update
Returns
Promise.<Object>— Created position
getByLineupId(lineupId: string): Promise.<Array>
Get all positions for a lineup.
Parameters
lineupId(string) — ID of the lineup
Returns
Promise.<Array>— Array of position objects
update(
lineupId: string,
positionId: string,
x: number,
y: number,
{timeOfManualUpdate}: string,
): Promise.<Object>
Update a position in a lineup.
Parameters
lineupId(string) — ID of the lineuppositionId(string) — ID of the position to updatex(number) — X coordinate of the positiony(number) — Y coordinate of the position{timeOfManualUpdate}(string) — manually specified time of update
Returns
Promise.<Object>— Updated position
remove(positionId: string): Promise.<Object>
Remove a position by its ID.
Parameters
positionId(string) — ID of the position to remove
Returns
Promise.<Object>— Response data