Skip to main content

Python wrapper for https://apexlegendsapi.com

Project description

apex-legends-api

Python wrapper for https://apexlegendsapi.com

Installation

You can install it from source, or pip (recommended)

Requirements

python >= 3.6

Source installation

python ./setup.py install

Pip installation

pip install apex-legends-api

Usage

  • Register for an API Key at Apex Legends API
  • Here's a quick snippet to get started
  • All method calls return a dictionary representing the JSON in the response.
from apex_legends_api import ApexLegendsAPI, ALPlatform, ALAction, ALPlayer

api = ApexLegendsAPI(api_key='<api_key>')

player_name = '<PlayerName>'
platform = ALPlatform.PC
action = ALAction.GET

# Example 1:
# straight API calls
basic = api.basic_player_stats(player_name=player_name, platform=platform)
history = api.match_history(player_name=player_name, platform=platform, action=action)
origin_player = api.get_player_origin(player_name=player_name, show_all_hits=True)

print(basic)
print(history)
print(origin_player)

# Example 2:
# retrieve an 'ALPlayer' object
player: ALPlayer = api.get_player(name=player_name, platform=platform)
print(player.origin_info)
print(player.matches_tracked)

Notes

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

apex-legends-api-0.3.0.tar.gz (4.5 kB view hashes)

Uploaded Source

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