update the game's game logic
Developing
PATCH
/games/{id}/game_logic
Request
Authorization
Add the parameter
Authorization
to Headers,whose value is to concatenate the Token after the Bearer.Example:
Authorization: Bearer ********************
Path Params
id
integer
required
Example:
5
Header Params
Authorization
string
optional
Example:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJleHAiOjE3MDMxNTIzMTQsImlzcyI6Imp3dCJ9.7JsOxTvEkQ07yJPX7ZqJD15y3dySUA_1am8nOLCaOTk
Body Params multipart/form-data
build_game_logic_dockerfile
string
optional
Example:
aa
run_game_logic_dockerfile
string
optional
Example:
aa
game_logic_file
file
optional
Example:
[]
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH '/games/5/game_logic' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJleHAiOjE3MDMxNTIzMTQsImlzcyI6Imp3dCJ9.7JsOxTvEkQ07yJPX7ZqJD15y3dySUA_1am8nOLCaOTk'
Responses
🟢200OK
application/json
Body
base_contest
object (base_contest_detail_for_admins)
required
id
integer
required
game_id
integer
required
states
object (contest_states)
required
contest_assets
object
required
id
integer
required
game_id
my_privilege
enum<string>
required
>= 0 characters
Allowed values:
adminregistered
metadata
object (metadata)
required
cover_url
string
required
readme
string
required
title
string
required
game_assets
object
required
game_logic
object
required
match_detail
object
required
admins
array[object (user_base) {3}]
required
avatar_url
string
required
nickname
string
required
username
string
required
Example
{
"base_contest": {
"id": 0,
"game_id": 0,
"states": {
"assign_ai_enabled": true,
"commit_ai_enabled": true,
"contest_script_environment_enabled": true,
"private_match_enabled": true,
"public_match_enabled": true,
"test_match_enabled": true
},
"contest_assets": {
"contest_script": "string",
"sdks": [
{
"id": 0,
"name": "string",
"readme": "string",
"build_ai": {
"status": "pending"
},
"run_ai": {
"status": "pending"
}
}
]
}
},
"id": 0,
"my_privilege": "admin",
"metadata": {
"cover_url": "string",
"readme": "string",
"title": "string"
},
"game_assets": {
"game_logic": {
"build_game_logic": {
"dockerfile": "string",
"status": {
"state": "pending",
"msg": "string"
}
},
"run_game_logic": {
"dockerfile": "string",
"status": {
"state": "pending",
"msg": "string"
}
},
"status": {
"state": "pending",
"msg": "string"
}
},
"match_detail": {
"template": "string"
}
},
"admins": [
{
"avatar_url": "string",
"nickname": "string",
"username": "string"
}
]
}