EVECelery.tasks.ESI.Calendar.get_characters_character_id_calendar#
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#
List calendar event summaries |
- class EVECelery.tasks.ESI.Calendar.get_characters_character_id_calendar.get_characters_character_id_calendar#
Bases:
EVECelery.tasks.BaseTasks.TaskESI.TaskESIList calendar event summaries
- request_method() str#
Returns the type of request made to ESI
This method will return the request method (get, post, etc.) made to ESI.
- Returns:
Request method passed to requests.request()
- Return type:
str
- route(character_id: int, **kwargs) str#
ESI route with input request parameters
- Parameters:
character_id (int) – An EVE character ID
- Returns:
ESI route with request path parameters if any
- Return type:
str
- cache_ttl_default() int#
TTL for when cache is unspecified.
- Returns:
The number of seconds to cache a response
- Return type:
int
- get_sync(character_id: int, datasource: str = 'tranquility', from_event: int | None = None, token: str | None = None, kwargs_apply_async: dict | None = None, kwargs_get: dict | None = None) EVECelery.tasks.ESI.Calendar.Models.get_characters_character_id_calendar_200.Response200_get_characters_character_id_calendar#
List calendar event summaries
Get 50 event summaries from the calendar. If no from_event ID is given, the resource will return the next 50 chronological event summaries from now. If a from_event ID is specified, it will return the next 50 chronological event summaries from after that event
— Alternate route: /dev/characters/{character_id}/calendar/
Alternate route: /legacy/characters/{character_id}/calendar/
Alternate route: /v1/characters/{character_id}/calendar/
Alternate route: /v2/characters/{character_id}/calendar/
— This route is cached for up to 5 seconds
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.
- Parameters:
character_id (int) – An EVE character ID
datasource (str) – The server name you would like data from – [‘tranquility’]
from_event (int | None) – The event ID to retrieve events from
token (str | None) – Access token to use if unable to set a header
kwargs_apply_async (Optional[dict]) –
Dictionary of keyword arguments passed to task.apply_async()
kwargs_get (Optional[dict]) –
Dictionary of keyword arguments passed to AsyncResult.get()
- Returns:
The response from ESI as a pydantic object. The response model will follow the structure of
Response200_get_characters_character_id_calendar.- Return type:
- run(character_id: int, datasource: str = 'tranquility', from_event: int | None = None, token: str | None = None, **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
get_sync()which is a wrapper function around Celery’s apply_async().get() call.List calendar event summaries
Get 50 event summaries from the calendar. If no from_event ID is given, the resource will return the next 50 chronological event summaries from now. If a from_event ID is specified, it will return the next 50 chronological event summaries from after that event
— Alternate route: /dev/characters/{character_id}/calendar/
Alternate route: /legacy/characters/{character_id}/calendar/
Alternate route: /v1/characters/{character_id}/calendar/
Alternate route: /v2/characters/{character_id}/calendar/
— This route is cached for up to 5 seconds
- Parameters:
character_id (int) – An EVE character ID
datasource (str) – The server name you would like data from – [‘tranquility’]
from_event (int | None) – The event ID to retrieve events from
token (str | None) – Access token to use if unable to set a header
- Returns:
The response from ESI as a JSON dictionary. The response dictionary will follow the structure of
Response200_get_characters_character_id_calendar.- Return type:
dict