Python wrapper for the Oxford Response API
Project description
oxrpy
A Python wrapper for the Oxford RP API.
Installation
Install from PyPI:
pip install oxrpy
Or from source:
pip install -r requirements.txt
Usage
from oxrpy import OxfordAPI
# Initialize with your server ID and key
api = OxfordAPI(server_id="your_server_id", server_key="your_server_key")
# Get server information
server_info = api.get_server()
print(server_info)
# Get current players
players = api.get_players()
print(players)
# Get queue
queue = api.get_queue()
print(queue)
# Get bans
bans = api.get_bans()
print(bans)
# Get kill logs
killlogs = api.get_killlogs()
print(killlogs)
# Execute a command
result = api.execute_command("announce Hello from API!")
print(result)
## API Endpoints
- `get_server()`: Returns general server information.
- `get_players()`: Returns list of current players.
- `get_queue()`: Returns the reserved server queue.
- `get_bans()`: Returns active bans.
- `get_killlogs()`: Returns recent kill logs (max 100 entries).
- `get_commandlogs()`: Returns recent command execution logs.
- `get_modcalls()`: Returns recent moderator call requests.
- `get_vehicles()`: Returns vehicles currently spawned.
- `execute_command(command)`: Executes a permitted command (e.g., "announce Hello!").
All methods return the JSON response from the API.
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
oxrpy-0.4.0.tar.gz
(2.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
oxrpy-0.4.0-py3-none-any.whl
(3.3 kB
view details)
File details
Details for the file oxrpy-0.4.0.tar.gz.
File metadata
- Download URL: oxrpy-0.4.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3133f458bba7f4038394a09e7002cf474dd3d15addb7082677a146a89ed7a7c
|
|
| MD5 |
255c12f867b216686fe07a1215b87e49
|
|
| BLAKE2b-256 |
48c9042c99d05330b302eb704dbf297f8f02b7b0e060ca8fc10f6be8b867cf0a
|
File details
Details for the file oxrpy-0.4.0-py3-none-any.whl.
File metadata
- Download URL: oxrpy-0.4.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8908f8d8192313d6d0880a45a655a3e40bd2aea52f0fb19699ed9ed4aa0afcaa
|
|
| MD5 |
a66695d71753bfe67c5978b13b3ff838
|
|
| BLAKE2b-256 |
37e3638a694097fe0081fc9dfb2c8da49b5d3d5384181f3ff536d4ad25629920
|