MCPcopy Create free account
hub / github.com/dank/rlapi / StartMatchmaking

Method StartMatchmaking

matchmaking.go:45–62  ·  view source on GitHub ↗

StartMatchmaking starts matchmaking for given playlists, returns the estimated queue time.

(ctx context.Context, playlists []int, region []MatchmakingRegion, disableCrossplay bool, partyID PartyID, partyMembers []PlayerID)

Source from the content-addressed store, hash-verified

43
44// StartMatchmaking starts matchmaking for given playlists, returns the estimated queue time.
45func (p *PsyNetRPC) StartMatchmaking(ctx context.Context, playlists []int, region []MatchmakingRegion, disableCrossplay bool, partyID PartyID, partyMembers []PlayerID) (int, error) {
46 request := StartMatchmakingRequest{
47 Regions: region,
48 Playlists: playlists,
49 SecondsSearching: 1,
50 CurrentServerID: "",
51 DisableCrossplay: disableCrossplay,
52 PartyID: partyID,
53 PartyMembers: partyMembers,
54 }
55
56 var result StartMatchmakingResponse
57 err := p.sendRequestSync(ctx, "Matchmaking/StartMatchmaking v2", request, &result)
58 if err != nil {
59 return 0, err
60 }
61 return result.EstimatedQueueTime, nil
62}
63
64// PlayerCancelMatchmaking cancels ongoing matchmaking for the authenticated player.
65func (p *PsyNetRPC) PlayerCancelMatchmaking(ctx context.Context) error {

Callers 1

allMatchmakingFunction · 0.80

Calls 1

sendRequestSyncMethod · 0.95

Tested by

no test coverage detected