Change a game's settings
curl --request PATCH \
--url https://patch.gg/api/v1/games/{owner}/{slug}/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connects_to": [
"<string>"
],
"webrtc": {
"ice_servers": [
"<string>"
]
},
"players": {
"min": 500,
"max": 500
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
connects_to: ['<string>'],
webrtc: {ice_servers: ['<string>']},
players: {min: 500, max: 500}
})
};
fetch('https://patch.gg/api/v1/games/{owner}/{slug}/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://patch.gg/api/v1/games/{owner}/{slug}/settings"
payload = {
"connects_to": ["<string>"],
"webrtc": { "ice_servers": ["<string>"] },
"players": {
"min": 500,
"max": 500
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"connects_to": [
"<string>"
],
"webrtc": {
"ice_servers": [
"<string>"
]
},
"players": {
"min": 123,
"max": 123
},
"updated_at": "<string>"
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}Games
Change a game's settings
Only its team (an API key with publish). What’s left out stays as it was. connects_to and webrtc apply from the next release, which copies them as it’s published, so its review sees them and a rollback brings back each release’s own: Patch’s rooms and direct links need neither, only a server of the game’s own does.
PATCH
/
games
/
{owner}
/
{slug}
/
settings
Change a game's settings
curl --request PATCH \
--url https://patch.gg/api/v1/games/{owner}/{slug}/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connects_to": [
"<string>"
],
"webrtc": {
"ice_servers": [
"<string>"
]
},
"players": {
"min": 500,
"max": 500
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
connects_to: ['<string>'],
webrtc: {ice_servers: ['<string>']},
players: {min: 500, max: 500}
})
};
fetch('https://patch.gg/api/v1/games/{owner}/{slug}/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://patch.gg/api/v1/games/{owner}/{slug}/settings"
payload = {
"connects_to": ["<string>"],
"webrtc": { "ice_servers": ["<string>"] },
"players": {
"min": 500,
"max": 500
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"connects_to": [
"<string>"
],
"webrtc": {
"ice_servers": [
"<string>"
]
},
"players": {
"min": 123,
"max": 123
},
"updated_at": "<string>"
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}Body
application/json
Response
Its settings now