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.
import sys
from apex_legends_api import ApexLegendsAPI,\
ALPlatform,\
ALPlayer,\
ALAction,\
ALHTTPExceptionFromResponse
from apex_legends_api.al_base import print_description
api = ApexLegendsAPI(api_key='<api_key>')
player_name = str("PlayerName")
platform = ALPlatform.PC
action = ALAction.GET
# Example 1:
# straight API calls
try:
basic = api.basic_player_stats(player_name=player_name, platform=platform)
history = api.events(player_name=player_name, platform=platform, action=action)
origin_player = api.get_player_origin(player_name=player_name, show_all_hits=True)
except ALHTTPExceptionFromResponse as exception:
print(exception)
sys.exit()
print(basic)
print(history)
print(origin_player)
# Example 2:
# retrieve an 'ALPlayer' object
player: ALPlayer = api.get_player(name=player_name, platform=platform)
print_description(player)
Notes
- See https://apexlegendsapi.com for complete documentation.
- See CHANGELOG.md for history of changes
Project details
Release history Release notifications | RSS feed
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-1.3.2.tar.gz
(9.1 kB
view hashes)
Built Distribution
Close
Hashes for apex_legends_api-1.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4e7ae90cc10f7a73ccb43a7423674c3ced29d608db460495911460e6abf1879 |
|
MD5 | 695f0907717f85b7d60a25f821133b75 |
|
BLAKE2b-256 | 56ef2387695e33c1eb2058a7d785f7dc15afb46c40c4433d5c383fd877ac0114 |