ESI data indexation¶
Database models¶
Database models
-
class
sni.index.models.
EsiCharacterLocation
(*args, **values)[source]¶ Bases:
mongoengine.document.Document
Represents a character location, along with the ship it is currently flying. Thus, it is a combination of the ESI
/characters/{character_id}/location
,/characters/{character_id}/online
,/characters/{character_id}/ship
, and/universe/structures/{structure_id}/
(if applicable).-
SCHEMA_VERSION
= 2¶ Latest schema version for this collection
-
_version
¶ Schema version of this document
-
online
¶ Wether the character is online
-
ship_item_id
¶ Ship item ID (this ID persists until repackaged)
-
ship_name
¶ Ship name
-
ship_type_id
¶ Ship type ID
-
solar_system_id
¶ Solar system ID where the character is
-
station_id
¶ Station ID, if applicable
-
structure_id
¶ Structure ID, if applicable
-
structure_name
¶ Structure name, if applicable
-
timestamp
¶ Timestamp
-
user
¶ Corresponding user
-
-
class
sni.index.models.
EsiMail
(*args, **values)[source]¶ Bases:
mongoengine.document.Document
Represents a EVE mail. This collection has a text search index on the
body
andsubject
fields (see here)-
SCHEMA_VERSION
= 1¶ Latest schema version for this collection
-
_version
¶ Schema version of this document
-
body
¶ Body of the email
-
from_id
¶ Character id of the sender
-
mail_id
¶ Mail id (according to the ESI)
-
recipients
¶ Recipient list. See
sni.index.models.EsiMailRecipient
.
-
subject
¶ Subject of the email
-
timestamp
¶ ESI timestamp of the email
-
-
class
sni.index.models.
EsiMailRecipient
(*args, **kwargs)[source]¶ Bases:
mongoengine.document.EmbeddedDocument
An email recipient
-
recipient_id
¶ 32-bit integer field.
-
recipient_type
¶ A unicode string field.
-
-
class
sni.index.models.
EsiSkillPoints
(*args, **values)[source]¶ Bases:
mongoengine.document.Document
Represents a measurment of a character’s skill points
-
SCHEMA_VERSION
= 1¶ Latest schema version for this collection
-
_version
¶ Schema version of this document
-
timestamp
¶ Timestamp of this skillpoint measurment
-
total_sp
¶ Total skillpoints
-
unallocated_sp
¶ Unallocated skillpoints
-
user
¶ Corresponding user
-
Jobs¶
Scheduled indexaction jobs
-
sni.index.jobs.
format_mail_body
(body: str) → str[source]¶ Formats a mail body by removing most of the HTML tags.
-
sni.index.jobs.
index_user_location
(usr: sni.user.models.User)[source]¶ Indexes a user’s location, online status, and ship
-
sni.index.jobs.
index_user_skillpoints
(usr: sni.user.models.User)[source]¶ Measures a user’s skillpoints. See
sni.index.models.EsiSkillPoints
.
Database signals¶
Database signals. See Mongoengine signals