Package com.smell.application.structure
Class EveService
java.lang.Object
com.smell.application.structure.EveService
Provides access to the EVE Online API to retrieve data related to characters, corporations, and alliances.
This service class handles HTTP requests and JSON parsing to return Java objects representing the data.
Each method in this class is designed to fetch specific types of data by making HTTP GET requests to the EVE Online API,
and parsing the resulting JSON into predefined data structures.
- Since:
- 24/04/24
- Version:
- ${version}
- Author:
- FlynnDynamics
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAllianceDetails(long allianceId) Fetches detailed information about a specific alliance from the EVE Online API.getAllianceHistory(long corporationId) Retrieves a history of all alliances that a specific corporation has been part of.getCharacterDetails(long characterId) Fetches detailed information about a specific character from the EVE Online API.getCorporationDetails(long corporationId) Fetches detailed information about a specific corporation from the EVE Online API.getCorporationHistory(long characterId) Retrieves a history of all corporations that a specific character has been part of.
-
Constructor Details
-
EveService
public EveService()
-
-
Method Details
-
getCharacterDetails
Fetches detailed information about a specific character from the EVE Online API. The method constructs an API request, sends it, and processes the JSON response into an EVE_Character object.- Parameters:
characterId- The unique identifier for the character- Returns:
- EVE_Character object containing detailed information about the character
- Throws:
IOException- If an error occurs during the HTTP request or processingInterruptedException- If the operation is interrupted during execution
-
getCorporationDetails
public EVE_Corporation getCorporationDetails(long corporationId) throws IOException, InterruptedException Fetches detailed information about a specific corporation from the EVE Online API. Similar to character details, this method returns an EVE_Corporation object representing the corporation.- Parameters:
corporationId- The unique identifier for the corporation- Returns:
- EVE_Corporation object containing detailed information about the corporation
- Throws:
IOException- If an error occurs during the HTTP request or processingInterruptedException- If the operation is interrupted during execution
-
getAllianceDetails
Fetches detailed information about a specific alliance from the EVE Online API. The data fetched includes the name, identifier, and other relevant details wrapped in an EVE_Alliance object.- Parameters:
allianceId- The unique identifier for the alliance- Returns:
- EVE_Alliance object containing detailed information about the alliance
- Throws:
IOException- If an error occurs during the HTTP request or processingInterruptedException- If the operation is interrupted during execution
-
getCorporationHistory
public CorporationHistory[] getCorporationHistory(long characterId) throws IOException, InterruptedException Retrieves a history of all corporations that a specific character has been part of. The method returns an array of CorporationHistory objects, each representing a period the character was associated with a corporation.- Parameters:
characterId- The unique identifier for the character- Returns:
- An array of CorporationHistory objects detailing historical corporation affiliations
- Throws:
IOException- If an error occurs during the HTTP request or processingInterruptedException- If the operation is interrupted during execution
-
getAllianceHistory
public AllianceHistory[] getAllianceHistory(long corporationId) throws IOException, InterruptedException Retrieves a history of all alliances that a specific corporation has been part of. The method returns an array of AllianceHistory objects, each representing a period the corporation was associated with an alliance.- Parameters:
corporationId- The unique identifier for the corporation- Returns:
- An array of AllianceHistory objects detailing historical alliance affiliations
- Throws:
IOException- If an error occurs during the HTTP request or processingInterruptedException- If the operation is interrupted during execution
-