PROOF OF CONCEPT API for Tower Heroes This is a simple Flask API to fetch Tower Hero character data.
- Python 3.x: Make sure you have Python 3.x installed. You can download it from python.org.
- pip: Ensure you have pip (Python package installer) installed. It usually comes with Python.
-
Clone the Repository:
git clone https://github.com/ProjectAnndromeda/towerheroes-api.git cd towerheroes-api -
Create a Virtual Environment (optional but recommended):
python -m venv venv
-
Activate the Virtual Environment:
-
Windows Command Prompt:
venv\Scripts\activate
-
Windows PowerShell:
.\venv\Scripts\Activate.ps1
-
macOS/Linux:
source venv/bin/activate
-
-
Install Dependencies:
pip install -r requirements.txt
-
Run the Flask Application:
flask run
-
Access the API:
Open Google Chrome or API client (like Postman) and navigate to:
http://127.0.0.1:5000/get_tower_info?tower_type=Chef (or any other tower type)
{
"gender": "Male",
"price": "0",
"limit": "12",
},
{
"level 1": {
"mana_cost": "5",
"damage": "10",
"range": "7",
"detection": true,
"rate": "1.5",
"dps": "6.67"
},
}
{
"level 2": {
"mana_cost": "10",
"damage": "20",
"range": "8",
"detection": true,
"rate": "1.4",
"dps": "14.29"
}
}This API is currently in alpha. Many features do not work as intended. Consider checking the issues tab on GitHub.
If you use or modify this code, please include the following attribution in any related documentation or publicly accessible materials: "Powered by Anndromeda™ by Alina."
This code is provided under the terms of the LICENSE.md file included in this distribution.