GameHub API
An overview of the GameHub API and how the mirror server proxies it.
Deep Dive
All routes that are not handled by the mirror server are proxied directly to the origin server the only headers that are modified or added are the host header and the mirror header. All other routes besides the root route are generated using information fetched from the origin server.
User authorization is 3rd party and handled by https://auth.embernet.work/. Once the user has completed auth it will redirect back to the mirror server and give a session cookie which is used to access user information.
Routes
You can use mirror server routes in your application, though it is not recomened because the mirror server is designed for gamehub and could break when request requirements are not met.
| Path | Method | Mirror Only | Auth Required | Other Information |
|---|---|---|---|---|
| / | GET | false | false | Returns the status of the server and what features are enabled on that instance |
| /games | GET | false | false | Returns a list of game names, thumbnails and ids |
| /games/:id | GET | false | false | Returns more detailed information regarding the game |
| /games/:id/recomended | GET | false | false | Returns a list of two recommended games |
| /auth | GET | true | false | Redirects the user to the authorization page |
| /auth/finish | GET | true | true | The path the auth server will redirect to when authorization is finished |
| /me | GET | true | true | Returns basic user information such as avatar info and username |
| /me/avatar | GET | true | true | Redirects to the user avatar stored on the mirror server |
| /cdn/thumbnails/:id | GET | true | false | Returns the avatar of the user as an svg or png |
| /cdn/assets/:id/:path | GET | true | false | Returns game files from the origin server |
| /cdn/thumbnails/:id | GET | true | false | Returns the proxied game thumbnail |
| /analytics/:domain | GET | true | false | Gets the gamehub analytics id for that domain |