Skip to main content

A Python wrapper for the IW4M-Admin API

Project description

http://152.53.132.41:1624 hop on brownies :)

IW4M - Admin Wrapper 🎮

An easy-to-use Python wrapper for interacting with the IW4M-Admin

Introduction

Welcome to the official wiki for the IW4M-Admin Wrapper! This wrapper allows you to easily interact with the IW4M-Admin server through simple Python Functions. Whether you're server staff or a developer, this wrapper will simplify your interactions with IW4M-Admin, enabling you to manage players, retrieve statistics, and much more 📊


Table of Contents

Server Class 💻

The Server class provides utility functions for interacting with the IW4M-Admin servers

Methods

  • status()
    Retrieves the current status of the server
    • Returns: (dict) - The status information from the server in JSON format.
  • info()
    Retrieves the server information.
    • Returns: (dict) - Information about the server in JSON format.
  • get_server_ids()
    Retrieves a list of available servers and their corresponding IDs.
    • Returns: (list) - A list of dictionaries, each containing:
      • server (str): The name of the server
      • id (str): The unique identifier for the server
  • send_command(command: str)
    Executes an iw4m-admin console command and returns the response.
    • Parameters: command (str) - The command to execute.
    • Returns: (str) - Response from the server.
    • Raises: Exception if the request fails.
  • read_chat()
    Retrieves chat messages from the server.
    • Returns: (list) - A list of tuples, each containing the sender's name and their message.
  • recent_clients(offset: int = 0)
    Retrieves a list of recent clients.
    • Parameters: offset (int, optional) - The offset for pagination (default is 0).
    • Returns: (list) - A list of dictionaries containing details about recent clients.
  • find_player(name: str = "", xuid: str = "", count: int = 1, offset: int = 0, direction: int = 0)
    Finds players on the server by name or XUID.
    • Parameters:
      • name (str, optional): The player's name
      • xuid (str, optional): The player's XUID
      • count (int, optional): Number of players to return (default is 1)
      • offset (int, optional): Offset for pagination (default is 0)
      • direction (int, optional): Search direction (default is 0)
    • Returns: (str) - The response from the server containing player information.
  • get_users()
    Retrieves a list of users with their corresponding links.
    • Returns: (list) - A list of tuples, each containing:
      • player (str): The name of the user
      • href (str): The corresponding link of the user
  • get_players()
    Retrieves a list of players with their roles and corresponding links.
    • Returns: (list) - A list of dictionaries, each containing:
      • role (str): The role of the player (e.g., owner, senior, admin, user)
      • name (str): The name of the player
      • url (str): The corresponding link to the player
  • get_roles()
    Retrieves a list of available roles on the server.
    • Returns: A list of roles available.
  • get_admins(role: str = "all", count: int = None)
    Retrieves a list of administrators based on their role.
    • Parameters:
      • role (str): The role to filter by (default is "all")
      • count (int, optional): The number of admins to return (default is unlimited)
    • Returns: A list of dictionaries containing details about the administrators.
  • get_audit_logs()
    Retrieves a list of audit logs from the server.
    • Returns: A list of dictionaries containing:
      • type (str): The type of the audit log entry
      • origin (str): The origin of the log
      • href (str): The link to the log

Player Class 🕹️

The Player class provides utility functions for interacting with players on the IW4M-Admin server

Methods

  • stats()
    Retrieves statistics about the player.
    • Returns: (dict) - Player statistics in JSON format.
  • advanced_stats()
    Retrieves advanced statistics for the player.
    • Returns: (dict) - Advanced player statistics in JSON format.
  • client_info()
    Retrieves the client's information.
    • Returns: (dict) - Client information in JSON format.
  • info()
    Retrieves the basic information about the player.
    • Returns: (dict) - Player information in JSON format.
  • chat_history()
    Retrieves the player's chat history.
    • Returns: (list) - A list of chat messages sent by the player.
  • name_changes()
    Retrieves the history of the player's name changes.
    • Returns: (list) - A list of previous names.
  • administered_penalties()
    Retrieves the penalties administered to the player.
    • Returns: (list) - A list of administered penalties.
  • received_penalties()
    Retrieves the penalties the player has received.
    • Returns: (list) - A list of received penalties.
  • connection_history()
    Retrieves the player's connection history to the server.
    • Returns: (list) - A list of connection events.
  • permissions()
    Retrieves the permissions assigned to the player.
    • Returns: (list) - A list of permissions.

Come Play on Brownies SND 🍰

### Why Brownies? 🤔 - **Stability:** Brownies delivers a consistent, lag-free experience, making it the perfect choice for players who demand uninterrupted action - **Community:** The players at Brownies are known for being helpful, competitive, and fun—something Orion can only dream of - **Events & Features:** Brownies is constantly running unique events and offers more server-side customization options than Orion, ensuring every game feels fresh

Brownies Discord | Brownies IW4M | Made With ❤️ By Budiworld

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iw4m-0.3.3.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iw4m-0.3.3-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file iw4m-0.3.3.tar.gz.

File metadata

  • Download URL: iw4m-0.3.3.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for iw4m-0.3.3.tar.gz
Algorithm Hash digest
SHA256 8759196489c6410b6ca7adffd1b4d11c4310b151d12cc435031ad3a6dacc5821
MD5 c78775e55f019249187eab8efc4889c2
BLAKE2b-256 6ef4dd9e666a78912757a6183e41cba7c68643028e8aff04e78d1d7fdc409660

See more details on using hashes here.

File details

Details for the file iw4m-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: iw4m-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for iw4m-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c6dce6511d28dcd70f431c5be5f7b0d6c38af78d306dd0d7559cc65674ba715d
MD5 b5d1f01fbaa017d7fb421d8d84032c65
BLAKE2b-256 b4d36db35d47b1d0594eb4d895da576b3d6dbee92a131a5ad84b2f9d721197c4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page