Get where to upload a still of the game, to make covers from
curl --request POST \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/covers/stills \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sha256": "<string>",
"size": 123,
"content_type": "image/png"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({sha256: '<string>', size: 123, content_type: 'image/png'})
};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/covers/stills', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://patch.gg/api/v1/projects/{owner}/{slug}/covers/stills"
payload = {
"sha256": "<string>",
"size": 123,
"content_type": "image/png"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"still": {
"upload": "<string>"
},
"upload": {
"method": "PUT",
"url": "<string>",
"headers": {},
"expires_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>"
}
}Covers
Get where to upload a still of the game, to make covers from
Send its SHA-256, size and type (PNG, JPEG or WebP, at most 10 MB). Upload the bytes to the returned URL with exactly its headers, then pass still to start covers. It’s private, and goes after a day. Null upload: it’s there already.
POST
/
projects
/
{owner}
/
{slug}
/
covers
/
stills
Get where to upload a still of the game, to make covers from
curl --request POST \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/covers/stills \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sha256": "<string>",
"size": 123,
"content_type": "image/png"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({sha256: '<string>', size: 123, content_type: 'image/png'})
};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/covers/stills', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://patch.gg/api/v1/projects/{owner}/{slug}/covers/stills"
payload = {
"sha256": "<string>",
"size": 123,
"content_type": "image/png"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"still": {
"upload": "<string>"
},
"upload": {
"method": "PUT",
"url": "<string>",
"headers": {},
"expires_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