new PositionService()
Service for managing positions in a lineup.
Methods
create(lineupId, x, y, MemberId, timeOfManualUpdate) → {Promise.<Object>}
Create a new position in a lineup.
Parameters:
| Name | Type | Description |
|---|---|---|
lineupId | string | ID of the lineup |
x | number | X coordinate of the position |
y | number | Y coordinate of the position |
MemberId | string | ID of the member for this position |
timeOfManualUpdate | string | manually specified time of update |
Returns:
Created position
- Type:
- Promise.<Object>
getByLineupId(lineupId) → {Promise.<Array>}
Get all positions for a lineup.
Parameters:
| Name | Type | Description |
|---|---|---|
lineupId | string | ID of the lineup |
Returns:
Array of position objects
- Type:
- Promise.<Array>
remove(positionId) → {Promise.<Object>}
Remove a position by its ID.
Parameters:
| Name | Type | Description |
|---|---|---|
positionId | string | ID of the position to remove |
Returns:
Response data
- Type:
- Promise.<Object>
update(lineupId, positionId, x, y, {timeOfManualUpdate}) → {Promise.<Object>}
Update a position in a lineup.
Parameters:
| Name | Type | Description |
|---|---|---|
lineupId | string | ID of the lineup |
positionId | string | ID of the position to update |
x | number | X coordinate of the position |
y | number | Y coordinate of the position |
{timeOfManualUpdate} | string | manually specified time of update |
Returns:
Updated position
- Type:
- Promise.<Object>