Insightful Integration¶
Based on idk/services/connector_insightful.py.
Quick start¶
from idk.services.connector_insightful import InsightfulConnector
ins = InsightfulConnector(retries=3, delay=5)
employees = ins.get_employees()
Settings:
- INSIGHTFUL_API_TOKEN
- TIME_ZONE (for analytics queries)
Methods¶
- get_employees() -> list[dict{id, name, email}]
- get_activities(employee_id: str, start_ts: int, end_ts: int) -> list | dict
- get_breaks(employee_id: str, start_ts: int, end_ts: int) -> list | dict
Notes:
- Timestamps are in milliseconds.
- _make_request includes simple retry with delay for transient failures.