StartMatchmaking starts matchmaking for given playlists, returns the estimated queue time.
(ctx context.Context, playlists []int, region []MatchmakingRegion, disableCrossplay bool, partyID PartyID, partyMembers []PlayerID)
| 43 | |
| 44 | // StartMatchmaking starts matchmaking for given playlists, returns the estimated queue time. |
| 45 | func (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. |
| 65 | func (p *PsyNetRPC) PlayerCancelMatchmaking(ctx context.Context) error { |
no test coverage detected