The GitHub repository a project picks up releases from
curl --request GET \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/github \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/github', 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}/github"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"repository": "https://github.com/mira/lantern-run",
"files": [
"<string>"
],
"unpack": true,
"released_tag": "<string>",
"checked_at": "<string>",
"note": "<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>"
}
}Releases
The GitHub repository a project picks up releases from
GET
/
projects
/
{owner}
/
{slug}
/
github
The GitHub repository a project picks up releases from
curl --request GET \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/github \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/github', 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}/github"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"repository": "https://github.com/mira/lantern-run",
"files": [
"<string>"
],
"unpack": true,
"released_tag": "<string>",
"checked_at": "<string>",
"note": "<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>"
}
}Authorizations
An API key (pch_...) or the token from pch login.
Response
What it follows
Example:
"https://github.com/mira/lantern-run"
The release files players get, by name with the version left out ("LanternRun_v*.zip"); null takes them all.
A browser game: its release's zip is unpacked
The GitHub release the newest Patch release came from; null when it came from the default branch
What the last check found