Begin a Build's client pack
Requires builds.write for the Game and a ready Build.
curl --request POST \
--url https://api.summer.games/v1/management/games/{gameId}/builds/{buildId}/client-packages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientSha256": "<string>",
"clientSize": 21474836530,
"mainScene": "<string>",
"version": "<string>",
"compositionPath": "<string>"
}
'import requests
url = "https://api.summer.games/v1/management/games/{gameId}/builds/{buildId}/client-packages"
payload = {
"clientSha256": "<string>",
"clientSize": 21474836530,
"mainScene": "<string>",
"version": "<string>",
"compositionPath": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clientSha256: '<string>',
clientSize: 21474836530,
mainScene: '<string>',
version: '<string>',
compositionPath: '<string>'
})
};
fetch('https://api.summer.games/v1/management/games/{gameId}/builds/{buildId}/client-packages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.summer.games/v1/management/games/{gameId}/builds/{buildId}/client-packages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clientSha256' => '<string>',
'clientSize' => 21474836530,
'mainScene' => '<string>',
'version' => '<string>',
'compositionPath' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.summer.games/v1/management/games/{gameId}/builds/{buildId}/client-packages"
payload := strings.NewReader("{\n \"clientSha256\": \"<string>\",\n \"clientSize\": 21474836530,\n \"mainScene\": \"<string>\",\n \"version\": \"<string>\",\n \"compositionPath\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.summer.games/v1/management/games/{gameId}/builds/{buildId}/client-packages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clientSha256\": \"<string>\",\n \"clientSize\": 21474836530,\n \"mainScene\": \"<string>\",\n \"version\": \"<string>\",\n \"compositionPath\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.summer.games/v1/management/games/{gameId}/builds/{buildId}/client-packages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clientSha256\": \"<string>\",\n \"clientSize\": 21474836530,\n \"mainScene\": \"<string>\",\n \"version\": \"<string>\",\n \"compositionPath\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"package": {
"id": "<string>",
"gameId": "<string>",
"buildId": "<string>",
"clientSha256": "<string>",
"clientSize": 21474836530,
"mainScene": "<string>",
"version": "<string>",
"declarationSha256": "<string>",
"state": "awaiting_upload",
"createdAt": "2023-11-07T05:31:56Z",
"compositionPath": "<string>",
"verificationError": "package_not_verified",
"verifications": [
{
"id": "<string>",
"gameId": "<string>",
"buildId": "<string>",
"platform": "android",
"uploadId": "<string>",
"state": "checking",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"qualificationId": "<string>",
"errorCode": "<string>",
"errorMessage": "<string>",
"completedAt": "2023-11-07T05:31:56Z"
}
],
"completedAt": "2023-11-07T05:31:56Z"
},
"upload": {
"partSizeBytes": 67108864,
"partCount": 320
}
}Authorizations
Your Summer account token. An agent gets it by signing in with OAuth: summer login --store in the Summer CLI, or the Summer connector in an AI app. Agent tokens can call only the operations on these pages. Publishing needs an approval from the game's owner first.
Body
A Build's one client pack. Its declaration is immutable; a client version names exactly one pack for the Game.
^sha256:[0-9a-f]{64}$100 <= x <= 42949672960Exact res:// .tscn scene: in a Build WorldDefinition for a game with a host, or the Build client entry point for one without.
Client version: canonical vMAJOR.MINOR.PATCH with optional positive -rREVISION. Independent of the server version.
Exact res:// .tres composition in the same WorldDefinition. Required for a game with a host; omitted for one without.
curl --request POST \
--url https://api.summer.games/v1/management/games/{gameId}/builds/{buildId}/client-packages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientSha256": "<string>",
"clientSize": 21474836530,
"mainScene": "<string>",
"version": "<string>",
"compositionPath": "<string>"
}
'import requests
url = "https://api.summer.games/v1/management/games/{gameId}/builds/{buildId}/client-packages"
payload = {
"clientSha256": "<string>",
"clientSize": 21474836530,
"mainScene": "<string>",
"version": "<string>",
"compositionPath": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clientSha256: '<string>',
clientSize: 21474836530,
mainScene: '<string>',
version: '<string>',
compositionPath: '<string>'
})
};
fetch('https://api.summer.games/v1/management/games/{gameId}/builds/{buildId}/client-packages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.summer.games/v1/management/games/{gameId}/builds/{buildId}/client-packages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clientSha256' => '<string>',
'clientSize' => 21474836530,
'mainScene' => '<string>',
'version' => '<string>',
'compositionPath' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.summer.games/v1/management/games/{gameId}/builds/{buildId}/client-packages"
payload := strings.NewReader("{\n \"clientSha256\": \"<string>\",\n \"clientSize\": 21474836530,\n \"mainScene\": \"<string>\",\n \"version\": \"<string>\",\n \"compositionPath\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.summer.games/v1/management/games/{gameId}/builds/{buildId}/client-packages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clientSha256\": \"<string>\",\n \"clientSize\": 21474836530,\n \"mainScene\": \"<string>\",\n \"version\": \"<string>\",\n \"compositionPath\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.summer.games/v1/management/games/{gameId}/builds/{buildId}/client-packages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clientSha256\": \"<string>\",\n \"clientSize\": 21474836530,\n \"mainScene\": \"<string>\",\n \"version\": \"<string>\",\n \"compositionPath\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"package": {
"id": "<string>",
"gameId": "<string>",
"buildId": "<string>",
"clientSha256": "<string>",
"clientSize": 21474836530,
"mainScene": "<string>",
"version": "<string>",
"declarationSha256": "<string>",
"state": "awaiting_upload",
"createdAt": "2023-11-07T05:31:56Z",
"compositionPath": "<string>",
"verificationError": "package_not_verified",
"verifications": [
{
"id": "<string>",
"gameId": "<string>",
"buildId": "<string>",
"platform": "android",
"uploadId": "<string>",
"state": "checking",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"qualificationId": "<string>",
"errorCode": "<string>",
"errorMessage": "<string>",
"completedAt": "2023-11-07T05:31:56Z"
}
],
"completedAt": "2023-11-07T05:31:56Z"
},
"upload": {
"partSizeBytes": 67108864,
"partCount": 320
}
}
