The Ikabot API is a RESTful service crafted to augment Ikabot's capabilities across various scenarios.
Effortlessly handle login captchas with automatic resolution.
Automatically resolve captchas associated with piracy-related actions.
Generate Blackbox tokens for streamlined authentication.
The Ikabot API is hosted and publicly accessible. No installation is required; refer to the Wiki for details on available endpoints and their usage.
To host the API in a production Linux environment, Docker must be installed on your system.
You can launch the API using one of the following methods, depending on whether you want to use Nginx or an existing reverse proxy.
-
Download the source code from the repository (ZIP or Git clone).
-
Navigate to the downloaded source code directory.
-
Run the following Docker Compose command to build and launch the API:
docker-compose up -d --build
The default listening port is set to 80; you can adjust this in the Nginx configuration:
/nginx/app.conf
.
If you already have a reverse proxy configured on your environment, you can run the API without Nginx:
-
Download the source code from the repository (ZIP or Git clone).
-
Navigate to the downloaded source code directory.
-
Run the following Docker commands to build and launch the API:
docker build -t ikabotapi . docker run -d -p 5005:5005 ikabotapi
The default listening port is set to 5005. You can map a different port according to your environment. For example, to map port 8000 to the API's port 5005, use the following command:
docker run -d -p 8000:5005 ikabotapi
Before setting up and launching the API, make sure to have the following prerequisites installed:
- Python 3.10: Ensure that Python 3.10 is installed on your system.
- pip: The Python package installer. Make sure it is installed as it is necessary for managing the project dependencies.
Once the prerequisites are in place, follow these steps to set up your development environment:
- Download the source code from the repository (ZIP or Git clone).
- Navigate to the downloaded source code directory.
- Install the project dependencies by running:
pip install -r requirements.txt
- Install Playwright (the automation library for browser testing and web scraping used in the project):
python -m playwright install
Once the environment is set up, you can proceed to launch the API using the following command:
python run.py
The API will be accessible at http://localhost:5000.
To ensure the reliability and correctness of the codebase, you can run the provided tests within the project.
- Install the required test dependencies with the following commands:
pip install pytest
pip install pytest-mock
- Execute the tests by running:
python -m pytest tests
NOTE: For enhanced testing convenience, you can configure tests within your IDE. In Visual Studio Code, for instance, follow these steps:
- Open the command palette using Ctrl+Shift+P.
- Select "Python: Configure Tests."
- Choose "pytest" as the testing framework.
After configuration, you can easily run tests by navigating to the test explorer.