From 840c017c1ddf0836d6eb237ed30b6182202f4970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20Steinh=C3=BCbl?= Date: Sun, 18 Aug 2024 15:16:44 +0200 Subject: [PATCH 1/3] feat: initial distroid documentation --- docs/config.ts | 13 +++++++++ docs/distroid/current.md | 54 +++++++++++++++++++++++++++++++++++ docs/distroid/introduction.md | 20 +++++++++++++ vercel.json | 4 +++ 4 files changed, 91 insertions(+) create mode 100644 docs/distroid/current.md create mode 100644 docs/distroid/introduction.md diff --git a/docs/config.ts b/docs/config.ts index c192d34..f654cad 100644 --- a/docs/config.ts +++ b/docs/config.ts @@ -57,6 +57,19 @@ export const docs: Docs = { }, ], }, + { + text: "Distroid", + items: [ + { + text: "Introduction", + link: "/docs/distroid/introduction", + }, + { + text: "Current", + link: "/docs/distroid/current", + }, + ], + }, { text: "Peddler's Pocket", items: [ diff --git a/docs/distroid/current.md b/docs/distroid/current.md new file mode 100644 index 0000000..ed53b29 --- /dev/null +++ b/docs/distroid/current.md @@ -0,0 +1,54 @@ +--- +title: Current +description: How to get latest version of the discord's android app +--- + +## Get The Latest Android Version + +This section explains how to retrieve the latest version of the Discord Android app using our API. + +**Endpoint:** [https://distroid.xhyrom.dev/v1/current](https://distroid.xhyrom.dev/v1/current) + +### Channel Type + +### Channel Object + +This object describes the current release channel for the Discord Android app. + +**Properties:** + +| Field Name | Type | Description | +| -------------- | ------------------------------------ | ------------------------------------------------------------------------ | +| version_code | integer | Internal version code used for downloading specific APKs. (e.g., 244205) | +| version_string | string | Human-readable version number of the release. (e.g., "244.5") | +| 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. + +### File Object + +This object details a specific APK split for the Discord Android app. + +**Properties:** + +| Field Name | Type | Description | +| --------------- | ------- | -------------------------------------------------------- | +| compressed_size | integer | Size of the downloaded file in bytes (compressed). | +| size | integer | Size of the installed APK in bytes (uncompressed). | +| split_id | string | Unique identifier for the split. Empty for the base APK. | + +### Fetching Latest Version Information + +To retrieve the latest version details, send a GET request to the API endpoint: + +**Optional Query Parameter:** + +| Parameter Name | Type | Description | +| ------------------ | ------- | ------------------------------------------------------------ | +| with_file_metadata | boolean | Include detailed information about each available APK split. | + +``` +GET https://distroid.xhyrom.dev/v1/current +``` + +Returns map\[channel type - `stable`, `beta` or `alpha`\]\[[Channel Object](#channel-object)\] diff --git a/docs/distroid/introduction.md b/docs/distroid/introduction.md new file mode 100644 index 0000000..9cc294c --- /dev/null +++ b/docs/distroid/introduction.md @@ -0,0 +1,20 @@ +--- +title: Introduction +description: Introduction to the distroid api +--- + +# Introduction + +This section of the documentation will cover the basics of the Distroid API, and how to use it. + +Accessible on [https://distroid.xhyrom.dev](https://distroid.xhyrom.dev) + +## What is Distroid API? + +Distroid is an API that allows you to track and download the latest version of Discord’s Android app. It supports all three channels: + +- stable +- beta +- alpha + +> Did you know that distroid stands for **Discord Android Tracker**? diff --git a/vercel.json b/vercel.json index 7a0054f..b107e5d 100644 --- a/vercel.json +++ b/vercel.json @@ -23,6 +23,10 @@ "source": "/docs/dux", "destination": "/docs/dux/introduction" }, + { + "source": "/docs/distroid", + "destination": "/docs/distroid/introduction" + }, { "source": "/docs/peddlerspocket", "destination": "/docs/peddlerspocket/introduction" From bbdece9190c0e9b7d5ee64a30a6715caf4243221 Mon Sep 17 00:00:00 2001 From: DzikStar <82441193+DzikStar@users.noreply.github.com> Date: Sun, 18 Aug 2024 18:02:56 +0200 Subject: [PATCH 2/3] Lack of Android knowledge --- docs/distroid/current.md | 16 ++++++++-------- docs/distroid/introduction.md | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/distroid/current.md b/docs/distroid/current.md index ed53b29..919bbd9 100644 --- a/docs/distroid/current.md +++ b/docs/distroid/current.md @@ -1,11 +1,11 @@ --- title: Current -description: How to get latest version of the discord's android app +description: How to get latest release of the discord's android app --- -## Get The Latest Android Version +## Get The Latest Android Release -This section explains how to retrieve the latest version of the Discord Android app using our API. +This section explains how to retrieve the latest release of the Discord Android app using our API. **Endpoint:** [https://distroid.xhyrom.dev/v1/current](https://distroid.xhyrom.dev/v1/current) @@ -20,7 +20,7 @@ This object describes the current release channel for the Discord Android app. | Field Name | Type | Description | | -------------- | ------------------------------------ | ------------------------------------------------------------------------ | | version_code | integer | Internal version code used for downloading specific APKs. (e.g., 244205) | -| version_string | string | Human-readable version number of the release. (e.g., "244.5") | +| version_string | string | Version name of the release. (e.g., "244.5") | | 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. @@ -33,13 +33,13 @@ This object details a specific APK split for the Discord Android app. | Field Name | Type | Description | | --------------- | ------- | -------------------------------------------------------- | -| compressed_size | integer | Size of the downloaded file in bytes (compressed). | -| size | integer | Size of the installed APK in bytes (uncompressed). | +| compressed_size | integer | Bytesize of the `.apk` file (compressed). | +| size | integer | Bytesize of the installed APK (uncompressed). | | split_id | string | Unique identifier for the split. Empty for the base APK. | -### Fetching Latest Version Information +### Fetching Latest Release Information -To retrieve the latest version 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:** diff --git a/docs/distroid/introduction.md b/docs/distroid/introduction.md index 9cc294c..99d87d4 100644 --- a/docs/distroid/introduction.md +++ b/docs/distroid/introduction.md @@ -11,10 +11,10 @@ Accessible on [https://distroid.xhyrom.dev](https://distroid.xhyrom.dev) ## What is Distroid API? -Distroid is an API that allows you to track and download the latest version of Discord’s Android app. It supports all three channels: +Distroid is an API that allows you to track and download the latest releases of Discord’s Android app. It supports all three google release channels: - stable -- beta -- alpha +- beta (PTB) +- alpha (Canary) > Did you know that distroid stands for **Discord Android Tracker**? From 4b08498ec8c683c8bee403ef0efe9449a66db1b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20Steinh=C3=BCbl?= Date: Sun, 18 Aug 2024 18:07:35 +0200 Subject: [PATCH 3/3] feat: download page --- docs/config.ts | 4 +++ docs/distroid/current.md | 47 ++++++++++++++++++++++++++--------- docs/distroid/download.md | 25 +++++++++++++++++++ docs/distroid/introduction.md | 14 +++++++++++ 4 files changed, 78 insertions(+), 12 deletions(-) create mode 100644 docs/distroid/download.md diff --git a/docs/config.ts b/docs/config.ts index f654cad..f76b4ab 100644 --- a/docs/config.ts +++ b/docs/config.ts @@ -68,6 +68,10 @@ export const docs: Docs = { text: "Current", link: "/docs/distroid/current", }, + { + text: "Download", + link: "/docs/distroid/download", + }, ], }, { diff --git a/docs/distroid/current.md b/docs/distroid/current.md index ed53b29..ee35933 100644 --- a/docs/distroid/current.md +++ b/docs/distroid/current.md @@ -3,19 +3,17 @@ title: Current description: How to get latest version of the discord's android app --- -## Get The Latest Android Version +# Get The Latest Android Version This section explains how to retrieve the latest version of the Discord Android app using our API. **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. -**Properties:** +**Channel Structure:** | 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. -### File Object +#### Channel Type + +| | +| ------ | +| stable | +| beta | +| alpha | + +## File Object This object details a specific APK split for the Discord Android app. -**Properties:** +**File Structure:** | Field Name | Type | Description | | --------------- | ------- | -------------------------------------------------------- | @@ -37,18 +43,35 @@ This object details a specific APK split for the Discord Android app. | size | integer | Size of the installed APK in bytes (uncompressed). | | split_id | string | Unique identifier for the split. Empty for the base APK. | -### Fetching Latest Version Information +## Fetching Latest Version Information To retrieve the latest version details, send a GET request to the API endpoint: -**Optional Query Parameter:** +**Query parameters:** | Parameter Name | Type | Description | | ------------------ | ------- | ------------------------------------------------------------ | | with_file_metadata | boolean | Include detailed information about each available APK split. | -``` -GET https://distroid.xhyrom.dev/v1/current +### 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" + } +} ``` -Returns map\[channel type - `stable`, `beta` or `alpha`\]\[[Channel Object](#channel-object)\] +Returns map\[[Channel Type](#channel-type)\]\[[Channel Object](#channel-object)\] diff --git a/docs/distroid/download.md b/docs/distroid/download.md new file mode 100644 index 0000000..0996bef --- /dev/null +++ b/docs/distroid/download.md @@ -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\] diff --git a/docs/distroid/introduction.md b/docs/distroid/introduction.md index 9cc294c..f5928be 100644 --- a/docs/distroid/introduction.md +++ b/docs/distroid/introduction.md @@ -18,3 +18,17 @@ Distroid is an API that allows you to track and download the latest version of D - alpha > 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 |