Metadata-Version: 2.1
Name: coralmc
Version: 1.0.1
Summary: A Python module to interact with the CoralMC API
Author: letruxux
Author-email: letruxux.t@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: aiohttp (>=3.8.2,<4.0.0)
Description-Content-Type: text/markdown

# CoralMC

## About
A [Python](https://python.org) module that allows you to interact with the [CoralMC](https://coralmc.it/) API.

> **Warning**
CoralMC's API is still in alpha and isn't documented. In the future an access token is going to be required. At the current state, it isn't recommended for production usage as it could stop working at any point.

## Installation
```py
python -m pip install coralmc
```

## Example usage
Get basic player info:
```py
import coralmc
import asyncio

async def main():
    try:
        playerInfo = await coralmc.getPlayerInfo("Feryzz")
        if playerInfo:
            print(playerInfo)
        else:
            print("Player not found!")
    except Exception as error:
        print(f"Error: {error}")

asyncio.run(main())
```
Get player stats:
```py
import coralmc
import asyncio

async def main():
    try:
        playerStats = await coralmc.getPlayerStats("Feryzz")
        if playerStats:
            print(playerStats["kitpvp"])
            print(playerStats["bedwars"])
        else:
            print("Player not found!")
    except Exception as error:
        print(f"Error: {error}")

asyncio.run(main())
```

