hd2api.services package

Submodules

hd2api.services.async_None_service module

async hd2api.services.async_None_service.Get(api_config_override: APIConfig | None = None) str

hd2api.services.async_comm_service module

async hd2api.services.async_comm_service.GetApiV1Assignments(index: int, api_config_override: APIConfig | None = None) Assignment2
async hd2api.services.async_comm_service.GetApiV1AssignmentsAll(api_config_override: APIConfig | None = None) List[Assignment2]
async hd2api.services.async_comm_service.GetApiV1Campaigns(index: int, api_config_override: APIConfig | None = None) Campaign2
async hd2api.services.async_comm_service.GetApiV1CampaignsAll(api_config_override: APIConfig | None = None) List[Campaign2]
async hd2api.services.async_comm_service.GetApiV1Dispatches(index: int, api_config_override: APIConfig | None = None) Dispatch
async hd2api.services.async_comm_service.GetApiV1DispatchesAll(api_config_override: APIConfig | None = None) List[Dispatch]
async hd2api.services.async_comm_service.GetApiV1PlanetEvents(api_config_override: APIConfig | None = None) List[Planet]
async hd2api.services.async_comm_service.GetApiV1Planets(index: int, api_config_override: APIConfig | None = None) Planet
async hd2api.services.async_comm_service.GetApiV1PlanetsAll(api_config_override: APIConfig | None = None) List[Planet]
async hd2api.services.async_comm_service.GetApiV1Steam(api_config_override: APIConfig | None = None) List[SteamNews]
async hd2api.services.async_comm_service.GetApiV1Steam2(gid: str, api_config_override: APIConfig | None = None) List[SteamNews]
async hd2api.services.async_comm_service.GetApiV1War(api_config_override: APIConfig | None = None) War
async hd2api.services.async_comm_service.GetCommApiRawAll(api_config_override: APIConfig | None = None) DiveharderAll
async hd2api.services.async_comm_service.GetCommApiRawAssignment(api_config_override: APIConfig | None = None) Assignment
async hd2api.services.async_comm_service.GetCommApiRawNewsFeed(api_config_override: APIConfig | None = None, fromTimestamp=None) List[NewsFeedItem]
async hd2api.services.async_comm_service.GetCommApiRawSpaceStation(station_id: int, api_config_override: APIConfig | None = None) SpaceStation
async hd2api.services.async_comm_service.GetCommApiRawSummary(api_config_override: APIConfig | None = None) WarSummary
async hd2api.services.async_comm_service.GetCommApiRawWarInfo(api_config_override: APIConfig | None = None) WarInfo
async hd2api.services.async_comm_service.GetCommApiRawWarStatus(api_config_override: APIConfig | None = None) WarStatus
async hd2api.services.async_comm_service.make_comm_raw_api_request(endpoint: str, model: Type[T], index: int | None = None, api_config_override: APIConfig | None = None, params: dict | None = None) T | List[T]

Get a raw api object from the Community api.

async hd2api.services.async_comm_service.make_comm_v1_api_request(endpoint: str, model: Type[T], index: int | None = None, api_config_override: APIConfig | None = None) T | List[T]

Make an API Request for a built object using the Community API Wrapper.

hd2api.services.async_direct_service module

async hd2api.services.async_direct_service.GetApiDirectAll(api_config_override: APIConfig | None = None) DiveharderAll
async hd2api.services.async_direct_service.GetApiDirectAssignment(api_config_override: APIConfig | None = None) List[Assignment]
async hd2api.services.async_direct_service.GetApiDirectNewsFeed(api_config_override: APIConfig | None = None, fromTimestamp=None) List[NewsFeedItem]
async hd2api.services.async_direct_service.GetApiDirectSpaceStation(station_id: int, api_config_override: APIConfig | None = None) SpaceStation
async hd2api.services.async_direct_service.GetApiDirectSummary(api_config_override: APIConfig | None = None) WarSummary
async hd2api.services.async_direct_service.GetApiDirectWarInfo(api_config_override: APIConfig | None = None) WarInfo
async hd2api.services.async_direct_service.GetApiDirectWarStatus(api_config_override: APIConfig | None = None) WarStatus | None
async hd2api.services.async_direct_service.make_direct_api_request(endpoint: str, model: Type[T], api_config_override: APIConfig | None = None, params: dict | None = None) T | List[T] | None

