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] 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"