Skip to main content

Battlemetrics API wrapper.

Project description

Battlemetrics API Wrapper

This repository allows users to quickly and easily pull data from the Battlemetrics API. Removing a lot of the guesswork when reading the API.

Alternatives

Javascript

For the javascript equivalent, visit this repository: https://github.com/cubiquitous/battlemetrics-js

Disclaimer

Please note that I am an individual member of the community and not affiliated with Battlemetrics. The resources provided here are developed to facilitate the usage of the Battlemetrics API but come with no official endorsement or sponsorship from Battlemetrics.

It's important to understand that any actions you take using these resources are solely your responsibility. I am not liable for any damage or consequences that may occur to your server or account. Please exercise caution and ensure that you follow best practices when using the API.

Getting Started

To begin using the Battlemetrics API, make sure you have RCON access and an API token. If you don't have an API token yet, you can obtain one by visiting the Battlemetrics developers page.

Installation

  1. Clone or Install this repo:

    Clone this repository

    git clone https://github.com/Gnomeslayer/battlemetrics.git
    

    Pip install

    pip install battlemetrics
    
  2. Install the required dependencies

    or you can do:

    pip install -r requirements.txt
    
  3. Import the Battlemetrics class into your project.

    from battlemetrics import Battlemetrics
    

Usage

Refer to example file for examples. Here's an example of how to use the Battlemetrics API wrapper:

# Instantiate the API wrapper with your token
bmapi = battlemetrics("Your token here")

# Retrieve player information
player = asyncio.run(bmapi.player.search(12345))

# Print the player information
print(player)

Make sure to replace "Your API token here" with your actual API token obtained from the Battlemetrics developers page.

Resources

For more details on the Battlemetrics API and its capabilities, refer to the official Battlemetrics API.

Contributing

If you find any issues or have suggestions for improvement, please feel free to submit a pull request or open an issue in the issue tracker. I welcome contributions from the community!

Contact

You can contact me on Discord, simply add me: gnomeslayer or, you can join the official Battlemetrics discord and @gnomeslayer there.

Suport

This repository will ALWAYS be free and hopefully regularly updated, but if you want to support me, you can do so Here

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

battlemetrics-1.0.12.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

battlemetrics-1.0.12-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

Details for the file battlemetrics-1.0.12.tar.gz.

File metadata

  • Download URL: battlemetrics-1.0.12.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for battlemetrics-1.0.12.tar.gz
Algorithm Hash digest
SHA256 bb5cebdcbc814ade86df1fdc4c71fae73cbf3b6bfd2ce7c625dc678b0354d8da
MD5 902f1f6812d3c465435ffc37a66d9c59
BLAKE2b-256 1c094addd588c284a44433d54f314123994da9debf2ab60542c90169cf3a0b6d

See more details on using hashes here.

File details

Details for the file battlemetrics-1.0.12-py3-none-any.whl.

File metadata

File hashes

Hashes for battlemetrics-1.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 1f3d276d1eb336703b97b94d5797abb6d2b8e8f51f32fb519cb5cf36f90734ee
MD5 4b9b3f25c534a4586dc705dfe93f76b2
BLAKE2b-256 1c4d64f9ca9db248c6b74b2fe2f0bc97904ad9b46557f509710b267121170d8e

See more details on using hashes here.

Supported by

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