Обертка для работа с апи RCC
Project description
RustCheatCheck API
Удобная обертка для взаимодействия с апи RCC.
Как начать?
Установка
pip install rcc-api
Взаимодействие
import asyncio
import RCC
async def main():
api = RCC.API("TOKEN/KEY")
# Здесь показаны не все методы, более подробнее информация
# Находится здесь https://rustcheatcheck.ru/panel/getapi
# Некоторые поля/методы названы более правильно(по моему мнению)
# Ваш редактор в любом случае вам подскажет
# Получение информация об аккаутне
player = await api.get_info(76561198021247080)
print(player.steamid) # 76561198021247080
print(player.rcc_checks) # 7
checks = player.checks
print(checks[1].time) # 2019-01-08 16:53:13+00:00
print(checks[1].server_name) # MagicRust
bans = player.bans
print(bans[0].reason) # мамкин_крашер
print(bans[0].active) # False
print(bans[0].ban_date) # 2019-06-11 12:01:07+00:00ет
# Выдача доступа к чекеру
response = await api.start_check(76561198021247080, moder_steamid=76561198021247080)
print(response.status) # success
print(response.error) # None
# Выдача бана
response = await api.ban_player(76561198021247080, "macros")
print(response.status) # success
print(response.error) # None
# Снятие бана
response = await api.unban_player(76561198021247080)
print(response.status) # success
print(response.error) # None
# Работа с ошибками
try:
player = await api.get_info(62485679287628672076)
except RCC.exceptions.RCCErrors as e:
print(e)
asyncio.run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rcc-api-0.1.0.tar.gz
(5.7 kB
view details)
Built Distribution
File details
Details for the file rcc-api-0.1.0.tar.gz
.
File metadata
- Download URL: rcc-api-0.1.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.5 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fdd5dd74fb84ff074bccac4fdf22ae6f0605944e3e3d4077dccc6df604e0ffd |
|
MD5 | d50a27b22a0f62082fcd6cd9d9847143 |
|
BLAKE2b-256 | a06beda4618ac02b528758050d19f3fffec5a5d689649d55b964c03a5777264b |
File details
Details for the file rcc_api-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: rcc_api-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.5 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c1d3f4631b053ac716cdadfee5210aefced42e31951ae2a9aa5197a0c901be7 |
|
MD5 | beea44c9f9e93f4e422ad0317c9dfd56 |
|
BLAKE2b-256 | 0de59ae1a9a66c7d156838fd4036694309dc91c68c6fddfbe3c93bb0ff79f86e |