Get a raw api object directly from arrowhead’s api.

hd2api.services.async_diveh_service module

async hd2api.services.async_diveh_service.GetDhApiRawAll(api_config_override: APIConfig | None = None) DiveharderAll
async hd2api.services.async_diveh_service.GetDhApiRawAssignment(api_config_override: APIConfig | None = None) Assignment
async hd2api.services.async_diveh_service.GetDhApiRawNewsFeed(api_config_override: APIConfig | None = None) List[NewsFeedItem]
async hd2api.services.async_diveh_service.GetDhApiRawSpaceStation(station_id: int, api_config_override: APIConfig | None = None) SpaceStation
async hd2api.services.async_diveh_service.GetDhApiRawSummary(api_config_override: APIConfig | None = None) WarSummary
async hd2api.services.async_diveh_service.GetDhApiRawWarInfo(api_config_override: APIConfig | None = None) WarInfo
async hd2api.services.async_diveh_service.GetDhApiRawWarStatus(api_config_override: APIConfig | None = None) WarStatus
async hd2api.services.async_diveh_service.make_raw_api_request(endpoint: str, model: Type[T], api_config_override: APIConfig | None = None, path2=False, params: Dict | None = None) T | List[T]

Get a raw api object from diveharder.

hd2api.services.async_raw_service module

async hd2api.services.async_raw_service.GetApiRawAll(api_config_override: APIConfig, direct=False) DiveharderAll

Retrieve all raw data from the api, optionally using the direct method.

async hd2api.services.async_raw_service.GetApiRawAssignment(api_config_override: APIConfig) Assignment

Retrieve the raw assignment from the default raw api.

async hd2api.services.async_raw_service.GetApiRawNewsFeed(api_config_override: APIConfig) List[NewsFeedItem]

Retrieve the raw news feed from the default raw api.

async hd2api.services.async_raw_service.GetApiRawSpaceStation(station_id: int, api_config_override: APIConfig) List[NewsFeedItem]

Retrieve the raw news feed from the default raw api.

async hd2api.services.async_raw_service.GetApiRawSummary(api_config_override: APIConfig) WarSummary

Retrieve the raw war summary from the default raw api.

async hd2api.services.async_raw_service.GetApiRawWarInfo(api_config_override: APIConfig) WarInfo

Retrieve the additional war info from the default raw api.

async hd2api.services.async_raw_service.GetApiRawWarStatus(api_config_override: APIConfig) WarStatus

Retrieve the raw war status from the default raw api.

hd2api.services.service_utils module

hd2api.services.service_utils.make_output(data: Any, model: Type[T], index: int | None = None) T | List[T]

Process the API response data based on the model type and index.

Parameters:
  • data (Any) – The raw API response data.

  • model (Type[T]) – The model class to instantiate.

  • index (Optional[int]) – An optional index for single-item responses.

Returns:

The processed model instance(s).

Return type:

Union[Any, List[Any]]

Module contents

async hd2api.services.GetApiDirectAll(api_config_override: APIConfig | None = None) DiveharderAll
async hd2api.services.GetApiDirectAssignment(api_config_override: APIConfig | None = None) List[Assignment]
async hd2api.services.GetApiDirectNewsFeed(api_config_override: APIConfig | None = None, fromTimestamp=None) List[NewsFeedItem]
async hd2api.services.GetApiDirectSpaceStation(station_id: int, api_config_override: APIConfig | None = None) SpaceStation
async hd2api.services.GetApiDirectSummary(api_config_override: APIConfig | None = None) WarSummary
async hd2api.services.GetApiDirectWarInfo(api_config_override: APIConfig | None = None) WarInfo
async hd2api.services.GetApiDirectWarStatus(api_config_override: APIConfig | None = None) WarStatus | None
async hd2api.services.GetApiRawAll(api_config_override: APIConfig, direct=False) DiveharderAll

