Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add site #2

Merged
merged 3 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-minimal
105 changes: 105 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# API Reference

## Client
### Client

`class bloxlink.Bloxlink(api_key)`

The base class for all Bloxlink API interactions.

**Parameters:**
* **api_key (str)**: The API key from the Bloxlink developer page.

**Methods:**
* **await lookup_roblox_user(discord_id, server_id = None)**

Looks up a Roblox user from the given Discord ID (and optional server ID).
Returns the Roblox user ID.

**Parameters:**
* **discord_id (int)**: the Roblox ID of the user you want to find the Discord ID of.
* **server_id (int)**: the ID of the server you want to search in.

\**if you intend on doing a global search (which required approval), do not include this argument.
Otherwise, you must provide this argument.*

* **await lookup_discord_user(roblox_id, server_id = None)**

Looks up a Discord user from the given Roblox ID (and optional server ID).
Returns the Discord user ID.

**Parameters:**
* **roblox_id (int)**: the ID of the Discord user you want to find the Roblox ID of.
* **server_id (int)***: the ID of the server you want to search in.

\**if you intend on doing a global search (which required approval), do not include this argument.
Otherwise, you must provide this argument.*

* **await update_user(discord_id, server_id)**
Updates a Discord user in the specified server. This is equivalent to running /verify in a server.
Returns the roles which have been added/removed and the new nickname as a dict.

Attributes:

* **discord_id (int)** - the ID of the Discord user you want to update.
* **server_id (int)** - the ID of the server you want to update the user in.

## Objects
### Discord User
`class bloxlink.DiscordUser`

Represents a Discord user.

This information is only retrieved if you have Bloxlink Premium.

**Attributes:**
* **avatar (Optional[str])**: The Discord users' avatar.
* **communication_disabled_until (Optional[str])**: The date whereby the Discord user has had communication disabled (timed out).
* **flags (Optional[int])**: The Discord users' permission flags.
* **nick (Optional[str])**: The Discord Users' flags.
* **pending (Optional[bool])**: The Discord users' pending status.
* **premium_since (Optional[str])**: The date that the DIscord user has been premium since.
* **roles (Optional[list])**: A list of the Discord users' role IDs.
* **user (Optional[dict])**: The Discord users' account information.
* **mute (Optional[bool])**: Whether the user is voice muted.
* **deaf (Optional[bool])**: Whether the user is voice deafened.

## Roblox User
`class bloxlink.RobloxUser`

Represents a Roblox user.

This information is only retrieved if you have Bloxlink Premium.

**Attributes:**
* **name (Optional[str])**: The Roblox users' username.
* **id (Optional[str])**: The Roblox users' ID.
* **description (Optional[str])**: The Roblox users' description.
* **badges (Optional[str])**: The Roblox users' badges.
* **is_banned (Optional[str])**: Returns True if the Roblox user is banned.
* **groups (Optional[str])**: The Roblox users' groups.
* **avatar (Optional[str])**: The Roblox users' avatar.
* **rap (Optional[str])**: The Roblox users' RAP.
* **value (Optional[str])**: The Roblox users' value.
* **place_visits (Optional[str])**: The Roblox users' place visit count.
* **has_display_name (Optional[str])**: The Roblox users' Whether the user has a display name.
* **external_app_display_name (Optional[str])**: THe Roblox users' external app display name.
* **has_verified_badge (Optional[str])**: Whether the user has a verified badge.
* **groups2 (Optional[str])**: The Roblox users' groups. (this lists the groups in a dictionary using the group ID as the key as opposed to a list)

## Responses
`class bloxlink.RobloxUserResponse`

Represents a response from retrieving (looking up) a Roblox user.

**Attributes:**
* **user_id (Optional[int])**: The Roblox account ID.
* **roblox ([RobloxUser](#roblox-user))**: The linked Roblox user info.
* **discord ([DiscordUser](#discord-user))**: The linked Discord user info.

`class bloxlink.DiscordUserResponse`

Represents a response from retrieving (looking up) a Discord user.

**Attributes:**
* **discord_users (list[[DiscordUser](#discord-user)])**: A list of linked Discord users.
File renamed without changes.
39 changes: 39 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<div align="center">
<h1>PyBloxlink</h1>
<h3>An async API wrapper for the <a href="https://blox.link">blox.link</a> API.</h3>
<img src="https://img.shields.io/pypi/v/pybloxlink.svg">
</div>

## Useful links
* [API Reference](api.md)
* [GitHub Page](https://github.com/acatiadroid/pybloxlink)
* [PyPI Page](https://pypi.org/project/pybloxlink/)
* [Examples](examples.md)

## About
PyBloxlink is an async API wrapper for the [Bloxlink](https://blox.link) API.

Notable features:
* Async ready.
* Up to date.
* Provides full API coverage.
* User-friendly errors for handling status codes of failed HTTP requests.

## Installation
To install a full release of the library, run the command below:

```
pip install -U pybloxlink
```

## Examples
Some examples can be found in [examples.md](https://github.com/acatiadroid/pybloxlink/blob/main/examples.md).

## Help
If you need help, you can either make an [issue](https://github.com/acatiadroid/pybloxlink/issues/new) or join the Bloxlink server: https://discord.gg/bloxlink

## License
This is licensed under MIT. Read the license [here](https://github.com/acatiadroid/pybloxlink/blob/main/LICENSE.txt).

## Contributing
Contributions are welcome! Check out the [contributing guidelines](https://github.com/acatiadroid/pybloxlink/blob/main/.github/CONTRIBUTING.md) beforehand.