From 2a30faa840ea8aac3797629b089e41bf0817e2ea Mon Sep 17 00:00:00 2001 From: xHyroM Date: Sat, 17 Jun 2023 20:36:40 +0200 Subject: [PATCH] refactor: rename discord-experiments-api to distools-api in docs --- docs/config.ts | 10 +++++----- .../eligible.md | 6 +++--- .../experiments.md | 10 +++++----- .../introduction.md | 10 +++++----- .../{discord-experiments-api => distools-api}/stats.md | 6 +++--- vercel.json | 8 ++++++++ 6 files changed, 29 insertions(+), 21 deletions(-) rename docs/{discord-experiments-api => distools-api}/eligible.md (87%) rename docs/{discord-experiments-api => distools-api}/experiments.md (93%) rename docs/{discord-experiments-api => distools-api}/introduction.md (68%) rename docs/{discord-experiments-api => distools-api}/stats.md (79%) diff --git a/docs/config.ts b/docs/config.ts index f69608c..4e586a7 100644 --- a/docs/config.ts +++ b/docs/config.ts @@ -13,23 +13,23 @@ export interface SidebarItem { export const docs: Docs = { sidebar: [ { - text: "Discord Experiments API", + text: "Discord Tools API", items: [ { text: "Introduction", - link: "/docs/discord-experiments-api/introduction", + link: "/docs/distools-api/introduction", }, { text: "Experiments", - link: "/docs/discord-experiments-api/experiments", + link: "/docs/distools-api/experiments", }, { text: "Eligible", - link: "/docs/discord-experiments-api/eligible", + link: "/docs/distools-api/eligible", }, { text: "Stats", - link: "/docs/discord-experiments-api/stats", + link: "/docs/distools-api/stats", }, ], }, diff --git a/docs/discord-experiments-api/eligible.md b/docs/distools-api/eligible.md similarity index 87% rename from docs/discord-experiments-api/eligible.md rename to docs/distools-api/eligible.md index df9d86a..83b560f 100644 --- a/docs/discord-experiments-api/eligible.md +++ b/docs/distools-api/eligible.md @@ -7,7 +7,7 @@ description: How to check if a guild is eligible for an experiment This section of the documentation will cover how to check if a guild is eligible for an experiment. -Accessible on [https://api.discord-experiments.xhyrom.dev/v2/eligible](https://api.discord-experiments.xhyrom.dev/v2/eligible) +Accessible on [https://api.distools.xhyrom.dev/v2/eligible](https://api.distools.xhyrom.dev/v2/eligible) ## Eligible Object @@ -26,7 +26,7 @@ Represents the eligibility of a guild for an experiment ## Checking eligibility -You can check if a guild is eligible for an experiment by sending a POST request to [https://api.discord-experiments.xhyrom.dev/v2/eligible](https://api.discord-experiments.xhyrom.dev/v2/eligible) +You can check if a guild is eligible for an experiment by sending a POST request to [https://api.distools.xhyrom.dev/v2/eligible](https://api.distools.xhyrom.dev/v2/eligible) **Body:** @@ -38,7 +38,7 @@ You can check if a guild is eligible for an experiment by sending a POST request \* Only `id`, `features` and `member_count` fields are checked and `id` is required ``` -POST https://api.discord-experiments.xhyrom.dev/v2/eligible +POST https://api.distools.xhyrom.dev/v2/eligible { "experiment_id": "2023-03_clyde_ai", diff --git a/docs/discord-experiments-api/experiments.md b/docs/distools-api/experiments.md similarity index 93% rename from docs/discord-experiments-api/experiments.md rename to docs/distools-api/experiments.md index 4c356f9..4ac11c1 100644 --- a/docs/discord-experiments-api/experiments.md +++ b/docs/distools-api/experiments.md @@ -7,7 +7,7 @@ description: How to fetch experiments from the API This section of the documentation will cover how to fetch experiments from the API. -Accessible on [https://api.discord-experiments.xhyrom.dev/v2/experiments](https://api.discord-experiments.xhyrom.dev/v2/experiments) +Accessible on [https://api.distools.xhyrom.dev/v2/experiments](https://api.distools.xhyrom.dev/v2/experiments) ## Experiment Object @@ -153,7 +153,7 @@ If the guild experiment hash (murmurhash v3 unsigned of `experiment_name:guild_i ## Fetching all experiments -You can fetch experiments from the API by sending a GET request to [https://api.discord-experiments.xhyrom.dev/v2/experiments](https://api.discord-experiments.xhyrom.dev/v2/experiments). +You can fetch experiments from the API by sending a GET request to [https://api.distools.xhyrom.dev/v2/experiments](https://api.distools.xhyrom.dev/v2/experiments). **Query parameters:** | Name | Type | Description | @@ -166,19 +166,19 @@ You can fetch experiments from the API by sending a GET request to [https://api. \* If you want multiple kinds, you can separate them with a comma (,) ``` -GET https://api.discord-experiments.xhyrom.dev/v2/experiments +GET https://api.distools.xhyrom.dev/v2/experiments ``` Returns array of [Experiment Object](#experiment-object) ## Fetching experiment -You can fetch a specific experiment from the API by sending a GET request to [https://api.discord-experiments.xhyrom.dev/v2/experiments/:experimentId](https://api.discord-experiments.xhyrom.dev/v2/experiments/:experimentId). +You can fetch a specific experiment from the API by sending a GET request to [https://api.distools.xhyrom.dev/v2/experiments/:experimentId](https://api.distools.xhyrom.dev/v2/experiments/:experimentId). You can use same query parameters as in [Fetching all experiments](#fetching-all-experiments) ``` -GET https://api.discord-experiments.xhyrom.dev/v2/experiments/:experimentId +GET https://api.distools.xhyrom.dev/v2/experiments/:experimentId ``` Returns [Experiment Object](#experiment-object) diff --git a/docs/discord-experiments-api/introduction.md b/docs/distools-api/introduction.md similarity index 68% rename from docs/discord-experiments-api/introduction.md rename to docs/distools-api/introduction.md index 7bbbd87..af42a25 100644 --- a/docs/discord-experiments-api/introduction.md +++ b/docs/distools-api/introduction.md @@ -1,17 +1,17 @@ --- title: Introduction -description: Introduction to the Discord Experiments API +description: Introduction to the Distools API --- # Introduction -This section of the documentation will cover the basics of the Discord Experiments API, and how to use it. +This section of the documentation will cover the basics of the Distools API, and how to use it. -Accessible on [https://api.discord-experiments.xhyrom.dev/v2](https://api.discord-experiments.xhyrom.dev/v2) +Accessible on [https://api.distools.xhyrom.dev/v2](https://api.distools.xhyrom.dev/v2) -## What is the Discord Experiments API? +## What is the Distools API? -It's about the Discord Experiments API, which allows you to get information about Discord's experiments. It's a public API, so you don't need any token to use it. +It's about the Distools API, which allows you to get information about Discord's experiments. It's a public API, so you don't need any token to use it. ## How it works? diff --git a/docs/discord-experiments-api/stats.md b/docs/distools-api/stats.md similarity index 79% rename from docs/discord-experiments-api/stats.md rename to docs/distools-api/stats.md index e6b9c1c..73db60e 100644 --- a/docs/discord-experiments-api/stats.md +++ b/docs/distools-api/stats.md @@ -7,7 +7,7 @@ description: Get stats from the API This section of the documentation will cover how to get stats from the API. -Accessible on [https://api.discord-experiments.xhyrom.dev/v2/stats](https://api.discord-experiments.xhyrom.dev/v2/stats) +Accessible on [https://api.distools.xhyrom.dev/v2/stats](https://api.distools.xhyrom.dev/v2/stats) ## Stats Object @@ -35,10 +35,10 @@ Represents number of experiments by kind ## Fetching stats -You can fetch stats from the API by sending a GET request to [https://api.discord-experiments.xhyrom.dev/v2/stats](https://api.discord-experiments.xhyrom.dev/v2/stats) +You can fetch stats from the API by sending a GET request to [https://api.distools.xhyrom.dev/v2/stats](https://api.distools.xhyrom.dev/v2/stats) ``` -GET https://api.discord-experiments.xhyrom.dev/v2/stats +GET https://api.distools.xhyrom.dev/v2/stats ``` Returns a [stats object](#stats-object) diff --git a/vercel.json b/vercel.json index 2ac0224..0dee70e 100644 --- a/vercel.json +++ b/vercel.json @@ -19,6 +19,14 @@ "source": "/docs/", "destination": "/docs/discord-experiments-api/introduction" }, + { + "source": "/docs/discord-experiments-api", + "destination": "/docs/distools-api/introduction" + }, + { + "source": "/docs/discord-experiments-api/:name", + "destination": "/docs/distools-api/:name" + }, { "source": "/blog/:name", "destination": "/blog/posts/:name"