PositionService

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:
NameTypeDescription
lineupIdstring

ID of the lineup

xnumber

X coordinate of the position

ynumber

Y coordinate of the position

MemberIdstring

ID of the member for this position

timeOfManualUpdatestring

manually specified time of update

Returns:

Created position

Type: 
Promise.<Object>

getByLineupId(lineupId) → {Promise.<Array>}

Get all positions for a lineup.

Parameters:
NameTypeDescription
lineupIdstring

ID of the lineup

Returns:

Array of position objects

Type: 
Promise.<Array>

remove(positionId) → {Promise.<Object>}

Remove a position by its ID.

Parameters:
NameTypeDescription
positionIdstring

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:
NameTypeDescription
lineupIdstring

ID of the lineup

positionIdstring

ID of the position to update

xnumber

X coordinate of the position

ynumber

Y coordinate of the position

{timeOfManualUpdate}string

manually specified time of update

Returns:

Updated position

Type: 
Promise.<Object>