Metadata-Version: 2.1
Name: Pybelieva
Version: 0.0.1
Summary: Python wrapper for UnbelievaBoat API
Home-page: https://github.com/dev-cats/Pybelieva
Author: Mr_ChAI & korochun
Author-email: mr.kofe.edk@ya.ru
License: MIT
Project-URL: Documentation, https://github.com/dev-cats/Pybelieva/wiki/Documentation
Project-URL: Source, https://github.com/dev-cats/Pybelieva
Project-URL: Tracker, https://github.com/dev-cats/Pybelieva/issues
Keywords: UnbelievaBoat unbelievable pizza interface async aiohttp
Platform: UNKNOWN
Classifier: Development Status :: 6 - Mature
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Communications :: Chat
Description-Content-Type: text/markdown
Requires-Dist: aiohttp

# UnbPy
![logo](https://i.imgur.com/RLRDeQw.png)
## About UnbPy
> UnbPy is a library providing a Python interface to the
> [UnbelivaBoat API](https://unbelievable.pizza/api/docs). To use it, you need
> to get a token from the official documentation page. Also supports discord.py
> Guild and User objects.

[![discord](https://discordapp.com/api/guilds/566686199834476555/embed.png)](https://discord.gg/azdCbgv)
[![status](https://img.shields.io/badge/status-release-brightgreen.svg)](https://github.com/dev-cats/UnbPy/releases/tag/v1.0.0)
[![release](https://img.shields.io/badge/version-v1.2.0-blue.svg)](https://github.com/dev-cats/UnbPy/wiki/Version-History)
[![api](https://img.shields.io/badge/api-v1-ff266a.svg)](https://unbelievable.pizza/api/docs)
[![documentation](https://img.shields.io/badge/documentation-100%25-brightgreen.svg)](https://github.com/dev-cats/UnbPy/wiki/Documentation)
[![python](https://img.shields.io/badge/python-any-blue.svg)](https://python.org/)

## Help
> You can find an in-depth tutorial and a detailed documentation on
> [our wiki](https://github.com/dev-cats/UnbPy/wiki).

## Quick Start
### Setup
1. Install UnbPy.
2. Go to [the UnbelivaBoat site](https://unbelievable.pizza).
3. Login to your Discord account.
4. Go to [the API page](https://unbelievable.pizza/api/docs).
5. Click "Copy" under the big string of red text. Your token is now in the clipboard.
![example](https://i.imgur.com/HBcXbn9.png)

```python
>>> client = Client('Insert token here')
>>> guild = Guild(0) # Replace 0 with a Discord guild id
>>> user = User(0)   # Replace 0 with a Discord user id
```
### Functions
```python
client.get_balance(guild, user)
```
Returns: `User` with all attributes set.

```python
client.get_leaderboard(guild)
```
Returns: `list` of `User`s with all attributes set, ordered by rank.

```python
client.patch_balance(guild, user, cash, bank)
```
Returns: `User` with all attributes except rank set and an updated balance.

```python
client.set_balance(guild, user, cash, bank)
```
Returns: `User` with all attributes except rank set and the new balance.

## Dependencies
> * Python
> * aiohttp
> * discord.py (optional)


