unbelievaboat


Nameunbelievaboat JSON
Version 1.2.0 PyPI version JSON
download
home_pagehttps://github.com/yoggys/unbelievaboat
SummaryWrapper for UnbelievaBoat API.
upload_time2023-07-07 13:27:33
maintainer
docs_urlNone
authoryoggys
requires_python
license
keywords python unb unbelievaboat api wrapper async asyncio
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # UnbelievaBoat API Python Wrapper

[![Discord Server](https://img.shields.io/discord/746360067632136222?label=discord&style=for-the-badge&logo=discord&color=5865F2&logoColor=white)](https://discord.gg/yoggies)
[![Python Version](https://img.shields.io/badge/python-3.8+-blue.svg?style=for-the-badge&logo=python&logoColor=white)](https://www.python.org/downloads/release/python-380/)
[![PyPI Version](https://img.shields.io/pypi/v/unbelievaboat.svg?style=for-the-badge&color=yellowgreen&logo=pypi&logoColor=white)](https://pypi.org/project/unbelievaboat/)
[![PyPI Downloads](https://img.shields.io/pypi/dm/unbelievaboat?style=for-the-badge&color=blueviolet&logo=pypi&logoColor=white)](https://pypi.org/project/unbelievaboat/)


This is a Python wrapper for the UnbelievaBoat API, which provides access to the UnbelievaBoat Discord bot functionality. It allows you to interact with the API endpoints to retrieve guild information, user balances, leaderboard data, and more.

## Requirements

- Python 3.8 or higher

## Installation

You can install the UnbelievaBoat API Python wrapper using pip. Open your terminal and run the following command:

```shell
pip install unbelievaboat
```

## Usage

Here's an example of how to use the UnbelievaBoat API Python wrapper to interact with the UnbelievaBoat API:

```python
from unbelievaboat import Client
import asyncio


async def main():
    # Initialize the client with your API token
    client = Client("your-api-token")

    # Retrieve guild information
    guild = await client.get_guild(guild_id)
    print(guild)

    # Retrieve user balance
    user = await client.get_user_balance(guild_id, user_id)
    print(user.total)

    # Set or update user balance
    user = await client.set_user_balance(guild_id, user_id, {"bank": 100})
    user = await client.update_user_balance(guild_id, user_id, {"bank": 100})
    # or
    user = await client.get_user_balance(guild_id, user_id)
    user = await user.set_balance({"bank": 100})
    user = await user.update_balance({"bank": 100})

    # Retrieve leaderboard data
    leaderboard = await client.get_leaderboard(guild_id)
    print(leaderboard.users)

    # Retrieve item shop data
    shop = await client.get_shop(guild_id)
    print(shop.items)

    # Close the client session
    await client.close()


asyncio.run(main())
```

Replace `"your-api-token"` with your actual API token. You can obtain an API token by logging into the UnbelievaBoat dashboard and generating a token for your bot.

Please note that the above example demonstrates a basic usage scenario. You can explore other available methods in the `Client` class to interact with different API endpoints. You can also find more examples in the [examples](https://github.com/yoggys/unbelievaboat/tree/main/examples) directory.

## Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request on the [GitHub repository](https://github.com/yoggys/unbelievaboat).

## License

This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/yoggys/unbelievaboat",
    "name": "unbelievaboat",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,unb,unbelievaboat,api,wrapper,async,asyncio",
    "author": "yoggys",
    "author_email": "yoggies@yoggies.ovh",
    "download_url": "https://files.pythonhosted.org/packages/4f/f7/00413587bfb7f55eafbd77f7df2a4d1e2b5ba7c021953e6cbbe520167af7/unbelievaboat-1.2.0.tar.gz",
    "platform": null,
    "description": "# UnbelievaBoat API Python Wrapper\r\n\r\n[![Discord Server](https://img.shields.io/discord/746360067632136222?label=discord&style=for-the-badge&logo=discord&color=5865F2&logoColor=white)](https://discord.gg/yoggies)\r\n[![Python Version](https://img.shields.io/badge/python-3.8+-blue.svg?style=for-the-badge&logo=python&logoColor=white)](https://www.python.org/downloads/release/python-380/)\r\n[![PyPI Version](https://img.shields.io/pypi/v/unbelievaboat.svg?style=for-the-badge&color=yellowgreen&logo=pypi&logoColor=white)](https://pypi.org/project/unbelievaboat/)\r\n[![PyPI Downloads](https://img.shields.io/pypi/dm/unbelievaboat?style=for-the-badge&color=blueviolet&logo=pypi&logoColor=white)](https://pypi.org/project/unbelievaboat/)\r\n\r\n\r\nThis is a Python wrapper for the UnbelievaBoat API, which provides access to the UnbelievaBoat Discord bot functionality. It allows you to interact with the API endpoints to retrieve guild information, user balances, leaderboard data, and more.\r\n\r\n## Requirements\r\n\r\n- Python 3.8 or higher\r\n\r\n## Installation\r\n\r\nYou can install the UnbelievaBoat API Python wrapper using pip. Open your terminal and run the following command:\r\n\r\n```shell\r\npip install unbelievaboat\r\n```\r\n\r\n## Usage\r\n\r\nHere's an example of how to use the UnbelievaBoat API Python wrapper to interact with the UnbelievaBoat API:\r\n\r\n```python\r\nfrom unbelievaboat import Client\r\nimport asyncio\r\n\r\n\r\nasync def main():\r\n    # Initialize the client with your API token\r\n    client = Client(\"your-api-token\")\r\n\r\n    # Retrieve guild information\r\n    guild = await client.get_guild(guild_id)\r\n    print(guild)\r\n\r\n    # Retrieve user balance\r\n    user = await client.get_user_balance(guild_id, user_id)\r\n    print(user.total)\r\n\r\n    # Set or update user balance\r\n    user = await client.set_user_balance(guild_id, user_id, {\"bank\": 100})\r\n    user = await client.update_user_balance(guild_id, user_id, {\"bank\": 100})\r\n    # or\r\n    user = await client.get_user_balance(guild_id, user_id)\r\n    user = await user.set_balance({\"bank\": 100})\r\n    user = await user.update_balance({\"bank\": 100})\r\n\r\n    # Retrieve leaderboard data\r\n    leaderboard = await client.get_leaderboard(guild_id)\r\n    print(leaderboard.users)\r\n\r\n    # Retrieve item shop data\r\n    shop = await client.get_shop(guild_id)\r\n    print(shop.items)\r\n\r\n    # Close the client session\r\n    await client.close()\r\n\r\n\r\nasyncio.run(main())\r\n```\r\n\r\nReplace `\"your-api-token\"` with your actual API token. You can obtain an API token by logging into the UnbelievaBoat dashboard and generating a token for your bot.\r\n\r\nPlease note that the above example demonstrates a basic usage scenario. You can explore other available methods in the `Client` class to interact with different API endpoints. You can also find more examples in the [examples](https://github.com/yoggys/unbelievaboat/tree/main/examples) directory.\r\n\r\n## Contributing\r\n\r\nContributions are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request on the [GitHub repository](https://github.com/yoggys/unbelievaboat).\r\n\r\n## License\r\n\r\nThis project is licensed under the [MIT License](https://opensource.org/licenses/MIT).\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Wrapper for UnbelievaBoat API.",
    "version": "1.2.0",
    "project_urls": {
        "Homepage": "https://github.com/yoggys/unbelievaboat"
    },
    "split_keywords": [
        "python",
        "unb",
        "unbelievaboat",
        "api",
        "wrapper",
        "async",
        "asyncio"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "598d1a82acf1ef4b61446fedaa1fb82b8494ce602dccc5ffcac9a5734774b895",
                "md5": "b87b271efbaea7cc2b736eda6ea6139f",
                "sha256": "ccd3441abec33c63cb419a2994027e39e552bebfd22c5b6712e812f8f7f64f75"
            },
            "downloads": -1,
            "filename": "unbelievaboat-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b87b271efbaea7cc2b736eda6ea6139f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 17811,
            "upload_time": "2023-07-07T13:27:31",
            "upload_time_iso_8601": "2023-07-07T13:27:31.663550Z",
            "url": "https://files.pythonhosted.org/packages/59/8d/1a82acf1ef4b61446fedaa1fb82b8494ce602dccc5ffcac9a5734774b895/unbelievaboat-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4ff700413587bfb7f55eafbd77f7df2a4d1e2b5ba7c021953e6cbbe520167af7",
                "md5": "a1e313e4f0064ae12b457e616cc2749b",
                "sha256": "9f391e5c122b339ddc9a43a61087e86a5b6819c8853932fdf84ba875e4cde9a1"
            },
            "downloads": -1,
            "filename": "unbelievaboat-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a1e313e4f0064ae12b457e616cc2749b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 11541,
            "upload_time": "2023-07-07T13:27:33",
            "upload_time_iso_8601": "2023-07-07T13:27:33.392556Z",
            "url": "https://files.pythonhosted.org/packages/4f/f7/00413587bfb7f55eafbd77f7df2a4d1e2b5ba7c021953e6cbbe520167af7/unbelievaboat-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-07 13:27:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yoggys",
    "github_project": "unbelievaboat",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "unbelievaboat"
}
        
Elapsed time: 0.09583s