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.6.tar.gz (23.1 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.6-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: iw4m-0.3.6.tar.gz
  • Upload date:
  • Size: 23.1 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.6.tar.gz
Algorithm Hash digest
SHA256 64778804faf9394fa1be39ce6f87c65b094bc00354a368615b872dcc4f5ef55d
MD5 3e6ce0aa6dfc2d8a11e9d15032464c5f
BLAKE2b-256 b360bd7d0d0ee8216cf11e79b004aff0a6582dce3ae3a26d3b2c4f69d919ce05

See more details on using hashes here.

File details

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

File metadata

  • Download URL: iw4m-0.3.6-py3-none-any.whl
  • Upload date:
  • Size: 19.7 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 92b579015853b91180e3c0b841aea614242cd79e999ca3afdbb2732ac35c8684
MD5 216147850d8ddb0c8b898afc76347ca1
BLAKE2b-256 79fc3d3401c613d1bb0304dfcb4d1cc7e6622097e011af146dbed5b9fbe23bd5

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