Set a take the person picked as the cover or tall cover
curl --request POST \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/covers/takes/{take}/set \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/covers/takes/{take}/set', 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/takes/{take}/set"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"media": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "cover",
"status": "pending",
"url": "<string>",
"levels": [
{
"width": 123,
"url": "<string>"
}
],
"content_type": "<string>",
"sha256": "<string>",
"size": 123,
"width": 123,
"height": 123,
"alt": "<string>",
"error": "<string>",
"position": 123,
"generated": true,
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "<string>"
},
"allowance": {
"free": true,
"note": "<string>",
"takes_per_game": 123,
"fixes_per_game": 123,
"takes_used": 123,
"fixes_used": 123,
"takes_left": 123,
"fixes_left": 123,
"stopped": "<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
Set a take the person picked as the cover or tall cover
A wide take becomes the cover and a tall one the tall cover, replacing the old one once it’s ready. It’s published like any media: processing for a few seconds while Patch makes its copies, then ready. It’s marked as made by an image model (generated). Only set one the person picked.
POST
/
projects
/
{owner}
/
{slug}
/
covers
/
takes
/
{take}
/
set
Set a take the person picked as the cover or tall cover
curl --request POST \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/covers/takes/{take}/set \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/covers/takes/{take}/set', 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/takes/{take}/set"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"media": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "cover",
"status": "pending",
"url": "<string>",
"levels": [
{
"width": 123,
"url": "<string>"
}
],
"content_type": "<string>",
"sha256": "<string>",
"size": 123,
"width": 123,
"height": 123,
"alt": "<string>",
"error": "<string>",
"position": 123,
"generated": true,
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "<string>"
},
"allowance": {
"free": true,
"note": "<string>",
"takes_per_game": 123,
"fixes_per_game": 123,
"takes_used": 123,
"fixes_used": 123,
"takes_left": 123,
"fixes_left": 123,
"stopped": "<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>"
}
}