Send a browser to a file's bytes
curl --request GET \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/repo/rawconst options = {method: 'GET'};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/repo/raw', 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}/repo/raw"
response = requests.get(url)
print(response.text){
"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>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}Repos
Send a browser to a file's bytes
A 302 to the git host, which serves repo files from outside patch.gg: images to show, and anything else to download. It’s what an image in a page uses, since the page’s sign-in reaches this route and not the git host. For a repo not everyone can read, the link carries a signature that lasts 15 minutes and unlocks only that file, as it is at the commit ref is at now. 404 ref_not_found for such a repo, if ref is at nothing.
GET
/
projects
/
{owner}
/
{slug}
/
repo
/
raw
Send a browser to a file's bytes
curl --request GET \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/repo/rawconst options = {method: 'GET'};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/repo/raw', 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}/repo/raw"
response = requests.get(url)
print(response.text){
"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>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}Query Parameters
A branch, a tag or a full commit hash: the default branch unless you say. A branch comes before a tag of the same name, and refs/tags/v1 says which.
Pattern:
^\S{1,255}$Example:
"main"
A file in the repo, from its top
Required string length:
1 - 4096Example:
"docs/guide.md"
Response
To the file on the git host