website/docs/distroid/current.md

78 lines
2.5 KiB
Markdown
Raw Normal View History

2024-08-18 15:16:44 +02:00
---
title: Current
2024-08-18 18:02:56 +02:00
description: How to get latest release of the discord's android app
2024-08-18 15:16:44 +02:00
---
2024-08-18 18:02:56 +02:00
## Get The Latest Android Release
2024-08-18 15:16:44 +02:00
2024-08-18 18:02:56 +02:00
This section explains how to retrieve the latest release of the Discord Android app using our API.
2024-08-18 15:16:44 +02:00
**Endpoint:** [https://distroid.xhyrom.dev/v1/current](https://distroid.xhyrom.dev/v1/current)
2024-08-18 18:07:35 +02:00
## Channel Object
2024-08-18 15:16:44 +02:00
This object describes the current release channel for the Discord Android app.
2024-08-18 18:07:35 +02:00
**Channel Structure:**
2024-08-18 15:16:44 +02:00
| Field Name | Type | Description |
| -------------- | ------------------------------------ | ------------------------------------------------------------------------ |
| version_code | integer | Internal version code used for downloading specific APKs. (e.g., 244205) |
2024-08-18 18:02:56 +02:00
| version_string | string | Version name of the release. (e.g., "244.5") |
2024-08-18 15:16:44 +02:00
| files \* | array of [file object](#file-object) | An array containing details about the available APK splits. |
\* Only included if you're using `with_file_metadata=true` query parameter.
2024-08-18 18:07:35 +02:00
#### Channel Type
| |
| ------ |
| stable |
| beta |
| alpha |
## File Object
2024-08-18 15:16:44 +02:00
This object details a specific APK split for the Discord Android app.
2024-08-18 18:07:35 +02:00
**File Structure:**
2024-08-18 15:16:44 +02:00
| Field Name | Type | Description |
| --------------- | ------- | -------------------------------------------------------- |
2024-08-18 18:02:56 +02:00
| compressed_size | integer | Bytesize of the `.apk` file (compressed). |
| size | integer | Bytesize of the installed APK (uncompressed). |
2024-08-18 15:16:44 +02:00
| split_id | string | Unique identifier for the split. Empty for the base APK. |
2024-08-18 18:02:56 +02:00
### Fetching Latest Release Information
2024-08-18 15:16:44 +02:00
2024-08-18 18:02:56 +02:00
To retrieve the latest release details, send a GET request to the API endpoint:
2024-08-18 15:16:44 +02:00
2024-08-18 18:07:35 +02:00
**Query parameters:**
2024-08-18 15:16:44 +02:00
| Parameter Name | Type | Description |
| ------------------ | ------- | ------------------------------------------------------------ |
| with_file_metadata | boolean | Include detailed information about each available APK split. |
2024-08-18 18:07:35 +02:00
### GET /current
**Example Map**
```json
{
"alpha": {
"version_code": 244205,
"version_string": "244.5"
},
"beta": {
"version_code": 243115,
"version_string": "243.15"
},
"stable": {
"version_code": 242020,
"version_string": "242.20"
}
}
2024-08-18 15:16:44 +02:00
```
2024-08-18 18:07:35 +02:00
Returns map\[[Channel Type](#channel-type)\]\[[Channel Object](#channel-object)\]