The Eve Metro API is a RESTful API designed for the Eden Navigator project, which provides access to various data related to the EVE Online universe. This server facilitates the retrieval of information about solar systems, connections, and access levels for characters, corporations, and alliances.
- API Key Validation: Ensures that only authorized users can access the API by validating API keys against a predefined list.
- Access Check: Allows users to check access levels for characters, corporations, and alliances.
- Database Integration: Utilizes PostgreSQL for data storage and retrieval, managed through Knex.js.
- Environment Configuration: Uses environment variables for sensitive configurations, such as database credentials and server port.
This endpoint provides pochven system array with connecting edges.
- x-api-key: Your API key for authentication. This header is required for accessing the endpoint.
{
"character_id": "123456",
"corporation_id": "654321",
"alliance_id": "789012"
}- 200 OK: Access level information and connections if access is granted.
- 400 Bad Request: If none of the IDs are provided.
- 403 Forbidden: If the API key is invalid.
{
"access": true,
"connections": [
{
"systemId": "string",
"systemName": "string",
"systemSecurityStatus": -1.0,
"shipSize": "string | undefined",
"systemEdges": [
{
"solarSystemIdDst": "string",
"solarSystemNameDst": "string",
"edgeSource": "trig-map",
"signatureSrc": "string",
"signatureDst": "string",
"wormholeTypeSrc": "string",
"wormholeTypeDst": "string",
"wormholeMass": "critical | stable",
"wormholeEol": "critical | stable",
"createdTime": "string",
"lastSeenTime": "string"
}
]
}
]
}-
Clone the repository.
-
Install dependencies:
npm install
-
Create a
.envfile in the root directory and configure the following variables:PORT=3000 DB_HOST=your_database_host DB_USER=your_database_user DB_PASSWORD=your_database_password DB_NAME=your_database_name -
Start the server:
npm start
The API uses a config.json file to store API keys. This file should be located in the root directory of the project and should be structured as follows:
{
"apiKeys": [
"your-api-key-1",
"your-api-key-2",
"your-api-key-3"
]
}Make sure to replace the placeholder values with your actual API keys. The API will validate incoming requests against the keys listed in this file.
- Express: Web framework for Node.js.
- Knex: SQL query builder for Node.js.
- Zod: TypeScript-first schema declaration and validation library.
- dotenv: Module to load environment variables from a
.envfile.
This project is licensed under the MIT License.