Skip to content

Commit

Permalink
Documentation added cross-ref
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucino772 committed Mar 25, 2021
1 parent 26a39bd commit a1fc805
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
2 changes: 2 additions & 0 deletions docs/PyMojang/main.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Mojang - Main
- get_uuid
- get_uuids
- get_username
- user
- connect
rendering:
show_root_heading: true
show_source: true
14 changes: 7 additions & 7 deletions docs/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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')
Expand All @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions docs/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit a1fc805

Please sign in to comment.