feat: Implement dynamic Google Calendar agenda, and configure OpenAI model, Calendly link, and daily summary schedule.

This commit is contained in:
Marco Gallegos
2025-12-18 00:23:11 -06:00
parent e960538943
commit 96542bcd61
7 changed files with 76 additions and 24 deletions

View File

@@ -113,3 +113,25 @@ def create_event(summary, start_time, end_time, attendees, calendar_id=CALENDAR_
except HttpError as error:
print(f"Ocurrió un error al crear el evento: {error}")
return None
def get_events(start_time, end_time, calendar_id=CALENDAR_ID):
"""
Obtiene la lista de eventos entre dos momentos.
"""
try:
events_result = (
service.events()
.list(
calendarId=calendar_id,
timeMin=start_time.isoformat(),
timeMax=end_time.isoformat(),
singleEvents=True,
orderBy="startTime",
)
.execute()
)
return events_result.get("items", [])
except HttpError as error:
print(f"Ocurrió un error al obtener eventos: {error}")
return []