Retrieve all raw data from the api, optionally using the direct method.

async hd2api.services.GetApiRawAssignment(api_config_override: APIConfig) Assignment

Retrieve the raw assignment from the default raw api.

async hd2api.services.GetApiRawNewsFeed(api_config_override: APIConfig) List[NewsFeedItem]

Retrieve the raw news feed from the default raw api.

async hd2api.services.GetApiRawSpaceStation(station_id: int, api_config_override: APIConfig) List[NewsFeedItem]

Retrieve the raw news feed from the default raw api.

async hd2api.services.GetApiRawSummary(api_config_override: APIConfig) WarSummary

Retrieve the raw war summary from the default raw api.

async hd2api.services.GetApiRawWarInfo(api_config_override: APIConfig) WarInfo

Retrieve the additional war info from the default raw api.

async hd2api.services.GetApiRawWarStatus(api_config_override: APIConfig) WarStatus

Retrieve the raw war status from the default raw api.

async hd2api.services.GetApiV1Assignments(index: int, api_config_override: APIConfig | None = None) Assignment2
async hd2api.services.GetApiV1AssignmentsAll(api_config_override: APIConfig | None = None) List[Assignment2]
async hd2api.services.GetApiV1Campaigns(index: int, api_config_override: APIConfig | None = None) Campaign2
async hd2api.services.GetApiV1CampaignsAll(api_config_override: APIConfig | None = None) List[Campaign2]
async hd2api.services.GetApiV1Dispatches(index: int, api_config_override: APIConfig | None = None) Dispatch
async hd2api.services.GetApiV1DispatchesAll(api_config_override: APIConfig | None = None) List[Dispatch]
async hd2api.services.GetApiV1PlanetEvents(api_config_override: APIConfig | None = None) List[Planet]
async hd2api.services.GetApiV1Planets(index: int, api_config_override: APIConfig | None = None) Planet
async hd2api.services.GetApiV1PlanetsAll(api_config_override: APIConfig | None = None) List[Planet]
async hd2api.services.GetApiV1Steam(api_config_override: APIConfig | None = None) List[SteamNews]
async hd2api.services.GetApiV1Steam2(gid: str, api_config_override: APIConfig | None = None) List[SteamNews]
async hd2api.services.GetApiV1War(api_config_override: APIConfig | None = None) War
async hd2api.services.GetCommApiRawAssignment(api_config_override: APIConfig | None = None) Assignment
async hd2api.services.GetCommApiRawNewsFeed(api_config_override: APIConfig | None = None, fromTimestamp=None) List[NewsFeedItem]
async hd2api.services.GetCommApiRawSpaceStation(station_id: int, api_config_override: APIConfig | None = None) SpaceStation
async hd2api.services.GetCommApiRawSummary(api_config_override: APIConfig | None = None) WarSummary
async hd2api.services.GetCommApiRawWarInfo(api_config_override: APIConfig | None = None) WarInfo
async hd2api.services.GetCommApiRawWarStatus(api_config_override: APIConfig | None = None) WarStatus
async hd2api.services.GetDhApiRawAll(api_config_override: APIConfig | None = None) DiveharderAll
async hd2api.services.GetDhApiRawAssignment(api_config_override: APIConfig | None = None) Assignment
async hd2api.services.GetDhApiRawNewsFeed(api_config_override: APIConfig | None = None) List[NewsFeedItem]
async hd2api.services.GetDhApiRawSpaceStation(station_id: int, api_config_override: APIConfig | None = None) SpaceStation
async hd2api.services.GetDhApiRawSummary(api_config_override: APIConfig | None = None) WarSummary
async hd2api.services.GetDhApiRawWarInfo(api_config_override: APIConfig | None = None) WarInfo
async hd2api.services.GetDhApiRawWarStatus(api_config_override: APIConfig | None = None) WarStatus