game-common / pragma.party / PartyApi /

PartyApi #

class PartyApi(service: Service)

The backend entrypoint for sending service RPCs to the PartyService.

Constructors #

PartyApi

fun PartyApi(service: Service)

Functions #

NameSummary

get

suspend fun get(partyId: <ERROR CLASS>): PragmaResult<PartyCommon.PartySummary, PragmaFailure>

Request to get a party

getForPlayer

suspend fun getForPlayer(playerId: <ERROR CLASS>): PragmaResult<PartyCommon.PartySummary?, PragmaFailure>

Request to get the party that a player is in.

getIdForPlayer

suspend fun getIdForPlayer(playerId: <ERROR CLASS>): PragmaResult<<ERROR CLASS>?, PragmaFailure>

Get the current party id for a player. Null if no current party id.

update

suspend fun update(partyId: <ERROR CLASS>, requestExt: ExtBackendUpdatePartyRequest): PragmaResult<Unit, PragmaFailure>

Request to update a Party. Triggers the PartyPlugin.handleBackendUpdateRequest plugin method.