From 6452b082a834db19642f63549134961711d3c2b5 Mon Sep 17 00:00:00 2001 From: Joel Falknau Date: Sat, 24 May 2025 15:34:37 +1000 Subject: [PATCH] use new user-agent generator, drop specfile --- allianceauth/__init__.py | 2 +- allianceauth/eveonline/providers.py | 30 ++++++++--------------------- allianceauth/eveonline/swagger.json | 1 - allianceauth/srp/providers.py | 8 ++++---- allianceauth/srp/swagger.json | 1 - 5 files changed, 13 insertions(+), 29 deletions(-) delete mode 100644 allianceauth/eveonline/swagger.json delete mode 100644 allianceauth/srp/swagger.json diff --git a/allianceauth/__init__.py b/allianceauth/__init__.py index 09b9f7b8..b54bef25 100644 --- a/allianceauth/__init__.py +++ b/allianceauth/__init__.py @@ -6,6 +6,6 @@ manage online service access. # Django starts so that shared_task will use this app. __version__ = '5.0.0a1' -__title__ = 'Alliance Auth' +__title__ = 'AllianceAuth' __url__ = 'https://gitlab.com/allianceauth/allianceauth' NAME = f'{__title__} v{__version__}' diff --git a/allianceauth/eveonline/providers.py b/allianceauth/eveonline/providers.py index 0d231ead..dcb92c44 100644 --- a/allianceauth/eveonline/providers.py +++ b/allianceauth/eveonline/providers.py @@ -1,6 +1,7 @@ import logging import os +from bravado.client import SwaggerClient from bravado.exception import HTTPError, HTTPNotFound, HTTPUnprocessableEntity from jsonschema.exceptions import RefResolutionError @@ -8,7 +9,7 @@ from django.conf import settings from esi.clients import esi_client_factory -from allianceauth import __version__ +from allianceauth import __version__, __title__, __url__ from allianceauth.utils.django import StartupCommand SWAGGER_SPEC_PATH = os.path.join(os.path.dirname( @@ -175,34 +176,19 @@ class EveProvider: class EveSwaggerProvider(EveProvider): - def __init__(self, token=None, adapter=None): - if settings.DEBUG or StartupCommand().is_management_command: - self._client = None - logger.info('ESI client will be loaded on-demand') - else: - logger.info('Loading ESI client') - try: - self._client = esi_client_factory( - token=token, - spec_file=SWAGGER_SPEC_PATH, - app_info_text=f"allianceauth v{__version__}" - ) - except (HTTPError, RefResolutionError): - logger.exception( - 'Failed to load ESI client on startup. ' - 'Switching to on-demand loading for ESI client.' - ) - self._client = None - + def __init__(self, token=None, adapter=None) -> None: self._token = token self.adapter = adapter or self self._faction_list = None # what are the odds this will change? could cache forever! @property - def client(self): + def client(self) -> SwaggerClient: if self._client is None: self._client = esi_client_factory( - token=self._token, spec_file=SWAGGER_SPEC_PATH, app_info_text=("allianceauth v" + __version__) + token=self._token, + ua_appname=__title__, + ua_version=__version__, + ua_url=__url__, ) return self._client diff --git a/allianceauth/eveonline/swagger.json b/allianceauth/eveonline/swagger.json deleted file mode 100644 index d4c1bbb6..00000000 --- a/allianceauth/eveonline/swagger.json +++ /dev/null @@ -1 +0,0 @@ -{"consumes": ["application/json"], "definitions": {"bad_request": {"description": "Bad request model", "properties": {"error": {"description": "Bad request message", "type": "string"}}, "required": ["error"], "title": "Bad request", "type": "object"}, "error_limited": {"description": "Error limited model", "properties": {"error": {"description": "Error limited message", "type": "string"}}, "required": ["error"], "title": "Error limited", "type": "object"}, "forbidden": {"description": "Forbidden model", "properties": {"error": {"description": "Forbidden message", "type": "string"}, "sso_status": {"description": "status code received from SSO", "type": "integer"}}, "required": ["error"], "title": "Forbidden", "type": "object"}, "gateway_timeout": {"description": "Gateway timeout model", "properties": {"error": {"description": "Gateway timeout message", "type": "string"}, "timeout": {"description": "number of seconds the request was given", "type": "integer"}}, "required": ["error"], "title": "Gateway timeout", "type": "object"}, "internal_server_error": {"description": "Internal server error model", "properties": {"error": {"description": "Internal server error message", "type": "string"}}, "required": ["error"], "title": "Internal server error", "type": "object"}, "service_unavailable": {"description": "Service unavailable model", "properties": {"error": {"description": "Service unavailable message", "type": "string"}}, "required": ["error"], "title": "Service unavailable", "type": "object"}, "unauthorized": {"description": "Unauthorized model", "properties": {"error": {"description": "Unauthorized message", "type": "string"}}, "required": ["error"], "title": "Unauthorized", "type": "object"}}, "host": "esi.evetech.net", "info": {"description": "An OpenAPI for EVE Online", "title": "EVE Swagger Interface", "version": "1.10.1"}, "parameters": {"Accept-Language": {"default": "en", "description": "Language to use in the response", "enum": ["en", "en-us", "de", "fr", "ja", "ru", "zh", "ko", "es"], "in": "header", "name": "Accept-Language", "type": "string"}, "If-None-Match": {"description": "ETag from a previous request. A 304 will be returned if this matches the current ETag", "in": "header", "name": "If-None-Match", "type": "string"}, "alliance_id": {"description": "An EVE alliance ID", "format": "int32", "in": "path", "minimum": 1, "name": "alliance_id", "required": true, "type": "integer"}, "character_id": {"description": "An EVE character ID", "format": "int32", "in": "path", "minimum": 1, "name": "character_id", "required": true, "type": "integer"}, "corporation_id": {"description": "An EVE corporation ID", "format": "int32", "in": "path", "minimum": 1, "name": "corporation_id", "required": true, "type": "integer"}, "datasource": {"default": "tranquility", "description": "The server name you would like data from", "enum": ["tranquility"], "in": "query", "name": "datasource", "type": "string"}, "language": {"default": "en", "description": "Language to use in the response, takes precedence over Accept-Language", "enum": ["en", "en-us", "de", "fr", "ja", "ru", "zh", "ko", "es"], "in": "query", "name": "language", "type": "string"}, "page": {"default": 1, "description": "Which page of results to return", "format": "int32", "in": "query", "minimum": 1, "name": "page", "type": "integer"}, "token": {"description": "Access token to use if unable to set a header", "in": "query", "name": "token", "type": "string"}}, "produces": ["application/json"], "schemes": ["https"], "securityDefinitions": {"evesso": {"authorizationUrl": "https://login.eveonline.com/v2/oauth/authorize", "flow": "implicit", "scopes": {"esi-alliances.read_contacts.v1": "EVE SSO scope esi-alliances.read_contacts.v1", "esi-assets.read_assets.v1": "EVE SSO scope esi-assets.read_assets.v1", "esi-assets.read_corporation_assets.v1": "EVE SSO scope esi-assets.read_corporation_assets.v1", "esi-bookmarks.read_character_bookmarks.v1": "EVE SSO scope esi-bookmarks.read_character_bookmarks.v1", "esi-bookmarks.read_corporation_bookmarks.v1": "EVE SSO scope esi-bookmarks.read_corporation_bookmarks.v1", "esi-calendar.read_calendar_events.v1": "EVE SSO scope esi-calendar.read_calendar_events.v1", "esi-calendar.respond_calendar_events.v1": "EVE SSO scope esi-calendar.respond_calendar_events.v1", "esi-characters.read_agents_research.v1": "EVE SSO scope esi-characters.read_agents_research.v1", "esi-characters.read_blueprints.v1": "EVE SSO scope esi-characters.read_blueprints.v1", "esi-characters.read_contacts.v1": "EVE SSO scope esi-characters.read_contacts.v1", "esi-characters.read_corporation_roles.v1": "EVE SSO scope esi-characters.read_corporation_roles.v1", "esi-characters.read_fatigue.v1": "EVE SSO scope esi-characters.read_fatigue.v1", "esi-characters.read_fw_stats.v1": "EVE SSO scope esi-characters.read_fw_stats.v1", "esi-characters.read_loyalty.v1": "EVE SSO scope esi-characters.read_loyalty.v1", "esi-characters.read_medals.v1": "EVE SSO scope esi-characters.read_medals.v1", "esi-characters.read_notifications.v1": "EVE SSO scope esi-characters.read_notifications.v1", "esi-characters.read_opportunities.v1": "EVE SSO scope esi-characters.read_opportunities.v1", "esi-characters.read_standings.v1": "EVE SSO scope esi-characters.read_standings.v1", "esi-characters.read_titles.v1": "EVE SSO scope esi-characters.read_titles.v1", "esi-characters.write_contacts.v1": "EVE SSO scope esi-characters.write_contacts.v1", "esi-clones.read_clones.v1": "EVE SSO scope esi-clones.read_clones.v1", "esi-clones.read_implants.v1": "EVE SSO scope esi-clones.read_implants.v1", "esi-contracts.read_character_contracts.v1": "EVE SSO scope esi-contracts.read_character_contracts.v1", "esi-contracts.read_corporation_contracts.v1": "EVE SSO scope esi-contracts.read_corporation_contracts.v1", "esi-corporations.read_blueprints.v1": "EVE SSO scope esi-corporations.read_blueprints.v1", "esi-corporations.read_contacts.v1": "EVE SSO scope esi-corporations.read_contacts.v1", "esi-corporations.read_container_logs.v1": "EVE SSO scope esi-corporations.read_container_logs.v1", "esi-corporations.read_corporation_membership.v1": "EVE SSO scope esi-corporations.read_corporation_membership.v1", "esi-corporations.read_divisions.v1": "EVE SSO scope esi-corporations.read_divisions.v1", "esi-corporations.read_facilities.v1": "EVE SSO scope esi-corporations.read_facilities.v1", "esi-corporations.read_fw_stats.v1": "EVE SSO scope esi-corporations.read_fw_stats.v1", "esi-corporations.read_medals.v1": "EVE SSO scope esi-corporations.read_medals.v1", "esi-corporations.read_standings.v1": "EVE SSO scope esi-corporations.read_standings.v1", "esi-corporations.read_starbases.v1": "EVE SSO scope esi-corporations.read_starbases.v1", "esi-corporations.read_structures.v1": "EVE SSO scope esi-corporations.read_structures.v1", "esi-corporations.read_titles.v1": "EVE SSO scope esi-corporations.read_titles.v1", "esi-corporations.track_members.v1": "EVE SSO scope esi-corporations.track_members.v1", "esi-fittings.read_fittings.v1": "EVE SSO scope esi-fittings.read_fittings.v1", "esi-fittings.write_fittings.v1": "EVE SSO scope esi-fittings.write_fittings.v1", "esi-fleets.read_fleet.v1": "EVE SSO scope esi-fleets.read_fleet.v1", "esi-fleets.write_fleet.v1": "EVE SSO scope esi-fleets.write_fleet.v1", "esi-industry.read_character_jobs.v1": "EVE SSO scope esi-industry.read_character_jobs.v1", "esi-industry.read_character_mining.v1": "EVE SSO scope esi-industry.read_character_mining.v1", "esi-industry.read_corporation_jobs.v1": "EVE SSO scope esi-industry.read_corporation_jobs.v1", "esi-industry.read_corporation_mining.v1": "EVE SSO scope esi-industry.read_corporation_mining.v1", "esi-killmails.read_corporation_killmails.v1": "EVE SSO scope esi-killmails.read_corporation_killmails.v1", "esi-killmails.read_killmails.v1": "EVE SSO scope esi-killmails.read_killmails.v1", "esi-location.read_location.v1": "EVE SSO scope esi-location.read_location.v1", "esi-location.read_online.v1": "EVE SSO scope esi-location.read_online.v1", "esi-location.read_ship_type.v1": "EVE SSO scope esi-location.read_ship_type.v1", "esi-mail.organize_mail.v1": "EVE SSO scope esi-mail.organize_mail.v1", "esi-mail.read_mail.v1": "EVE SSO scope esi-mail.read_mail.v1", "esi-mail.send_mail.v1": "EVE SSO scope esi-mail.send_mail.v1", "esi-markets.read_character_orders.v1": "EVE SSO scope esi-markets.read_character_orders.v1", "esi-markets.read_corporation_orders.v1": "EVE SSO scope esi-markets.read_corporation_orders.v1", "esi-markets.structure_markets.v1": "EVE SSO scope esi-markets.structure_markets.v1", "esi-planets.manage_planets.v1": "EVE SSO scope esi-planets.manage_planets.v1", "esi-planets.read_customs_offices.v1": "EVE SSO scope esi-planets.read_customs_offices.v1", "esi-search.search_structures.v1": "EVE SSO scope esi-search.search_structures.v1", "esi-skills.read_skillqueue.v1": "EVE SSO scope esi-skills.read_skillqueue.v1", "esi-skills.read_skills.v1": "EVE SSO scope esi-skills.read_skills.v1", "esi-ui.open_window.v1": "EVE SSO scope esi-ui.open_window.v1", "esi-ui.write_waypoint.v1": "EVE SSO scope esi-ui.write_waypoint.v1", "esi-universe.read_structures.v1": "EVE SSO scope esi-universe.read_structures.v1", "esi-wallet.read_character_wallet.v1": "EVE SSO scope esi-wallet.read_character_wallet.v1", "esi-wallet.read_corporation_wallets.v1": "EVE SSO scope esi-wallet.read_corporation_wallets.v1"}, "type": "oauth2"}}, "swagger": "2.0", "paths": {"/v1/alliances/{alliance_id}/corporations/": {"get": {"description": "List all current member corporations of an alliance\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_alliances_alliance_id_corporations", "parameters": [{"$ref": "#/parameters/alliance_id"}, {"$ref": "#/parameters/datasource"}, {"$ref": "#/parameters/If-None-Match"}], "responses": {"200": {"description": "List of corporation IDs", "examples": {"application/json": [98000001]}, "headers": {"Cache-Control": {"description": "The caching mechanism used", "type": "string"}, "ETag": {"description": "RFC7232 compliant entity tag", "type": "string"}, "Expires": {"description": "RFC7231 formatted datetime string", "type": "string"}, "Last-Modified": {"description": "RFC7231 formatted datetime string", "type": "string"}}, "schema": {"description": "200 ok array", "items": {"description": "200 ok integer", "format": "int32", "minimum": 0, "title": "get_alliances_alliance_id_corporations_200_ok", "type": "integer", "uniqueItems": true}, "maxItems": 1000, "title": "get_alliances_alliance_id_corporations_ok", "type": "array"}}, "304": {"description": "Not modified", "headers": {"Cache-Control": {"description": "The caching mechanism used", "type": "string"}, "ETag": {"description": "RFC7232 compliant entity tag", "type": "string"}, "Expires": {"description": "RFC7231 formatted datetime string", "type": "string"}, "Last-Modified": {"description": "RFC7231 formatted datetime string", "type": "string"}}}, "400": {"description": "Bad request", "examples": {"application/json": {"error": "Bad request message"}}, "schema": {"$ref": "#/definitions/bad_request"}}, "420": {"description": "Error limited", "examples": {"application/json": {"error": "Error limited message"}}, "schema": {"$ref": "#/definitions/error_limited"}}, "500": {"description": "Internal server error", "examples": {"application/json": {"error": "Internal server error message"}}, "schema": {"$ref": "#/definitions/internal_server_error"}}, "503": {"description": "Service unavailable", "examples": {"application/json": {"error": "Service unavailable message"}}, "schema": {"$ref": "#/definitions/service_unavailable"}}, "504": {"description": "Gateway timeout", "examples": {"application/json": {"error": "Gateway timeout message"}}, "schema": {"$ref": "#/definitions/gateway_timeout"}}}, "summary": "List alliance's corporations", "tags": ["Alliance"], "x-alternate-versions": ["dev", "legacy", "v1", "v2"], "x-cached-seconds": 3600}}, "/v2/characters/affiliation/": {"post": {"description": "Bulk lookup of character IDs to corporation, alliance and faction\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "post_characters_affiliation", "parameters": [{"description": "The character IDs to fetch affiliations for. All characters must exist, or none will be returned", "in": "body", "name": "characters", "required": true, "schema": {"description": "characters array", "items": {"description": "character integer", "format": "int32", "title": "post_characters_affiliation_character", "type": "integer"}, "maxItems": 1000, "minItems": 1, "title": "post_characters_affiliation_characters", "type": "array", "uniqueItems": true}}, {"$ref": "#/parameters/datasource"}], "responses": {"200": {"description": "Character corporation, alliance and faction IDs", "examples": {"application/json": [{"alliance_id": 434243723, "character_id": 95538921, "corporation_id": 109299958}]}, "schema": {"description": "200 ok array", "items": {"description": "200 ok object", "properties": {"alliance_id": {"description": "The character's alliance ID, if their corporation is in an alliance", "format": "int32", "title": "post_characters_affiliation_alliance_id", "type": "integer"}, "character_id": {"description": "The character's ID", "format": "int32", "title": "post_characters_affiliation_character_id", "type": "integer"}, "corporation_id": {"description": "The character's corporation ID", "format": "int32", "title": "post_characters_affiliation_corporation_id", "type": "integer"}, "faction_id": {"description": "The character's faction ID, if their corporation is in a faction", "format": "int32", "title": "post_characters_affiliation_faction_id", "type": "integer"}}, "required": ["character_id", "corporation_id"], "title": "post_characters_affiliation_200_ok", "type": "object"}, "maxItems": 1000, "title": "post_characters_affiliation_ok", "type": "array"}}, "400": {"description": "Bad request", "examples": {"application/json": {"error": "Bad request message"}}, "schema": {"$ref": "#/definitions/bad_request"}}, "420": {"description": "Error limited", "examples": {"application/json": {"error": "Error limited message"}}, "schema": {"$ref": "#/definitions/error_limited"}}, "500": {"description": "Internal server error", "examples": {"application/json": {"error": "Internal server error message"}}, "schema": {"$ref": "#/definitions/internal_server_error"}}, "503": {"description": "Service unavailable", "examples": {"application/json": {"error": "Service unavailable message"}}, "schema": {"$ref": "#/definitions/service_unavailable"}}, "504": {"description": "Gateway timeout", "examples": {"application/json": {"error": "Gateway timeout message"}}, "schema": {"$ref": "#/definitions/gateway_timeout"}}}, "summary": "Character affiliation", "tags": ["Character"], "x-alternate-versions": ["dev", "v2"], "x-cached-seconds": 3600}}, "/v2/universe/factions/": {"get": {"description": "Get a list of factions\n\n---\n\nThis route expires daily at 11:05", "operationId": "get_universe_factions", "parameters": [{"$ref": "#/parameters/Accept-Language"}, {"$ref": "#/parameters/datasource"}, {"$ref": "#/parameters/If-None-Match"}, {"$ref": "#/parameters/language"}], "responses": {"200": {"description": "A list of factions", "examples": {"application/json": [{"corporation_id": 456, "description": "blah blah", "faction_id": 1, "is_unique": true, "name": "Faction", "size_factor": 1.0, "solar_system_id": 123, "station_count": 1000, "station_system_count": 100}]}, "headers": {"Cache-Control": {"description": "The caching mechanism used", "type": "string"}, "Content-Language": {"description": "The language used in the response", "enum": ["en", "de", "fr", "ja", "ru", "zh", "ko", "es"], "type": "string"}, "ETag": {"description": "RFC7232 compliant entity tag", "type": "string"}, "Expires": {"description": "RFC7231 formatted datetime string", "type": "string"}, "Last-Modified": {"description": "RFC7231 formatted datetime string", "type": "string"}}, "schema": {"description": "200 ok array", "items": {"description": "200 ok object", "properties": {"corporation_id": {"description": "corporation_id integer", "format": "int32", "title": "get_universe_factions_corporation_id", "type": "integer"}, "description": {"description": "description string", "title": "get_universe_factions_description", "type": "string"}, "faction_id": {"description": "faction_id integer", "format": "int32", "title": "get_universe_factions_faction_id", "type": "integer"}, "is_unique": {"description": "is_unique boolean", "title": "get_universe_factions_is_unique", "type": "boolean"}, "militia_corporation_id": {"description": "militia_corporation_id integer", "format": "int32", "title": "get_universe_factions_militia_corporation_id", "type": "integer"}, "name": {"description": "name string", "title": "get_universe_factions_name", "type": "string"}, "size_factor": {"description": "size_factor number", "format": "float", "title": "get_universe_factions_size_factor", "type": "number"}, "solar_system_id": {"description": "solar_system_id integer", "format": "int32", "title": "get_universe_factions_solar_system_id", "type": "integer"}, "station_count": {"description": "station_count integer", "format": "int32", "title": "get_universe_factions_station_count", "type": "integer"}, "station_system_count": {"description": "station_system_count integer", "format": "int32", "title": "get_universe_factions_station_system_count", "type": "integer"}}, "required": ["faction_id", "name", "description", "size_factor", "station_count", "station_system_count", "is_unique"], "title": "get_universe_factions_200_ok", "type": "object"}, "maxItems": 10000, "title": "get_universe_factions_ok", "type": "array"}}, "304": {"description": "Not modified", "headers": {"Cache-Control": {"description": "The caching mechanism used", "type": "string"}, "ETag": {"description": "RFC7232 compliant entity tag", "type": "string"}, "Expires": {"description": "RFC7231 formatted datetime string", "type": "string"}, "Last-Modified": {"description": "RFC7231 formatted datetime string", "type": "string"}}}, "400": {"description": "Bad request", "examples": {"application/json": {"error": "Bad request message"}}, "schema": {"$ref": "#/definitions/bad_request"}}, "420": {"description": "Error limited", "examples": {"application/json": {"error": "Error limited message"}}, "schema": {"$ref": "#/definitions/error_limited"}}, "500": {"description": "Internal server error", "examples": {"application/json": {"error": "Internal server error message"}}, "schema": {"$ref": "#/definitions/internal_server_error"}}, "503": {"description": "Service unavailable", "examples": {"application/json": {"error": "Service unavailable message"}}, "schema": {"$ref": "#/definitions/service_unavailable"}}, "504": {"description": "Gateway timeout", "examples": {"application/json": {"error": "Gateway timeout message"}}, "schema": {"$ref": "#/definitions/gateway_timeout"}}}, "summary": "Get factions", "tags": ["Universe"], "x-alternate-versions": ["dev", "v2"]}}, "/v3/alliances/{alliance_id}/": {"get": {"description": "Public information about an alliance\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_alliances_alliance_id", "parameters": [{"$ref": "#/parameters/alliance_id"}, {"$ref": "#/parameters/datasource"}, {"$ref": "#/parameters/If-None-Match"}], "responses": {"200": {"description": "Public data about an alliance", "examples": {"application/json": {"creator_corporation_id": 45678, "creator_id": 12345, "date_founded": "2016-06-26T21:00:00Z", "executor_corporation_id": 98356193, "name": "C C P Alliance", "ticker": ""}}, "headers": {"Cache-Control": {"description": "The caching mechanism used", "type": "string"}, "ETag": {"description": "RFC7232 compliant entity tag", "type": "string"}, "Expires": {"description": "RFC7231 formatted datetime string", "type": "string"}, "Last-Modified": {"description": "RFC7231 formatted datetime string", "type": "string"}}, "schema": {"description": "200 ok object", "properties": {"creator_corporation_id": {"description": "ID of the corporation that created the alliance", "format": "int32", "title": "get_alliances_alliance_id_creator_corporation_id", "type": "integer"}, "creator_id": {"description": "ID of the character that created the alliance", "format": "int32", "title": "get_alliances_alliance_id_creator_id", "type": "integer"}, "date_founded": {"description": "date_founded string", "format": "date-time", "title": "get_alliances_alliance_id_date_founded", "type": "string"}, "executor_corporation_id": {"description": "the executor corporation ID, if this alliance is not closed", "format": "int32", "title": "get_alliances_alliance_id_executor_corporation_id", "type": "integer"}, "faction_id": {"description": "Faction ID this alliance is fighting for, if this alliance is enlisted in factional warfare", "format": "int32", "title": "get_alliances_alliance_id_faction_id", "type": "integer"}, "name": {"description": "the full name of the alliance", "title": "get_alliances_alliance_id_name", "type": "string"}, "ticker": {"description": "the short name of the alliance", "title": "get_alliances_alliance_id_ticker", "type": "string"}}, "required": ["name", "creator_id", "creator_corporation_id", "ticker", "date_founded"], "title": "get_alliances_alliance_id_ok", "type": "object"}}, "304": {"description": "Not modified", "headers": {"Cache-Control": {"description": "The caching mechanism used", "type": "string"}, "ETag": {"description": "RFC7232 compliant entity tag", "type": "string"}, "Expires": {"description": "RFC7231 formatted datetime string", "type": "string"}, "Last-Modified": {"description": "RFC7231 formatted datetime string", "type": "string"}}}, "400": {"description": "Bad request", "examples": {"application/json": {"error": "Bad request message"}}, "schema": {"$ref": "#/definitions/bad_request"}}, "404": {"description": "Alliance not found", "examples": {"application/json": {"error": "Not found message"}}, "schema": {"description": "Not found", "properties": {"error": {"description": "Not found message", "title": "get_alliances_alliance_id_404_not_found", "type": "string"}}, "title": "get_alliances_alliance_id_not_found", "type": "object"}}, "420": {"description": "Error limited", "examples": {"application/json": {"error": "Error limited message"}}, "schema": {"$ref": "#/definitions/error_limited"}}, "500": {"description": "Internal server error", "examples": {"application/json": {"error": "Internal server error message"}}, "schema": {"$ref": "#/definitions/internal_server_error"}}, "503": {"description": "Service unavailable", "examples": {"application/json": {"error": "Service unavailable message"}}, "schema": {"$ref": "#/definitions/service_unavailable"}}, "504": {"description": "Gateway timeout", "examples": {"application/json": {"error": "Gateway timeout message"}}, "schema": {"$ref": "#/definitions/gateway_timeout"}}}, "summary": "Get alliance information", "tags": ["Alliance"], "x-alternate-versions": ["dev", "legacy", "v3", "v4"], "x-cached-seconds": 3600}}, "/v3/universe/names/": {"post": {"description": "Resolve a set of IDs to names and categories. Supported ID's for resolving are: Characters, Corporations, Alliances, Stations, Solar Systems, Constellations, Regions, Types, Factions\n\n---\n", "operationId": "post_universe_names", "parameters": [{"$ref": "#/parameters/datasource"}, {"description": "The ids to resolve", "in": "body", "name": "ids", "required": true, "schema": {"description": "ids array", "example": [95465499, 30000142], "items": {"description": "id integer", "format": "int32", "title": "post_universe_names_id", "type": "integer"}, "maxItems": 1000, "minItems": 1, "title": "post_universe_names_ids", "type": "array", "uniqueItems": true}}], "responses": {"200": {"description": "List of id/name associations for a set of IDs. All IDs must resolve to a name, or nothing will be returned", "examples": {"application/json": [{"category": "character", "id": 95465499, "name": "CCP Bartender"}, {"category": "solar_system", "id": 30000142, "name": "Jita"}]}, "schema": {"description": "200 ok array", "items": {"description": "200 ok object", "properties": {"category": {"description": "category string", "enum": ["alliance", "character", "constellation", "corporation", "inventory_type", "region", "solar_system", "station", "faction"], "title": "post_universe_names_category", "type": "string"}, "id": {"description": "id integer", "format": "int32", "title": "post_universe_names_id", "type": "integer"}, "name": {"description": "name string", "title": "post_universe_names_name", "type": "string"}}, "required": ["id", "name", "category"], "title": "post_universe_names_200_ok", "type": "object"}, "maxItems": 1000, "title": "post_universe_names_ok", "type": "array"}}, "400": {"description": "Bad request", "examples": {"application/json": {"error": "Bad request message"}}, "schema": {"$ref": "#/definitions/bad_request"}}, "404": {"description": "Ensure all IDs are valid before resolving", "examples": {"application/json": {"error": "Not found message"}}, "schema": {"description": "Not found", "properties": {"error": {"description": "Not found message", "title": "post_universe_names_404_not_found", "type": "string"}}, "title": "post_universe_names_not_found", "type": "object"}}, "420": {"description": "Error limited", "examples": {"application/json": {"error": "Error limited message"}}, "schema": {"$ref": "#/definitions/error_limited"}}, "500": {"description": "Internal server error", "examples": {"application/json": {"error": "Internal server error message"}}, "schema": {"$ref": "#/definitions/internal_server_error"}}, "503": {"description": "Service unavailable", "examples": {"application/json": {"error": "Service unavailable message"}}, "schema": {"$ref": "#/definitions/service_unavailable"}}, "504": {"description": "Gateway timeout", "examples": {"application/json": {"error": "Gateway timeout message"}}, "schema": {"$ref": "#/definitions/gateway_timeout"}}}, "summary": "Get names and categories for a set of IDs", "tags": ["Universe"], "x-alternate-versions": ["dev", "v3"]}}, "/v3/universe/types/{type_id}/": {"get": {"description": "Get information on a type\n\n---\n\nThis route expires daily at 11:05", "operationId": "get_universe_types_type_id", "parameters": [{"$ref": "#/parameters/Accept-Language"}, {"$ref": "#/parameters/datasource"}, {"$ref": "#/parameters/If-None-Match"}, {"$ref": "#/parameters/language"}, {"description": "An Eve item type ID", "format": "int32", "in": "path", "name": "type_id", "required": true, "type": "integer"}], "responses": {"200": {"description": "Information about a type", "examples": {"application/json": {"description": "The Rifter is a...", "group_id": 25, "name": "Rifter", "published": true, "type_id": 587}}, "headers": {"Cache-Control": {"description": "The caching mechanism used", "type": "string"}, "Content-Language": {"description": "The language used in the response", "enum": ["en", "de", "fr", "ja", "ru", "zh", "ko", "es"], "type": "string"}, "ETag": {"description": "RFC7232 compliant entity tag", "type": "string"}, "Expires": {"description": "RFC7231 formatted datetime string", "type": "string"}, "Last-Modified": {"description": "RFC7231 formatted datetime string", "type": "string"}}, "schema": {"description": "200 ok object", "properties": {"capacity": {"description": "capacity number", "format": "float", "title": "get_universe_types_type_id_capacity", "type": "number"}, "description": {"description": "description string", "title": "get_universe_types_type_id_description", "type": "string"}, "dogma_attributes": {"description": "dogma_attributes array", "items": {"description": "dogma_attribute object", "properties": {"attribute_id": {"description": "attribute_id integer", "format": "int32", "title": "get_universe_types_type_id_attribute_id", "type": "integer"}, "value": {"description": "value number", "format": "float", "title": "get_universe_types_type_id_value", "type": "number"}}, "required": ["attribute_id", "value"], "title": "get_universe_types_type_id_dogma_attribute", "type": "object"}, "maxItems": 1000, "title": "get_universe_types_type_id_dogma_attributes", "type": "array"}, "dogma_effects": {"description": "dogma_effects array", "items": {"description": "dogma_effect object", "properties": {"effect_id": {"description": "effect_id integer", "format": "int32", "title": "get_universe_types_type_id_effect_id", "type": "integer"}, "is_default": {"description": "is_default boolean", "title": "get_universe_types_type_id_is_default", "type": "boolean"}}, "required": ["effect_id", "is_default"], "title": "get_universe_types_type_id_dogma_effect", "type": "object"}, "maxItems": 1000, "title": "get_universe_types_type_id_dogma_effects", "type": "array"}, "graphic_id": {"description": "graphic_id integer", "format": "int32", "title": "get_universe_types_type_id_graphic_id", "type": "integer"}, "group_id": {"description": "group_id integer", "format": "int32", "title": "get_universe_types_type_id_group_id", "type": "integer"}, "icon_id": {"description": "icon_id integer", "format": "int32", "title": "get_universe_types_type_id_icon_id", "type": "integer"}, "market_group_id": {"description": "This only exists for types that can be put on the market", "format": "int32", "title": "get_universe_types_type_id_market_group_id", "type": "integer"}, "mass": {"description": "mass number", "format": "float", "title": "get_universe_types_type_id_mass", "type": "number"}, "name": {"description": "name string", "title": "get_universe_types_type_id_name", "type": "string"}, "packaged_volume": {"description": "packaged_volume number", "format": "float", "title": "get_universe_types_type_id_packaged_volume", "type": "number"}, "portion_size": {"description": "portion_size integer", "format": "int32", "title": "get_universe_types_type_id_portion_size", "type": "integer"}, "published": {"description": "published boolean", "title": "get_universe_types_type_id_published", "type": "boolean"}, "radius": {"description": "radius number", "format": "float", "title": "get_universe_types_type_id_radius", "type": "number"}, "type_id": {"description": "type_id integer", "format": "int32", "title": "get_universe_types_type_id_type_id", "type": "integer"}, "volume": {"description": "volume number", "format": "float", "title": "get_universe_types_type_id_volume", "type": "number"}}, "required": ["type_id", "name", "description", "published", "group_id"], "title": "get_universe_types_type_id_ok", "type": "object"}}, "304": {"description": "Not modified", "headers": {"Cache-Control": {"description": "The caching mechanism used", "type": "string"}, "ETag": {"description": "RFC7232 compliant entity tag", "type": "string"}, "Expires": {"description": "RFC7231 formatted datetime string", "type": "string"}, "Last-Modified": {"description": "RFC7231 formatted datetime string", "type": "string"}}}, "400": {"description": "Bad request", "examples": {"application/json": {"error": "Bad request message"}}, "schema": {"$ref": "#/definitions/bad_request"}}, "404": {"description": "Type not found", "examples": {"application/json": {"error": "Not found message"}}, "schema": {"description": "Not found", "properties": {"error": {"description": "Not found message", "title": "get_universe_types_type_id_404_not_found", "type": "string"}}, "title": "get_universe_types_type_id_not_found", "type": "object"}}, "420": {"description": "Error limited", "examples": {"application/json": {"error": "Error limited message"}}, "schema": {"$ref": "#/definitions/error_limited"}}, "500": {"description": "Internal server error", "examples": {"application/json": {"error": "Internal server error message"}}, "schema": {"$ref": "#/definitions/internal_server_error"}}, "503": {"description": "Service unavailable", "examples": {"application/json": {"error": "Service unavailable message"}}, "schema": {"$ref": "#/definitions/service_unavailable"}}, "504": {"description": "Gateway timeout", "examples": {"application/json": {"error": "Gateway timeout message"}}, "schema": {"$ref": "#/definitions/gateway_timeout"}}}, "summary": "Get type information", "tags": ["Universe"], "x-alternate-versions": ["dev", "v3"]}}, "/v5/characters/{character_id}/": {"get": {"description": "Public information about a character\n\n---\n\nThis route is cached for up to 86400 seconds", "operationId": "get_characters_character_id", "parameters": [{"$ref": "#/parameters/character_id"}, {"$ref": "#/parameters/datasource"}, {"$ref": "#/parameters/If-None-Match"}], "responses": {"200": {"description": "Public data for the given character", "examples": {"application/json": {"birthday": "2015-03-24T11:37:00Z", "bloodline_id": 3, "corporation_id": 109299958, "description": "", "gender": "male", "name": "CCP Bartender", "race_id": 2, "title": "All round pretty awesome guy"}}, "headers": {"Cache-Control": {"description": "The caching mechanism used", "type": "string"}, "ETag": {"description": "RFC7232 compliant entity tag", "type": "string"}, "Expires": {"description": "RFC7231 formatted datetime string", "type": "string"}, "Last-Modified": {"description": "RFC7231 formatted datetime string", "type": "string"}}, "schema": {"description": "200 ok object", "properties": {"alliance_id": {"description": "The character's alliance ID", "format": "int32", "title": "get_characters_character_id_alliance_id", "type": "integer"}, "birthday": {"description": "Creation date of the character", "format": "date-time", "title": "get_characters_character_id_birthday", "type": "string"}, "bloodline_id": {"description": "bloodline_id integer", "format": "int32", "title": "get_characters_character_id_bloodline_id", "type": "integer"}, "corporation_id": {"description": "The character's corporation ID", "format": "int32", "title": "get_characters_character_id_corporation_id", "type": "integer"}, "description": {"description": "description string", "title": "get_characters_character_id_description", "type": "string"}, "faction_id": {"description": "ID of the faction the character is fighting for, if the character is enlisted in Factional Warfare", "format": "int32", "title": "get_characters_character_id_faction_id", "type": "integer"}, "gender": {"description": "gender string", "enum": ["female", "male"], "title": "get_characters_character_id_gender", "type": "string"}, "name": {"description": "name string", "title": "get_characters_character_id_name", "type": "string"}, "race_id": {"description": "race_id integer", "format": "int32", "title": "get_characters_character_id_race_id", "type": "integer"}, "security_status": {"description": "security_status number", "format": "float", "maximum": 10, "minimum": -10, "title": "get_characters_character_id_security_status", "type": "number"}, "title": {"description": "The individual title of the character", "title": "get_characters_character_id_title", "type": "string"}}, "required": ["corporation_id", "birthday", "name", "gender", "race_id", "bloodline_id"], "title": "get_characters_character_id_ok", "type": "object"}}, "304": {"description": "Not modified", "headers": {"Cache-Control": {"description": "The caching mechanism used", "type": "string"}, "ETag": {"description": "RFC7232 compliant entity tag", "type": "string"}, "Expires": {"description": "RFC7231 formatted datetime string", "type": "string"}, "Last-Modified": {"description": "RFC7231 formatted datetime string", "type": "string"}}}, "400": {"description": "Bad request", "examples": {"application/json": {"error": "Bad request message"}}, "schema": {"$ref": "#/definitions/bad_request"}}, "404": {"description": "Character not found", "examples": {"application/json": {"error": "Not found message"}}, "schema": {"description": "Not found", "properties": {"error": {"description": "Not found message", "title": "get_characters_character_id_404_not_found", "type": "string"}}, "title": "get_characters_character_id_not_found", "type": "object"}}, "420": {"description": "Error limited", "examples": {"application/json": {"error": "Error limited message"}}, "schema": {"$ref": "#/definitions/error_limited"}}, "500": {"description": "Internal server error", "examples": {"application/json": {"error": "Internal server error message"}}, "schema": {"$ref": "#/definitions/internal_server_error"}}, "503": {"description": "Service unavailable", "examples": {"application/json": {"error": "Service unavailable message"}}, "schema": {"$ref": "#/definitions/service_unavailable"}}, "504": {"description": "Gateway timeout", "examples": {"application/json": {"error": "Gateway timeout message"}}, "schema": {"$ref": "#/definitions/gateway_timeout"}}}, "summary": "Get character's public information", "tags": ["Character"], "x-alternate-versions": ["dev", "legacy", "v5"], "x-cached-seconds": 86400}}, "/v5/corporations/{corporation_id}/": {"get": {"description": "Public information about a corporation\n\n---\n\nThis route is cached for up to 3600 seconds", "operationId": "get_corporations_corporation_id", "parameters": [{"$ref": "#/parameters/corporation_id"}, {"$ref": "#/parameters/datasource"}, {"$ref": "#/parameters/If-None-Match"}], "responses": {"200": {"description": "Public information about a corporation", "examples": {"application/json": {"alliance_id": 434243723, "ceo_id": 180548812, "creator_id": 180548812, "date_founded": "2004-11-28T16:42:51Z", "description": "This is a corporation description, it's basically just a string", "member_count": 656, "name": "C C P", "tax_rate": 0.256, "ticker": "-CCP-", "url": "http://www.eveonline.com"}}, "headers": {"Cache-Control": {"description": "The caching mechanism used", "type": "string"}, "ETag": {"description": "RFC7232 compliant entity tag", "type": "string"}, "Expires": {"description": "RFC7231 formatted datetime string", "type": "string"}, "Last-Modified": {"description": "RFC7231 formatted datetime string", "type": "string"}}, "schema": {"description": "200 ok object", "properties": {"alliance_id": {"description": "ID of the alliance that corporation is a member of, if any", "format": "int32", "title": "get_corporations_corporation_id_alliance_id", "type": "integer"}, "ceo_id": {"description": "ceo_id integer", "format": "int32", "title": "get_corporations_corporation_id_ceo_id", "type": "integer"}, "creator_id": {"description": "creator_id integer", "format": "int32", "title": "get_corporations_corporation_id_creator_id", "type": "integer"}, "date_founded": {"description": "date_founded string", "format": "date-time", "title": "get_corporations_corporation_id_date_founded", "type": "string"}, "description": {"description": "description string", "title": "get_corporations_corporation_id_description", "type": "string"}, "faction_id": {"description": "faction_id integer", "format": "int32", "title": "get_corporations_corporation_id_faction_id", "type": "integer"}, "home_station_id": {"description": "home_station_id integer", "format": "int32", "title": "get_corporations_corporation_id_home_station_id", "type": "integer"}, "member_count": {"description": "member_count integer", "format": "int32", "title": "get_corporations_corporation_id_member_count", "type": "integer"}, "name": {"description": "the full name of the corporation", "title": "get_corporations_corporation_id_name", "type": "string"}, "shares": {"description": "shares integer", "format": "int64", "title": "get_corporations_corporation_id_shares", "type": "integer"}, "tax_rate": {"description": "tax_rate number", "format": "float", "maximum": 1, "minimum": 0, "title": "get_corporations_corporation_id_tax_rate", "type": "number"}, "ticker": {"description": "the short name of the corporation", "title": "get_corporations_corporation_id_ticker", "type": "string"}, "url": {"description": "url string", "title": "get_corporations_corporation_id_url", "type": "string"}, "war_eligible": {"description": "war_eligible boolean", "title": "get_corporations_corporation_id_war_eligible", "type": "boolean"}}, "required": ["name", "ticker", "member_count", "ceo_id", "tax_rate", "creator_id"], "title": "get_corporations_corporation_id_ok", "type": "object"}}, "304": {"description": "Not modified", "headers": {"Cache-Control": {"description": "The caching mechanism used", "type": "string"}, "ETag": {"description": "RFC7232 compliant entity tag", "type": "string"}, "Expires": {"description": "RFC7231 formatted datetime string", "type": "string"}, "Last-Modified": {"description": "RFC7231 formatted datetime string", "type": "string"}}}, "400": {"description": "Bad request", "examples": {"application/json": {"error": "Bad request message"}}, "schema": {"$ref": "#/definitions/bad_request"}}, "404": {"description": "Corporation not found", "examples": {"application/json": {"error": "Not found message"}}, "schema": {"description": "Not found", "properties": {"error": {"description": "Not found message", "title": "get_corporations_corporation_id_404_not_found", "type": "string"}}, "title": "get_corporations_corporation_id_not_found", "type": "object"}}, "420": {"description": "Error limited", "examples": {"application/json": {"error": "Error limited message"}}, "schema": {"$ref": "#/definitions/error_limited"}}, "500": {"description": "Internal server error", "examples": {"application/json": {"error": "Internal server error message"}}, "schema": {"$ref": "#/definitions/internal_server_error"}}, "503": {"description": "Service unavailable", "examples": {"application/json": {"error": "Service unavailable message"}}, "schema": {"$ref": "#/definitions/service_unavailable"}}, "504": {"description": "Gateway timeout", "examples": {"application/json": {"error": "Gateway timeout message"}}, "schema": {"$ref": "#/definitions/gateway_timeout"}}}, "summary": "Get corporation information", "tags": ["Corporation"], "x-alternate-versions": ["dev", "v5"], "x-cached-seconds": 3600}}}} \ No newline at end of file diff --git a/allianceauth/srp/providers.py b/allianceauth/srp/providers.py index ac57ec1e..82b3904c 100644 --- a/allianceauth/srp/providers.py +++ b/allianceauth/srp/providers.py @@ -2,7 +2,7 @@ import os from esi.clients import EsiClientProvider -from allianceauth import __version__ +from allianceauth import __version__, __title__, __url__ SWAGGER_SPEC = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'swagger.json') @@ -12,8 +12,8 @@ get_killmails_killmail_id_killmail_hash get_universe_types_type_id """ - esi = EsiClientProvider( - spec_file=SWAGGER_SPEC, - app_info_text=("allianceauth v" + __version__) + ua_appname=__title__, + ua_version=__version__, + ua_url=__url__, ) diff --git a/allianceauth/srp/swagger.json b/allianceauth/srp/swagger.json deleted file mode 100644 index c3ebeb68..00000000 --- a/allianceauth/srp/swagger.json +++ /dev/null @@ -1 +0,0 @@ -{"consumes":["application\/json"],"definitions":{"bad_request":{"description":"Bad request model","properties":{"error":{"description":"Bad request message","type":"string"}},"required":["error"],"title":"Bad request","type":"object"},"error_limited":{"description":"Error limited model","properties":{"error":{"description":"Error limited message","type":"string"}},"required":["error"],"title":"Error limited","type":"object"},"forbidden":{"description":"Forbidden model","properties":{"error":{"description":"Forbidden message","type":"string"},"sso_status":{"description":"status code received from SSO","type":"integer"}},"required":["error"],"title":"Forbidden","type":"object"},"gateway_timeout":{"description":"Gateway timeout model","properties":{"error":{"description":"Gateway timeout message","type":"string"},"timeout":{"description":"number of seconds the request was given","type":"integer"}},"required":["error"],"title":"Gateway timeout","type":"object"},"internal_server_error":{"description":"Internal server error model","properties":{"error":{"description":"Internal server error message","type":"string"}},"required":["error"],"title":"Internal server error","type":"object"},"service_unavailable":{"description":"Service unavailable model","properties":{"error":{"description":"Service unavailable message","type":"string"}},"required":["error"],"title":"Service unavailable","type":"object"},"unauthorized":{"description":"Unauthorized model","properties":{"error":{"description":"Unauthorized message","type":"string"}},"required":["error"],"title":"Unauthorized","type":"object"}},"host":"esi.evetech.net","info":{"description":"An OpenAPI for EVE Online","title":"EVE Swagger Interface","version":"1.8.2"},"parameters":{"Accept-Language":{"default":"en","description":"Language to use in the response","enum":["en","en-us","de","fr","ja","ru","zh","ko","es"],"in":"header","name":"Accept-Language","type":"string"},"If-None-Match":{"description":"ETag from a previous request. A 304 will be returned if this matches the current ETag","in":"header","name":"If-None-Match","type":"string"},"alliance_id":{"description":"An EVE alliance ID","format":"int32","in":"path","minimum":1,"name":"alliance_id","required":true,"type":"integer"},"character_id":{"description":"An EVE character ID","format":"int32","in":"path","minimum":1,"name":"character_id","required":true,"type":"integer"},"corporation_id":{"description":"An EVE corporation ID","format":"int32","in":"path","minimum":1,"name":"corporation_id","required":true,"type":"integer"},"datasource":{"default":"tranquility","description":"The server name you would like data from","enum":["tranquility"],"in":"query","name":"datasource","type":"string"},"language":{"default":"en","description":"Language to use in the response, takes precedence over Accept-Language","enum":["en","en-us","de","fr","ja","ru","zh","ko","es"],"in":"query","name":"language","type":"string"},"page":{"default":1,"description":"Which page of results to return","format":"int32","in":"query","minimum":1,"name":"page","type":"integer"},"token":{"description":"Access token to use if unable to set a header","in":"query","name":"token","type":"string"}},"paths":{"\/v1\/killmails\/{killmail_id}\/{killmail_hash}\/":{"get":{"description":"Return a single killmail from its ID and hash\n\n---\n\nThis route is cached for up to 30758400 seconds","operationId":"get_killmails_killmail_id_killmail_hash","parameters":[{"$ref":"#\/parameters\/datasource"},{"$ref":"#\/parameters\/If-None-Match"},{"description":"The killmail hash for verification","in":"path","name":"killmail_hash","required":true,"type":"string"},{"description":"The killmail ID to be queried","format":"int32","in":"path","name":"killmail_id","required":true,"type":"integer"}],"responses":{"200":{"description":"A killmail","examples":{"application\/json":{"attackers":[{"character_id":95810944,"corporation_id":1000179,"damage_done":5745,"faction_id":500003,"final_blow":true,"security_status":-0.3,"ship_type_id":17841,"weapon_type_id":3074}],"killmail_id":56733821,"killmail_time":"2016-10-22T17:13:36Z","solar_system_id":30002976,"victim":{"alliance_id":621338554,"character_id":92796241,"corporation_id":841363671,"damage_taken":5745,"items":[{"flag":20,"item_type_id":5973,"quantity_dropped":1,"singleton":0}],"position":{"x":452186600569.4748,"y":146704961490.90222,"z":109514596532.54477},"ship_type_id":17812}}},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"ETag":{"description":"RFC7232 compliant entity tag","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"}},"schema":{"description":"200 ok object","properties":{"attackers":{"description":"attackers array","items":{"description":"attacker object","properties":{"alliance_id":{"description":"alliance_id integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_alliance_id","type":"integer"},"character_id":{"description":"character_id integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_character_id","type":"integer"},"corporation_id":{"description":"corporation_id integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_corporation_id","type":"integer"},"damage_done":{"description":"damage_done integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_damage_done","type":"integer"},"faction_id":{"description":"faction_id integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_faction_id","type":"integer"},"final_blow":{"description":"Was the attacker the one to achieve the final blow\n","title":"get_killmails_killmail_id_killmail_hash_final_blow","type":"boolean"},"security_status":{"description":"Security status for the attacker\n","format":"float","title":"get_killmails_killmail_id_killmail_hash_security_status","type":"number"},"ship_type_id":{"description":"What ship was the attacker flying\n","format":"int32","title":"get_killmails_killmail_id_killmail_hash_ship_type_id","type":"integer"},"weapon_type_id":{"description":"What weapon was used by the attacker for the kill\n","format":"int32","title":"get_killmails_killmail_id_killmail_hash_weapon_type_id","type":"integer"}},"required":["security_status","final_blow","damage_done"],"title":"get_killmails_killmail_id_killmail_hash_attacker","type":"object"},"maxItems":10000,"title":"get_killmails_killmail_id_killmail_hash_attackers","type":"array"},"killmail_id":{"description":"ID of the killmail","format":"int32","title":"get_killmails_killmail_id_killmail_hash_killmail_id","type":"integer"},"killmail_time":{"description":"Time that the victim was killed and the killmail generated\n","format":"date-time","title":"get_killmails_killmail_id_killmail_hash_killmail_time","type":"string"},"moon_id":{"description":"Moon if the kill took place at one","format":"int32","title":"get_killmails_killmail_id_killmail_hash_moon_id","type":"integer"},"solar_system_id":{"description":"Solar system that the kill took place in\n","format":"int32","title":"get_killmails_killmail_id_killmail_hash_solar_system_id","type":"integer"},"victim":{"description":"victim object","properties":{"alliance_id":{"description":"alliance_id integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_victim_alliance_id","type":"integer"},"character_id":{"description":"character_id integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_victim_character_id","type":"integer"},"corporation_id":{"description":"corporation_id integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_victim_corporation_id","type":"integer"},"damage_taken":{"description":"How much total damage was taken by the victim\n","format":"int32","title":"get_killmails_killmail_id_killmail_hash_damage_taken","type":"integer"},"faction_id":{"description":"faction_id integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_victim_faction_id","type":"integer"},"items":{"description":"items array","items":{"description":"item object","properties":{"flag":{"description":"Flag for the location of the item\n","format":"int32","title":"get_killmails_killmail_id_killmail_hash_flag","type":"integer"},"item_type_id":{"description":"item_type_id integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_item_type_id","type":"integer"},"items":{"description":"items array","items":{"description":"item object","properties":{"flag":{"description":"flag integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_item_flag","type":"integer"},"item_type_id":{"description":"item_type_id integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_item_item_type_id","type":"integer"},"quantity_destroyed":{"description":"quantity_destroyed integer","format":"int64","title":"get_killmails_killmail_id_killmail_hash_item_quantity_destroyed","type":"integer"},"quantity_dropped":{"description":"quantity_dropped integer","format":"int64","title":"get_killmails_killmail_id_killmail_hash_item_quantity_dropped","type":"integer"},"singleton":{"description":"singleton integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_item_singleton","type":"integer"}},"required":["item_type_id","singleton","flag"],"title":"get_killmails_killmail_id_killmail_hash_items_item","type":"object"},"maxItems":10000,"title":"get_killmails_killmail_id_killmail_hash_item_items","type":"array"},"quantity_destroyed":{"description":"How many of the item were destroyed if any\n","format":"int64","title":"get_killmails_killmail_id_killmail_hash_quantity_destroyed","type":"integer"},"quantity_dropped":{"description":"How many of the item were dropped if any\n","format":"int64","title":"get_killmails_killmail_id_killmail_hash_quantity_dropped","type":"integer"},"singleton":{"description":"singleton integer","format":"int32","title":"get_killmails_killmail_id_killmail_hash_singleton","type":"integer"}},"required":["item_type_id","singleton","flag"],"title":"get_killmails_killmail_id_killmail_hash_item","type":"object"},"maxItems":10000,"title":"get_killmails_killmail_id_killmail_hash_items","type":"array"},"position":{"description":"Coordinates of the victim in Cartesian space relative to the Sun\n","properties":{"x":{"description":"x number","format":"double","title":"get_killmails_killmail_id_killmail_hash_x","type":"number"},"y":{"description":"y number","format":"double","title":"get_killmails_killmail_id_killmail_hash_y","type":"number"},"z":{"description":"z number","format":"double","title":"get_killmails_killmail_id_killmail_hash_z","type":"number"}},"required":["x","y","z"],"title":"get_killmails_killmail_id_killmail_hash_position","type":"object"},"ship_type_id":{"description":"The ship that the victim was piloting and was destroyed\n","format":"int32","title":"get_killmails_killmail_id_killmail_hash_victim_ship_type_id","type":"integer"}},"required":["damage_taken","ship_type_id"],"title":"get_killmails_killmail_id_killmail_hash_victim","type":"object"},"war_id":{"description":"War if the killmail is generated in relation to an official war\n","format":"int32","title":"get_killmails_killmail_id_killmail_hash_war_id","type":"integer"}},"required":["killmail_id","killmail_time","victim","attackers","solar_system_id"],"title":"get_killmails_killmail_id_killmail_hash_ok","type":"object"}},"304":{"description":"Not modified","headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"ETag":{"description":"RFC7232 compliant entity tag","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"}}},"400":{"description":"Bad request","examples":{"application\/json":{"error":"Bad request message"}},"schema":{"$ref":"#\/definitions\/bad_request"}},"420":{"description":"Error limited","examples":{"application\/json":{"error":"Error limited message"}},"schema":{"$ref":"#\/definitions\/error_limited"}},"422":{"description":"Invalid killmail_id and\/or killmail_hash","examples":{"application\/json":{"error":"Unprocessable entity message"}},"schema":{"description":"Unprocessable entity","properties":{"error":{"description":"Unprocessable entity message","title":"get_killmails_killmail_id_killmail_hash_422_unprocessable_entity","type":"string"}},"title":"get_killmails_killmail_id_killmail_hash_unprocessable_entity","type":"object"}},"500":{"description":"Internal server error","examples":{"application\/json":{"error":"Internal server error message"}},"schema":{"$ref":"#\/definitions\/internal_server_error"}},"503":{"description":"Service unavailable","examples":{"application\/json":{"error":"Service unavailable message"}},"schema":{"$ref":"#\/definitions\/service_unavailable"}},"504":{"description":"Gateway timeout","examples":{"application\/json":{"error":"Gateway timeout message"}},"schema":{"$ref":"#\/definitions\/gateway_timeout"}}},"summary":"Get a single killmail","tags":["Killmails"],"x-alternate-versions":["dev","legacy","v1"],"x-cached-seconds":30758400}},"\/v3\/universe\/types\/{type_id}\/":{"get":{"description":"Get information on a type\n\n---\n\nThis route expires daily at 11:05","operationId":"get_universe_types_type_id","parameters":[{"$ref":"#\/parameters\/Accept-Language"},{"$ref":"#\/parameters\/datasource"},{"$ref":"#\/parameters\/If-None-Match"},{"$ref":"#\/parameters\/language"},{"description":"An Eve item type ID","format":"int32","in":"path","name":"type_id","required":true,"type":"integer"}],"responses":{"200":{"description":"Information about a type","examples":{"application\/json":{"description":"The Rifter is a...","group_id":25,"name":"Rifter","published":true,"type_id":587}},"headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"Content-Language":{"description":"The language used in the response","enum":["en","de","fr","ja","ru","zh","ko","es"],"type":"string"},"ETag":{"description":"RFC7232 compliant entity tag","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"}},"schema":{"description":"200 ok object","properties":{"capacity":{"description":"capacity number","format":"float","title":"get_universe_types_type_id_capacity","type":"number"},"description":{"description":"description string","title":"get_universe_types_type_id_description","type":"string"},"dogma_attributes":{"description":"dogma_attributes array","items":{"description":"dogma_attribute object","properties":{"attribute_id":{"description":"attribute_id integer","format":"int32","title":"get_universe_types_type_id_attribute_id","type":"integer"},"value":{"description":"value number","format":"float","title":"get_universe_types_type_id_value","type":"number"}},"required":["attribute_id","value"],"title":"get_universe_types_type_id_dogma_attribute","type":"object"},"maxItems":1000,"title":"get_universe_types_type_id_dogma_attributes","type":"array"},"dogma_effects":{"description":"dogma_effects array","items":{"description":"dogma_effect object","properties":{"effect_id":{"description":"effect_id integer","format":"int32","title":"get_universe_types_type_id_effect_id","type":"integer"},"is_default":{"description":"is_default boolean","title":"get_universe_types_type_id_is_default","type":"boolean"}},"required":["effect_id","is_default"],"title":"get_universe_types_type_id_dogma_effect","type":"object"},"maxItems":1000,"title":"get_universe_types_type_id_dogma_effects","type":"array"},"graphic_id":{"description":"graphic_id integer","format":"int32","title":"get_universe_types_type_id_graphic_id","type":"integer"},"group_id":{"description":"group_id integer","format":"int32","title":"get_universe_types_type_id_group_id","type":"integer"},"icon_id":{"description":"icon_id integer","format":"int32","title":"get_universe_types_type_id_icon_id","type":"integer"},"market_group_id":{"description":"This only exists for types that can be put on the market","format":"int32","title":"get_universe_types_type_id_market_group_id","type":"integer"},"mass":{"description":"mass number","format":"float","title":"get_universe_types_type_id_mass","type":"number"},"name":{"description":"name string","title":"get_universe_types_type_id_name","type":"string"},"packaged_volume":{"description":"packaged_volume number","format":"float","title":"get_universe_types_type_id_packaged_volume","type":"number"},"portion_size":{"description":"portion_size integer","format":"int32","title":"get_universe_types_type_id_portion_size","type":"integer"},"published":{"description":"published boolean","title":"get_universe_types_type_id_published","type":"boolean"},"radius":{"description":"radius number","format":"float","title":"get_universe_types_type_id_radius","type":"number"},"type_id":{"description":"type_id integer","format":"int32","title":"get_universe_types_type_id_type_id","type":"integer"},"volume":{"description":"volume number","format":"float","title":"get_universe_types_type_id_volume","type":"number"}},"required":["type_id","name","description","published","group_id"],"title":"get_universe_types_type_id_ok","type":"object"}},"304":{"description":"Not modified","headers":{"Cache-Control":{"description":"The caching mechanism used","type":"string"},"ETag":{"description":"RFC7232 compliant entity tag","type":"string"},"Expires":{"description":"RFC7231 formatted datetime string","type":"string"},"Last-Modified":{"description":"RFC7231 formatted datetime string","type":"string"}}},"400":{"description":"Bad request","examples":{"application\/json":{"error":"Bad request message"}},"schema":{"$ref":"#\/definitions\/bad_request"}},"404":{"description":"Type not found","examples":{"application\/json":{"error":"Not found message"}},"schema":{"description":"Not found","properties":{"error":{"description":"Not found message","title":"get_universe_types_type_id_404_not_found","type":"string"}},"title":"get_universe_types_type_id_not_found","type":"object"}},"420":{"description":"Error limited","examples":{"application\/json":{"error":"Error limited message"}},"schema":{"$ref":"#\/definitions\/error_limited"}},"500":{"description":"Internal server error","examples":{"application\/json":{"error":"Internal server error message"}},"schema":{"$ref":"#\/definitions\/internal_server_error"}},"503":{"description":"Service unavailable","examples":{"application\/json":{"error":"Service unavailable message"}},"schema":{"$ref":"#\/definitions\/service_unavailable"}},"504":{"description":"Gateway timeout","examples":{"application\/json":{"error":"Gateway timeout message"}},"schema":{"$ref":"#\/definitions\/gateway_timeout"}}},"summary":"Get type information","tags":["Universe"],"x-alternate-versions":["dev","v3"]}}},"produces":["application\/json"],"schemes":["https"],"securityDefinitions":{"evesso":{"authorizationUrl":"https:\/\/login.eveonline.com\/v2\/oauth\/authorize","flow":"implicit","scopes":{"esi-alliances.read_contacts.v1":"EVE SSO scope esi-alliances.read_contacts.v1","esi-assets.read_assets.v1":"EVE SSO scope esi-assets.read_assets.v1","esi-assets.read_corporation_assets.v1":"EVE SSO scope esi-assets.read_corporation_assets.v1","esi-bookmarks.read_character_bookmarks.v1":"EVE SSO scope esi-bookmarks.read_character_bookmarks.v1","esi-bookmarks.read_corporation_bookmarks.v1":"EVE SSO scope esi-bookmarks.read_corporation_bookmarks.v1","esi-calendar.read_calendar_events.v1":"EVE SSO scope esi-calendar.read_calendar_events.v1","esi-calendar.respond_calendar_events.v1":"EVE SSO scope esi-calendar.respond_calendar_events.v1","esi-characters.read_agents_research.v1":"EVE SSO scope esi-characters.read_agents_research.v1","esi-characters.read_blueprints.v1":"EVE SSO scope esi-characters.read_blueprints.v1","esi-characters.read_contacts.v1":"EVE SSO scope esi-characters.read_contacts.v1","esi-characters.read_corporation_roles.v1":"EVE SSO scope esi-characters.read_corporation_roles.v1","esi-characters.read_fatigue.v1":"EVE SSO scope esi-characters.read_fatigue.v1","esi-characters.read_fw_stats.v1":"EVE SSO scope esi-characters.read_fw_stats.v1","esi-characters.read_loyalty.v1":"EVE SSO scope esi-characters.read_loyalty.v1","esi-characters.read_medals.v1":"EVE SSO scope esi-characters.read_medals.v1","esi-characters.read_notifications.v1":"EVE SSO scope esi-characters.read_notifications.v1","esi-characters.read_opportunities.v1":"EVE SSO scope esi-characters.read_opportunities.v1","esi-characters.read_standings.v1":"EVE SSO scope esi-characters.read_standings.v1","esi-characters.read_titles.v1":"EVE SSO scope esi-characters.read_titles.v1","esi-characters.write_contacts.v1":"EVE SSO scope esi-characters.write_contacts.v1","esi-clones.read_clones.v1":"EVE SSO scope esi-clones.read_clones.v1","esi-clones.read_implants.v1":"EVE SSO scope esi-clones.read_implants.v1","esi-contracts.read_character_contracts.v1":"EVE SSO scope esi-contracts.read_character_contracts.v1","esi-contracts.read_corporation_contracts.v1":"EVE SSO scope esi-contracts.read_corporation_contracts.v1","esi-corporations.read_blueprints.v1":"EVE SSO scope esi-corporations.read_blueprints.v1","esi-corporations.read_contacts.v1":"EVE SSO scope esi-corporations.read_contacts.v1","esi-corporations.read_container_logs.v1":"EVE SSO scope esi-corporations.read_container_logs.v1","esi-corporations.read_corporation_membership.v1":"EVE SSO scope esi-corporations.read_corporation_membership.v1","esi-corporations.read_divisions.v1":"EVE SSO scope esi-corporations.read_divisions.v1","esi-corporations.read_facilities.v1":"EVE SSO scope esi-corporations.read_facilities.v1","esi-corporations.read_fw_stats.v1":"EVE SSO scope esi-corporations.read_fw_stats.v1","esi-corporations.read_medals.v1":"EVE SSO scope esi-corporations.read_medals.v1","esi-corporations.read_standings.v1":"EVE SSO scope esi-corporations.read_standings.v1","esi-corporations.read_starbases.v1":"EVE SSO scope esi-corporations.read_starbases.v1","esi-corporations.read_structures.v1":"EVE SSO scope esi-corporations.read_structures.v1","esi-corporations.read_titles.v1":"EVE SSO scope esi-corporations.read_titles.v1","esi-corporations.track_members.v1":"EVE SSO scope esi-corporations.track_members.v1","esi-fittings.read_fittings.v1":"EVE SSO scope esi-fittings.read_fittings.v1","esi-fittings.write_fittings.v1":"EVE SSO scope esi-fittings.write_fittings.v1","esi-fleets.read_fleet.v1":"EVE SSO scope esi-fleets.read_fleet.v1","esi-fleets.write_fleet.v1":"EVE SSO scope esi-fleets.write_fleet.v1","esi-industry.read_character_jobs.v1":"EVE SSO scope esi-industry.read_character_jobs.v1","esi-industry.read_character_mining.v1":"EVE SSO scope esi-industry.read_character_mining.v1","esi-industry.read_corporation_jobs.v1":"EVE SSO scope esi-industry.read_corporation_jobs.v1","esi-industry.read_corporation_mining.v1":"EVE SSO scope esi-industry.read_corporation_mining.v1","esi-killmails.read_corporation_killmails.v1":"EVE SSO scope esi-killmails.read_corporation_killmails.v1","esi-killmails.read_killmails.v1":"EVE SSO scope esi-killmails.read_killmails.v1","esi-location.read_location.v1":"EVE SSO scope esi-location.read_location.v1","esi-location.read_online.v1":"EVE SSO scope esi-location.read_online.v1","esi-location.read_ship_type.v1":"EVE SSO scope esi-location.read_ship_type.v1","esi-mail.organize_mail.v1":"EVE SSO scope esi-mail.organize_mail.v1","esi-mail.read_mail.v1":"EVE SSO scope esi-mail.read_mail.v1","esi-mail.send_mail.v1":"EVE SSO scope esi-mail.send_mail.v1","esi-markets.read_character_orders.v1":"EVE SSO scope esi-markets.read_character_orders.v1","esi-markets.read_corporation_orders.v1":"EVE SSO scope esi-markets.read_corporation_orders.v1","esi-markets.structure_markets.v1":"EVE SSO scope esi-markets.structure_markets.v1","esi-planets.manage_planets.v1":"EVE SSO scope esi-planets.manage_planets.v1","esi-planets.read_customs_offices.v1":"EVE SSO scope esi-planets.read_customs_offices.v1","esi-search.search_structures.v1":"EVE SSO scope esi-search.search_structures.v1","esi-skills.read_skillqueue.v1":"EVE SSO scope esi-skills.read_skillqueue.v1","esi-skills.read_skills.v1":"EVE SSO scope esi-skills.read_skills.v1","esi-ui.open_window.v1":"EVE SSO scope esi-ui.open_window.v1","esi-ui.write_waypoint.v1":"EVE SSO scope esi-ui.write_waypoint.v1","esi-universe.read_structures.v1":"EVE SSO scope esi-universe.read_structures.v1","esi-wallet.read_character_wallet.v1":"EVE SSO scope esi-wallet.read_character_wallet.v1","esi-wallet.read_corporation_wallets.v1":"EVE SSO scope esi-wallet.read_corporation_wallets.v1"},"type":"oauth2"}},"swagger":"2.0"}