From a1fc8050aa12dafd87b333800fa579a13c965341 Mon Sep 17 00:00:00 2001 From: Lucino772 Date: Thu, 25 Mar 2021 21:31:55 +0100 Subject: [PATCH] Documentation added cross-ref --- docs/PyMojang/main.md | 2 ++ docs/advanced.md | 14 +++++++------- docs/basic.md | 10 +++++----- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/docs/PyMojang/main.md b/docs/PyMojang/main.md index 3b5539fa..b7c969a2 100644 --- a/docs/PyMojang/main.md +++ b/docs/PyMojang/main.md @@ -10,6 +10,8 @@ Mojang - Main - get_uuid - get_uuids - get_username + - user + - connect rendering: show_root_heading: true show_source: true \ No newline at end of file diff --git a/docs/advanced.md b/docs/advanced.md index 6fe08b8f..240a5295 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -3,7 +3,7 @@ PyMojang - Advanced Usage ## Full profile -To get all the available data about a user, use the function [`user`](). It will return a [`UserProfile`]() object +To get all the available data about a user, use the function [`user`][mojang.main.user]. It will return a [`UserProfile`][mojang.profile.UserProfile] object ```python import mojang @@ -28,9 +28,9 @@ Once done, you have access to the following attributes: ## Authenticated User -To connect with a **username** and **password**, use the function [`connect`](). It will return a [`UserSession`]() object. +To connect with a **username** and **password**, use the function [`connect`][mojang.main.connect]. It will return a [`UserSession`][mojang.session.UserSession] object. -The [`connect`]() function also take a **client_token** parameter, but it's optional. It will be, by default, automaticly generated. +The [`connect`][mojang.main.connect] function also take a **client_token** parameter, but it's optional. It will be, by default, automaticly generated. ```python session = mojang.connect('YOUR_USERNAME','YOUR_PASSWORD') @@ -43,15 +43,15 @@ Once authenticated, you will have access to all the profile's attributes and als You will also have access to the following methods: -- [`change_name`]() : Change the account username -- [`change_skin`]() : Change the account skin -- [`reset_skin`]() : Reset the account skin to the default one +- [`change_name`][mojang.session.UserSession.change_name] : Change the account username +- [`change_skin`][mojang.session.UserSession.change_skin] : Change the account skin +- [`reset_skin`][mojang.session.UserSession.reset_skin] : Reset the account skin to the default one ### Security The first time you are going to try to connect to your account you might have some problem with certain fonctionnality, and this is because your **IP** is no verified. See [Security Question Answer Flow](https://wiki.vg/Mojang_API#Security_question-answer_flow). -Once your authenticated, you can check if your IP is secure with the `secure` attribute: +Once your authenticated, you can check if your IP is secure with the [`secure`][mojang.session.UserSession.secure] attribute: ```python if not session.secure: diff --git a/docs/basic.md b/docs/basic.md index 1d78a3ab..bfdb13a3 100644 --- a/docs/basic.md +++ b/docs/basic.md @@ -3,7 +3,7 @@ PyMojang - Basic Usage ## API Status -To get the status of each Mojang services, use the function `api_status` +To get the status of each Mojang services, use the function [`api_status`][mojang.api.base.api_status] ```python import mojang @@ -38,7 +38,7 @@ green ## UUID by Username -To get the UUID of a username, use the function `get_uuid` +To get the UUID of a username, use the function [`get_uuid`][mojang.main.get_uuid] ```python import mojang @@ -53,7 +53,7 @@ uuid = mojang.get_uuid('Notch') ## UUIDs by Usernames -To get the UUID for multiple usernames, use the function `get_uuids` +To get the UUID for multiple usernames, use the function [`get_uuids`][mojang.main.get_uuids] !!! note The Mojang API endpoint only allow 10 usernames, if more than 10 usernames are given to the function, multiple request will be made. @@ -70,7 +70,7 @@ uuids = mojang.get_uuids(['Notch','jeb_']) ## Username by UUID -To get the username for a UUID, use the function `get_username` +To get the username for a UUID, use the function [`get_username`][mojang.main.get_username] ```python import mojang @@ -84,7 +84,7 @@ Notch ## Name History -To get the name history for a specific user, use the function `name_history` +To get the name history for a specific user, use the function [`name_history`][mojang.api.base.name_history] ```python import mojang