Merge branch 'feat/distroid-docs' into patch-1

This commit is contained in:
Jozef Steinhübl 2024-08-18 18:08:42 +02:00 committed by GitHub
commit 0338822185
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 76 additions and 10 deletions

View file

@ -68,6 +68,10 @@ export const docs: Docs = {
text: "Current", text: "Current",
link: "/docs/distroid/current", link: "/docs/distroid/current",
}, },
{
text: "Download",
link: "/docs/distroid/download",
},
], ],
}, },
{ {

View file

@ -9,13 +9,11 @@ This section explains how to retrieve the latest release of the Discord Android
**Endpoint:** [https://distroid.xhyrom.dev/v1/current](https://distroid.xhyrom.dev/v1/current) **Endpoint:** [https://distroid.xhyrom.dev/v1/current](https://distroid.xhyrom.dev/v1/current)
### Channel Type ## Channel Object
### Channel Object
This object describes the current release channel for the Discord Android app. This object describes the current release channel for the Discord Android app.
**Properties:** **Channel Structure:**
| Field Name | Type | Description | | Field Name | Type | Description |
| -------------- | ------------------------------------ | ------------------------------------------------------------------------ | | -------------- | ------------------------------------ | ------------------------------------------------------------------------ |
@ -25,11 +23,19 @@ This object describes the current release channel for the Discord Android app.
\* Only included if you're using `with_file_metadata=true` query parameter. \* Only included if you're using `with_file_metadata=true` query parameter.
### File Object #### Channel Type
| |
| ------ |
| stable |
| beta |
| alpha |
## File Object
This object details a specific APK split for the Discord Android app. This object details a specific APK split for the Discord Android app.
**Properties:** **File Structure:**
| Field Name | Type | Description | | Field Name | Type | Description |
| --------------- | ------- | -------------------------------------------------------- | | --------------- | ------- | -------------------------------------------------------- |
@ -41,14 +47,31 @@ This object details a specific APK split for the Discord Android app.
To retrieve the latest release details, send a GET request to the API endpoint: To retrieve the latest release details, send a GET request to the API endpoint:
**Optional Query Parameter:** **Query parameters:**
| Parameter Name | Type | Description | | Parameter Name | Type | Description |
| ------------------ | ------- | ------------------------------------------------------------ | | ------------------ | ------- | ------------------------------------------------------------ |
| with_file_metadata | boolean | Include detailed information about each available APK split. | | with_file_metadata | boolean | Include detailed information about each available APK split. |
``` ### GET /current
GET https://distroid.xhyrom.dev/v1/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"
}
}
``` ```
Returns map\[channel type - `stable`, `beta` or `alpha`\]\[[Channel Object](#channel-object)\] Returns map\[[Channel Type](#channel-type)\]\[[Channel Object](#channel-object)\]

25
docs/distroid/download.md Normal file
View file

@ -0,0 +1,25 @@
---
title: Download
description: How to fetch download info of discord's android app
---
# Get The Download Info
This section explains how to retrieve download info of the android app
**Endpoint:** [https://distroid.xhyrom.dev/v1/download](https://distroid.xhyrom.dev/v1/download)
### GET /download/[{channel_type}](./current#channel-type)/[{version_code}](./current#channel-object)
**Example Map**
```json
{
"": "https://play.googleapis.com/download/by-token/download?token=AOTCm0R4ZLSCfpeT6AafMbT3JUZWXSsElcHrvyryOT2xfHHQH6ByDCltfKvkaR53q2rlG1XeY8fyp11qdQBNjH5RoVmkN8A9Ju6igekjQUPtXUONejNEeUuehVFsaC-38MH4zV-gR3AT82tn5-DKZvhLXW9XD7f4MLJ-yjvpBcYgXmzC4IADB36SINl87wTmYeadRnK_VQ7hwXUBVVtXFk1fReOQBVueXvOvAmfHcOothIR4PsokVks64q7731fLPfvAuBm5uxDjYMJlz9iS-3ZFKRSRUWaG3e9kKGXDPbuUrFk7y9bmEb1k_20_ItPIop570z0wVmrLz_KI5TW9rUupmzzBf2XCACJF5ss6CyMwSlcHGiI5SHPhkThPND2OO19xY0CfsvawRYfgOXWbrxA&cpn=pQZmNCZ5CkmiAI1h",
"config.arm64_v8a": "https://play.googleapis.com/download/by-token/download?token=AOTCm0QHwImF_9D9rBUHjSDpYXVcxRBYmjy88amnMcXxF0g2ptAh2Qqc5xDm3hMNJoVmuVrLPUtDfM2ll4qbFik0cK15fc0WqSORqt2XMNfYjmMEVIFZbRTps1GTcYm_2L_qNNklqNG3yo_5TQkkramFhlE0zY8oXnVe_UMikL6zlsMxD2aip10VPOaNS8an6CVR_hwO8f9dRjH-xRPoAuk9dJXWjhV93dLzwrcvOBX9Ic1CSRQpdmGPp79Wud2dFIcE5tfmoOrDxLWJamjSV1YwJ_UhUhIOKP5JAoVYdui1Y0MtKWq8y9mtezHPfLQOi3s7RyWLx9CplemSflQ1pk2PyiC8YjoyJ10ZT8n_n0b70P7zR4kqo0XhitC6XkFoM1i_VToMVgsku1VzTlHeQPKSkFeANPuDjv5qsJ_2LsgmBA&cpn=9r-S2j0GSwOx30-3",
"config.en": "https://play.googleapis.com/download/by-token/download?token=AOTCm0QGFuxMn8u1VVwZEdjnIA8_xOVdMoPerB55UvJhR2KQqTNMVk0VXwA8_bmMD6ZMhDmQv8pzG7xQebn69QwImn3ezW9Pq6FuA3wUyzYsjdw67L384m4vx98vCVxPhrupq6akCYitBdAR_f5B1-rqAWDtPEgZ0xhP_1CEPPlRdUPmx6sRemjWqQbWWNhi0D5RdDE53ZIzcYMXLv39CHR-hVEWbxIPB8M-T3JcxGfiPzyppAxwUp4e9GZb9b141moGen35pxW2KpNnuZnn7Pot-Gz2qGhM1yFBKeGN4_S2gsrAiM1AL5LjIBAfH5dEWXV209vbFFD5JEkMUAC5oOYKsbduJMLVwnJnWEl-OoB7yp-Rquks2MxWHDFlG7zHVygCHq_m4ubwBMLwCDsZgNQBcskFqv5bsA&cpn=PbYdS_W6niNJWQhd",
"config.xhdpi": "https://play.googleapis.com/download/by-token/download?token=AOTCm0RbZS3p3WouOvs2XDQzFBaNLVwmaOO2cv2DHePKqEncXq2Ge4_00MBKsfwYjyP18_2gvzryDSqtSoxMEg3YgzCUUQvQM9wSNY1VEWQwgbr2ci9qiuGbpYjKrukugU5-rRcyaKJHuJM-TUZC3CM_xG9QsNCLTbe1YUYVliU3K2HtFnHoYU1dPrsvsRxQ9uzXgZ9wUpHLQoqL3hcI1Iqdn__pgeqNipb60W7hRR2jXJVHLLTRRhZyWetYjd-6YzrG_GZS5NqwC9fuRQ84od0_X-JZEZLFatkufpVFhhOF8C-V64chYdj2iLERm4m3PJ2iByEuvfZyXFKvNYPAmDAudf3K0h16owGFMhgr9S0hI7YkpPrkxmGuWsuiZQhAIr65WKZLidYD51OAihA2RaK7WQ_DTLp63rRhyYA&cpn=OcalCYGlFd4Q_GTx"
}
```
Returns map\[[split_id](./current#file-object)\]\[string\]

View file

@ -18,3 +18,17 @@ Distroid is an API that allows you to track and download the latest releases of
- alpha (Canary) - alpha (Canary)
> Did you know that distroid stands for **Discord Android Tracker**? > Did you know that distroid stands for **Discord Android Tracker**?
## Requests
Base URL
```
https://distroid.xhyrom.dev/v{api_version_number}
```
### Versions
| Version | Status |
| ------- | --------- |
| v1 | Available |