API
The z1g Project has an API for fetching games and app information, that is used by Sodium and Ephemeral. The source code is available on GitHub.
Apps API
The Apps API returns app information from the database. The endpoint is https://api.z1g.top/api/apps
. The response is a JSON object returning the status, and an array of apps.
Example Response:
The type of the data
property is as follows:
Prop | Type | Default |
---|---|---|
name | string | - |
description | string | - |
url | string | - |
image | string | - |
icon | string | - |
Errors
If there is an error with the request the API will return code 500
with
the status error
and an error
object. The error
object will contain a
message
and a detail
property.
Example Response:
Image API
The Image API is used to generate a 16:9 image from a square app icon. The endpoint is https://api.z1g.top/api/images
. An example of this being used is here
The query parameters are as follows:
url
: The URL of the image to be resized.
size
: This will be the width and height of the image displayed on the image
color
: The color of the background of the image. This can be either black or white.
Last updated on