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.6.tar.gz (22.2 kB view hashes)

Uploaded Source

Built Distribution

battlemetrics-1.0.6-py3-none-any.whl (27.4 kB view hashes)

Uploaded Python 3

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