DatabaseQuery¶
Parameter specifications:
Each parameter can only take specific strings (e.g. spelling of certain country names) that are defined in the database. Leaving the filters empty will return all data. You can find these exact strings in following files:
- class eurepoc.database_query.DatabaseQuery(token, receiver_region=None, receiver_country=None, receiver_category=None, initiator_country=None, date_type=None, start_date=None, end_date=None, flag_type=None, flag_status=None)[source]¶
Bases:
object
A class used for querying and processing the data from the EuRepoC Strapi API using specified filters.
- Parameters:
token (str) – Authentication token for the EuRepoC database.
receiver_region (str, optional) – Default is None.
receiver_country (str, optional) – Default is None.
receiver_category (str, optional) – Default is None.
initiator_country (str, optional) – Default is None.
date_type (str, optional) – Refers to the type of date to filter by. This can be either: ‘start_date’, referring to the start date of the incident; or ‘createdAt’, referring to the date the incident was added to the database. Default is None.
start_date (str, optional) – The start date for filtering data (YYYY-MM-DD format). Default is None.
end_date (str, optional) – The end date for filtering data (YYYY-MM-DD format). Default is None.
flag_type (str, optional) – Default is None.
flag_status (str, optional) – Default is None.
- Raises:
ValueError – If no token is provided.