:py:mod:`EVECelery.tasks.ESI.Universe.post_universe_ids` ======================================================== .. py:module:: EVECelery.tasks.ESI.Universe.post_universe_ids .. autoapi-nested-parse:: A task definition module with associated response models returned by the task. This module was automatically generated from Jinja templates with the codegen tool included in the root of this repo. You should not directly modify this module but instead modify the template 'codegen/Templates/ESI_Task.py'. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: EVECelery.tasks.ESI.Universe.post_universe_ids.post_universe_ids .. py:class:: post_universe_ids Bases: :py:obj:`EVECelery.tasks.BaseTasks.TaskESI.TaskESI` Bulk names to IDs .. py:method:: request_method() -> str Returns the type of request made to ESI This method will return the request method (get, post, etc.) made to ESI. :return: Request method passed to requests.request() .. py:method:: route(**kwargs) -> str ESI route with input request parameters :return: ESI route with request path parameters if any .. py:method:: cache_ttl_default() -> int TTL for when cache is unspecified. :return: The number of seconds to cache a response .. py:method:: get_sync(names: list[str], datasource: str = 'tranquility', language: str = 'en', kwargs_apply_async: Optional[dict] = None, kwargs_get: Optional[dict] = None) -> Union[EVECelery.tasks.ESI.Universe.Models.post_universe_ids_200.Response200_post_universe_ids] Bulk names to IDs Resolve a set of names to IDs in the following categories: agents, alliances, characters, constellations, corporations factions, inventory_types, regions, stations, and systems. Only exact matches will be returned. All names searched for are cached for 12 hours --- Alternate route: `/dev/universe/ids/` Alternate route: `/legacy/universe/ids/` Alternate route: `/v1/universe/ids/` NOTE: This function calls the task and blocks until the result is available. This function is a wrapper around Celery's `task.apply_async() `_ and `AsyncResult.get() `_ methods. Instead of a dictionary, this function returns a pydantic model to more easily see what returned data responses look like, what is optionally returned, etc. If you would instead like to return an async result, use Celery's `apply_async() `_ method on this task. :param names: The names to resolve :param datasource: The server name you would like data from -- ['tranquility'] :param language: Language to use in the response, takes precedence over Accept-Language -- ['en', 'en-us', 'de', 'fr', 'ja', 'ru', 'zh', 'ko', 'es'] :param Optional[dict] kwargs_apply_async: Dictionary of keyword arguments passed to `task.apply_async() `_ :param Optional[dict] kwargs_get: Dictionary of keyword arguments passed to `AsyncResult.get() `_ :return: The response from ESI as a pydantic object. The response model will follow the structure of :class:`Response200_post_universe_ids`. .. py:method:: run(names: list[str], datasource: str = 'tranquility', language: str = 'en', **kwargs) -> dict The task body that runs on the EVECelery worker This is the task body that runs on the EVECelery worker. IMPORTANT NOTE: You should not directly call this function from your client code as it will run within the context of your client and won't be sent to the message broker to run on a worker node. To correctly call this task body, see `Celery's documentation `_ on methods for calling tasks. See also this task's :func:`get_sync` which is a wrapper function around Celery's apply_async().get() call. Bulk names to IDs Resolve a set of names to IDs in the following categories: agents, alliances, characters, constellations, corporations factions, inventory_types, regions, stations, and systems. Only exact matches will be returned. All names searched for are cached for 12 hours --- Alternate route: `/dev/universe/ids/` Alternate route: `/legacy/universe/ids/` Alternate route: `/v1/universe/ids/` :param names: The names to resolve :param datasource: The server name you would like data from -- ['tranquility'] :param language: Language to use in the response, takes precedence over Accept-Language -- ['en', 'en-us', 'de', 'fr', 'ja', 'ru', 'zh', 'ko', 'es'] :return: The response from ESI as a JSON dictionary. The response dictionary will follow the structure of :class:`Response200_post_universe_ids`.