Metadata-Version: 2.4
Name: rcu-api
Version: 0.1.0
Summary: Dependency-free Python client for Powerful Studio Public API
Author: RCU API Community
License: MIT License
        
        Copyright (c) 2026 RCU API Community
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Keywords: rcu-api,api,client,roblox
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: build>=1.2.2.post1
Requires-Dist: twine>=6.1.0
Dynamic: license-file

# rcu-api

Небольшой Python-клиент для Powerful Studio Public API из приложенной OpenAPI-схемы.

## Установка

```bash
pip install rcu-api
```

Библиотека не требует дополнительных runtime-зависимостей и работает с Python 3.8+.

## Использование

```python
from rcu_api import PowerfulStudioClient

client = PowerfulStudioClient()

clan_id = client.get_clan_id("#ABC123")
clan = client.get_clan(clan_id)
top_clans = client.get_top_clans(page_size=25)
leaderboard = client.get_leaderboard("totalAcorns", page_size=10)
directory = client.get_directory("pets")

player = PowerfulStudioClient(access_token="YOUR_ACCESS_TOKEN").get_player(
    123456,
    include=["stats", "clan", "currencies"],
)
print(player.stats.total_clicks if player.stats else None)
```

Токен нужен только для endpoint игрока. Его можно передать при создании
клиента или отдельно в `get_player(access_token=...)`. Получить токен можно
на странице `https://rcu.powerfulstudio.xyz/public/access-tokens`.

## Обработка ошибок

* `PowerfulStudioValidationError` — неверные аргументы;
* `AuthenticationError` — не передан токен игрока;
* `PowerfulStudioHTTPError` — API вернул HTTP-ошибку; доступны `status_code`
  и `response_body`;
* `PowerfulStudioTransportError` — сетевой сбой или неожиданный формат ответа.

Названия параметров в Python используют `snake_case`, а JSON-поля автоматически
преобразуются в типизированные dataclass-модели (`ClanInfo`, `PlayerInfo` и
другие).
