Download a file of a game package
const url = 'https://api.gampeon.com/v1/packages/files/example';const options = {method: 'GET', headers: {'x-package-grant': 'example'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.gampeon.com/v1/packages/files/example \ --header 'x-package-grant: example'For the launcher. Needs the packageGrant from POST /v1/servers/{id}/join in the header x-package-grant (60 minutes, only for the packages of that join). Supports Range: bytes=start- to continue an interrupted download. Check the SHA-256 after downloading.
Rate limit: 600 per hour per grant.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”SHA-256 of the file, 64 lowercase hex characters
Header Parameters
Section titled “Header Parameters”Download grant from the join
Optional single range, bytes=start- or bytes=start-end
Responses
Section titled “Responses”The file (206 for a range)
Error codes: invalid_package_grant
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: not_found
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: range_not_satisfiable
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Limit: 600 per hour per grant. Error codes: rate_limited
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: packages_unavailable
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}