Custom Games
You can join a player into a custom game and subscribe to changes in custom game state over WebSocket.
POST
Join a player into a custom queue
https://yunite.xyz/api/v3/guild/{guildId}/customs/current/join/{userId}
- Request
- Response
Path Parameters
Name | Value type | Description |
---|---|---|
guildId | Guild ID Snowflake | The ID of the guild you want to access |
userId | User ID Snowflake | The Discord ID of the user that should be joined into the current queue. |
- Schema
- Example
{ "type": "object", "properties": { "status": { "type": "string", "value": "one of ['SUCCESS', 'NO_OPEN_QUEUE', 'PLAYER_NOT_FOUND', 'PLAYER_CONFIRMATION_REQUIRED', 'PLAYER_NOT_LINKED']" }, "message": { "type": "string", "value": "a message explaining the status value" }, "url": { "type": "string", "value": "if status == PLAYER_CONFIRMATION_REQUIRED, this will contain an URL you can forward the user to to request the confirmation. Absent with other status values.", "optional": true } } }
{ "status": "SUCCESS", "message": "Successfully joined the player to the queue." }
info
Please review our information on WebSocket OP-Codes!
WSS
Subscribe to state changes
wss://yunite.xyz/api/v3/guild/{guildId}/customs/current/stream
- Init
- Messages
Path Parameters
Name | Value type | Description |
---|---|---|
guildId | Guild ID Snowflake | The ID of the guild you want to access |
- Schema
- Example
{ "type": "object", "properties": { "stateId": { "type": "string", "value": "a unique identifier of this state object; creating a new match causes a new state object to be created" }, "hostId": { "type": "string?", "value": "the Discord ID of the current custom host, if present" }, "hostName": { "type": "string?", "value": "the Discord Name of the current custom host, if present" }, "state": { "type": "string", "value": "one of ['READY', 'SIGNUP_OPEN', 'DISPATCHED', 'MATCH_STARTED_EARLY', 'KEYS_DONE_AWAITING_COOLDOWN', 'FINISHED_PROCESS_START_MATCH', 'FINISHED_AND_TRACKING']" }, "customCode": { "type": "string?", "value": "the current custom code, if present" }, "dispatchedToParties": { "type": "int", "value": "the amount of parties this code has been successfully dispatched to" }, "dispatchedToUsers": { "type": "int", "value": "the amount of ingame players this code has been successfully dispatched to" }, "signedUpUsers": { "type": "array", "itemSchema": { "type": "string", "value": "linked users that are queued for this key distribution process; does not mean that they will necessarily get the code in the end" } }, "selectedPlayers": { "type": "array", "itemSchema": { "type": "object", "properties": { "id": { "type": "string", "value": "Discord ID of the player" }, "name": { "type": "string", "value": "Discord name of the player" }, "epic": { "type": "string", "value": "Epic name of the player" }, "avatarUrl": { "type": "string", "value": "avatar URL of the player" }, "state": { "type": "string", "value": "one of ['START', 'FRIEND_ADDED', 'INVITED', 'DONE', 'REJECTED', 'TIMEOUT']" }, "rejectedReason": { "type": "string?", "value": "the reason why the player has been rejected if state === REJECTED; empty otherwise" }, "members": { "type": "array", "itemSchema": { "type": "object", "properties": { "playerId": { "type": "string", "value": "Hex Epic ID of player" }, "presenceReceivedOnce": { "type": "boolean", "value": "true if we ever saw a trackable state of this user; will be false forever if Yunite is not tracking this player" }, "alive": { "type": "boolean", "value": "true if we didn't see the player die yet; will be true forever if Yunite is not tracking this player" }, "session": { "type": "string?", "value": "the session of the player; will be null forever if Yunite is not tracking this player" }, "kills": { "type": "int", "value": "amount of kills of the player; will be 0 forever if Yunite is not tracking this player" }, "playersAlive": { "type": "int", "value": "amount of players alive as reported by this players client; will be 100 forever if Yunite is not tracking this client" } } } }, "lastPlayerStateChange": { "type": "long", "value": "epoch millisecond timestamp that indicates the last relevant state update" } } } }, "activeTemplate": { "type": "object", "properties": { "ID": { "type": "string", "value": "ID of this template" }, "name": { "type": "string", "value": "name of this template" }, "type": { "type": "string", "value": "game mode identifier" }, "region": { "type": "string", "value": "one of ['NAE', 'NAW', 'EU', 'OCE', 'BR', 'ASIA', 'ME']" }, "ruleText": { "type": "string?", "value": "rules of this template" }, "memberCountAbsolute": { "type": "boolean", "value": "false if fill is allowed; false otherwise" }, "liveTrackingEnabled": { "type": "boolean", "value": "true if live match tracking is enabled; false otherwise" }, "leakDetectionEnabled": { "type": "boolean", "value": "true if leak detection is enabled; false otherwise" }, "checkForBannedPlayers": { "type": "boolean", "value": "true if ingame bots are checking party members for banned players; false otherwise" }, "requireAllPlayersLinked": { "type": "boolean", "value": "true if ingame bots are checking party members to be linked on the guild; false otherwise" }, "preferredRoles": { "type": "array", "itemSchema": { "type": "string", "value": "Discord Role ID" } }, "allowedPlatforms": { "type": "array", "itemSchema": { "type": "string", "value": "one of ['PC', 'PS4', 'XB1', 'SWITCH', 'MOBILE']. Note: PS4/XB1 may include next gen console players" } }, "roleToPing": { "type": "string?", "value": "role that will be pinged if sign up phase opened" }, "resultChannelID": { "type": "string?", "value": "channel for matchmaking results" }, "signUpChannelID": { "type": "string", "value": "channel for the sign up message" }, "leakDetectionChannelID": { "type": "string?", "value": "channel for potential leak notifications" }, "liveTrackingChannelID": { "type": "string?", "value": "channel in which Yunite posts the live tracking embed" }, "maxPlayers": { "type": "int", "value": "amount of max players receiving the code (note: not parties or signed up users, we mean overall ingame players)" } } } } }
"Please play a match to get an example ..."