WarEraAPI 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wareraapi-0.1.0/LICENSE +21 -0
- wareraapi-0.1.0/PKG-INFO +92 -0
- wareraapi-0.1.0/README.md +81 -0
- wareraapi-0.1.0/pyproject.toml +22 -0
- wareraapi-0.1.0/setup.cfg +4 -0
- wareraapi-0.1.0/src/WarEraAPI/__init__.py +2 -0
- wareraapi-0.1.0/src/WarEraAPI/client.py +1369 -0
- wareraapi-0.1.0/src/WarEraAPI/errors.py +22 -0
- wareraapi-0.1.0/src/WarEraAPI/types/__init__.py +49 -0
- wareraapi-0.1.0/src/WarEraAPI/types/article.py +28 -0
- wareraapi-0.1.0/src/WarEraAPI/types/battle.py +32 -0
- wareraapi-0.1.0/src/WarEraAPI/types/battle_data.py +11 -0
- wareraapi-0.1.0/src/WarEraAPI/types/battle_order.py +27 -0
- wareraapi-0.1.0/src/WarEraAPI/types/company.py +51 -0
- wareraapi-0.1.0/src/WarEraAPI/types/constants.py +473 -0
- wareraapi-0.1.0/src/WarEraAPI/types/country.py +42 -0
- wareraapi-0.1.0/src/WarEraAPI/types/entity_upgrade.py +31 -0
- wareraapi-0.1.0/src/WarEraAPI/types/event.py +20 -0
- wareraapi-0.1.0/src/WarEraAPI/types/game_dates.py +23 -0
- wareraapi-0.1.0/src/WarEraAPI/types/government.py +14 -0
- wareraapi-0.1.0/src/WarEraAPI/types/item_offer.py +0 -0
- wareraapi-0.1.0/src/WarEraAPI/types/military_unit.py +32 -0
- wareraapi-0.1.0/src/WarEraAPI/types/production_bonus.py +11 -0
- wareraapi-0.1.0/src/WarEraAPI/types/rankings.py +21 -0
- wareraapi-0.1.0/src/WarEraAPI/types/recommended_region.py +26 -0
- wareraapi-0.1.0/src/WarEraAPI/types/region.py +46 -0
- wareraapi-0.1.0/src/WarEraAPI/types/round.py +26 -0
- wareraapi-0.1.0/src/WarEraAPI/types/search_result.py +12 -0
- wareraapi-0.1.0/src/WarEraAPI/types/trading_order.py +26 -0
- wareraapi-0.1.0/src/WarEraAPI/types/transactions/__init__.py +9 -0
- wareraapi-0.1.0/src/WarEraAPI/types/transactions/article_tip_tx.py +22 -0
- wareraapi-0.1.0/src/WarEraAPI/types/transactions/battle_loot_tx.py +25 -0
- wareraapi-0.1.0/src/WarEraAPI/types/transactions/craft_item_tx.py +25 -0
- wareraapi-0.1.0/src/WarEraAPI/types/transactions/dismantle_item_tx.py +25 -0
- wareraapi-0.1.0/src/WarEraAPI/types/transactions/donation_tx.py +24 -0
- wareraapi-0.1.0/src/WarEraAPI/types/transactions/item_market_tx.py +28 -0
- wareraapi-0.1.0/src/WarEraAPI/types/transactions/open_case_tx.py +26 -0
- wareraapi-0.1.0/src/WarEraAPI/types/transactions/trading_tx.py +26 -0
- wareraapi-0.1.0/src/WarEraAPI/types/transactions/wage_tx.py +23 -0
- wareraapi-0.1.0/src/WarEraAPI/types/user.py +50 -0
- wareraapi-0.1.0/src/WarEraAPI/types/user_equipments.py +20 -0
- wareraapi-0.1.0/src/WarEraAPI/types/work_offer.py +30 -0
- wareraapi-0.1.0/src/WarEraAPI/types/worker.py +25 -0
- wareraapi-0.1.0/src/WarEraAPI/utils.py +95 -0
- wareraapi-0.1.0/src/WarEraAPI.egg-info/PKG-INFO +92 -0
- wareraapi-0.1.0/src/WarEraAPI.egg-info/SOURCES.txt +47 -0
- wareraapi-0.1.0/src/WarEraAPI.egg-info/dependency_links.txt +1 -0
- wareraapi-0.1.0/src/WarEraAPI.egg-info/requires.txt +1 -0
- wareraapi-0.1.0/src/WarEraAPI.egg-info/top_level.txt +1 -0
wareraapi-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SpicyPenguin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
wareraapi-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: WarEraAPI
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: an api client for the online Multiplayer game WarEra written in python (unfinished)
|
|
5
|
+
Author-email: SpicyPenguin <kerolisand@gmail.com>
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Dist: aiohttp>=3.13.4
|
|
10
|
+
Dynamic: license-file
|
|
11
|
+
|
|
12
|
+
# WarEraAPI (unofficial)
|
|
13
|
+
|
|
14
|
+
An API client for the online multiplayer game WarEra written in Python.
|
|
15
|
+
|
|
16
|
+
## Overview
|
|
17
|
+
|
|
18
|
+
WarEraAPI is an asynchronous Python client that provides access to (most of) the WarEra game API. It allows developers to interact with various aspects of the game including companies, battles, users, articles, MUs, and more.
|
|
19
|
+
|
|
20
|
+
## Features
|
|
21
|
+
|
|
22
|
+
- **Comprehensive API Coverage**: Access to most WarEra API endpoints
|
|
23
|
+
- **Asynchronous Support**: Built with `aiohttp` for efficient async operations
|
|
24
|
+
- **Type Safety**: Full type hints and data models for all API responses
|
|
25
|
+
- **Pagination Support**: Built-in pagination handling for large datasets
|
|
26
|
+
- **Rate Limiting Support**: yeah, thats it
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install WarEraAPI
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Requirements
|
|
35
|
+
|
|
36
|
+
- Python 3.10+
|
|
37
|
+
- aiohttp>=3.13.4
|
|
38
|
+
|
|
39
|
+
## Quick Start
|
|
40
|
+
|
|
41
|
+
```python
|
|
42
|
+
import asyncio
|
|
43
|
+
from WarEraAPI import WarEraClient
|
|
44
|
+
|
|
45
|
+
async def main():
|
|
46
|
+
# Initialize client with API key (optional)
|
|
47
|
+
client = WarEraClient(api_key="your_api_key_here")
|
|
48
|
+
|
|
49
|
+
# Get user information
|
|
50
|
+
user = await client.get_user(userId="user_id_here")
|
|
51
|
+
print(user)
|
|
52
|
+
|
|
53
|
+
# Get 3 active battles
|
|
54
|
+
battles = await client.get_battles(limit=3, isActive=True)
|
|
55
|
+
print(battles)
|
|
56
|
+
|
|
57
|
+
# Get company information
|
|
58
|
+
company = await client.get_company(companyId="company_id_here")
|
|
59
|
+
print(company)
|
|
60
|
+
|
|
61
|
+
# Run the async function
|
|
62
|
+
asyncio.run(main())
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Development
|
|
66
|
+
|
|
67
|
+
This project is currently in development and provides access to most of the WarEra API. The full API is not fully documented in the current time so further developments intend to support as much from the api as possible
|
|
68
|
+
|
|
69
|
+
### Currently Unsupported Documented Endpoints
|
|
70
|
+
|
|
71
|
+
* battleRanking
|
|
72
|
+
* getRanking
|
|
73
|
+
* itemOffer
|
|
74
|
+
* getById
|
|
75
|
+
* gameConfig
|
|
76
|
+
* getGameConfig
|
|
77
|
+
|
|
78
|
+
### Roadmap
|
|
79
|
+
|
|
80
|
+
- [ ] adding use examples
|
|
81
|
+
- [ ] documenting types
|
|
82
|
+
- [ ] implementing the unsupported endpoints
|
|
83
|
+
- [ ] add more abstract/QOL methods
|
|
84
|
+
|
|
85
|
+
## License
|
|
86
|
+
|
|
87
|
+
This project is open source and available under the [MIT License](LICENSE).
|
|
88
|
+
|
|
89
|
+
## Contact
|
|
90
|
+
|
|
91
|
+
- **Author**: SpicyPenguin
|
|
92
|
+
- **Email**: kerolisand@gmail.com
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# WarEraAPI (unofficial)
|
|
2
|
+
|
|
3
|
+
An API client for the online multiplayer game WarEra written in Python.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
WarEraAPI is an asynchronous Python client that provides access to (most of) the WarEra game API. It allows developers to interact with various aspects of the game including companies, battles, users, articles, MUs, and more.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- **Comprehensive API Coverage**: Access to most WarEra API endpoints
|
|
12
|
+
- **Asynchronous Support**: Built with `aiohttp` for efficient async operations
|
|
13
|
+
- **Type Safety**: Full type hints and data models for all API responses
|
|
14
|
+
- **Pagination Support**: Built-in pagination handling for large datasets
|
|
15
|
+
- **Rate Limiting Support**: yeah, thats it
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pip install WarEraAPI
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Requirements
|
|
24
|
+
|
|
25
|
+
- Python 3.10+
|
|
26
|
+
- aiohttp>=3.13.4
|
|
27
|
+
|
|
28
|
+
## Quick Start
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
import asyncio
|
|
32
|
+
from WarEraAPI import WarEraClient
|
|
33
|
+
|
|
34
|
+
async def main():
|
|
35
|
+
# Initialize client with API key (optional)
|
|
36
|
+
client = WarEraClient(api_key="your_api_key_here")
|
|
37
|
+
|
|
38
|
+
# Get user information
|
|
39
|
+
user = await client.get_user(userId="user_id_here")
|
|
40
|
+
print(user)
|
|
41
|
+
|
|
42
|
+
# Get 3 active battles
|
|
43
|
+
battles = await client.get_battles(limit=3, isActive=True)
|
|
44
|
+
print(battles)
|
|
45
|
+
|
|
46
|
+
# Get company information
|
|
47
|
+
company = await client.get_company(companyId="company_id_here")
|
|
48
|
+
print(company)
|
|
49
|
+
|
|
50
|
+
# Run the async function
|
|
51
|
+
asyncio.run(main())
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Development
|
|
55
|
+
|
|
56
|
+
This project is currently in development and provides access to most of the WarEra API. The full API is not fully documented in the current time so further developments intend to support as much from the api as possible
|
|
57
|
+
|
|
58
|
+
### Currently Unsupported Documented Endpoints
|
|
59
|
+
|
|
60
|
+
* battleRanking
|
|
61
|
+
* getRanking
|
|
62
|
+
* itemOffer
|
|
63
|
+
* getById
|
|
64
|
+
* gameConfig
|
|
65
|
+
* getGameConfig
|
|
66
|
+
|
|
67
|
+
### Roadmap
|
|
68
|
+
|
|
69
|
+
- [ ] adding use examples
|
|
70
|
+
- [ ] documenting types
|
|
71
|
+
- [ ] implementing the unsupported endpoints
|
|
72
|
+
- [ ] add more abstract/QOL methods
|
|
73
|
+
|
|
74
|
+
## License
|
|
75
|
+
|
|
76
|
+
This project is open source and available under the [MIT License](LICENSE).
|
|
77
|
+
|
|
78
|
+
## Contact
|
|
79
|
+
|
|
80
|
+
- **Author**: SpicyPenguin
|
|
81
|
+
- **Email**: kerolisand@gmail.com
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "WarEraAPI"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "an api client for the online Multiplayer game WarEra written in python (unfinished)"
|
|
9
|
+
authors = [
|
|
10
|
+
{ name = "SpicyPenguin", email = "kerolisand@gmail.com" }
|
|
11
|
+
]
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
requires-python = ">=3.10"
|
|
14
|
+
dependencies = [
|
|
15
|
+
"aiohttp>=3.13.4"
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
[tool.setuptools.packages.find]
|
|
19
|
+
where = ["src"]
|
|
20
|
+
|
|
21
|
+
[tool.setuptools]
|
|
22
|
+
package-dir = {"" = "src"}
|