The France Leader API requester.
Project description
Installation
pip install fl-api-requester
Usage
from fl_api_requester import *
connection_data = FLAPIConnectionData()
connection_data.api_uri = "http://localhost:8080"
connection_data.set_credentials("username", "password")
try:
api_requester = FLAPIRequester(connection_data)
# Login
api_requester.login()
# Get some data
player = api_requester.get_player("Galactifer")
alliance = api_requester.get_alliance("France Leader")
print(player)
print(alliance)
print(len(alliance.players))
# Get a War attack
attack = api_requester.get_player_attacks("Galactifer")
print(f"Galactifer attacked on {attack[0].timestamp_to_datetime():%d/%m/%Y at %H:%M:%S}")
except APIErrorException as e:
print(e.api_error)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fl-api-requester-1.0.11.tar.gz.
File metadata
- Download URL: fl-api-requester-1.0.11.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2069961888c25716c8bbe569ee8f8dbcf18b8c92bebd22546654c58c092e1c2
|
|
| MD5 |
1863beabbd62a53ec5dab5e6e2605b25
|
|
| BLAKE2b-256 |
8658e717d614a96efa0a42311fbabebac6813b6b93bef4c28e295d2df05a8e75
|
File details
Details for the file fl_api_requester-1.0.11-py3-none-any.whl.
File metadata
- Download URL: fl_api_requester-1.0.11-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cacbd76ae78af8afe15c02c9551c0e8b853e5cf233d0a63e42617887cd90fe55
|
|
| MD5 |
31ad307c185f909886d556ba504f36b6
|
|
| BLAKE2b-256 |
56c7194d0d6d9343c1dae9d4c6e5c12da1951ae9680978ff0eac539399f5041c
|