Merge branch 'main' into feature/googleCalendarAndDriveAttachment

This commit is contained in:
Taylor Wilsdon
2025-06-18 11:21:40 -04:00
committed by GitHub
4 changed files with 61 additions and 44 deletions

View File

@@ -143,7 +143,7 @@ async def get_events(
max_results (int): The maximum number of events to return. Defaults to 25.
Returns:
str: A formatted list of events (summary, start time, link) within the specified range.
str: A formatted list of events (summary, start and end times, link) within the specified range.
"""
try:
logger.info(
@@ -194,13 +194,13 @@ async def get_events(
event_details_list = []
for item in items:
summary = item.get("summary", "No Title")
start = item["start"].get("dateTime", item["start"].get("date"))
end = item["end"].get("dateTime", item["end"].get("date"))
start_time = item["start"].get("dateTime", item["start"].get("date"))
end_time = item["end"].get("dateTime", item["end"].get("date"))
link = item.get("htmlLink", "No Link")
event_id = item.get("id", "No ID")
# Include the start/end date, and event ID in the output so users can copy it for modify/delete operations
event_details_list.append(
f'- "{summary}" (Starts: {start}, Ends: {end}) ID: {event_id} | Link: {link}'
f'- "{summary}" (Starts: {start_time}, Ends: {end_time}) ID: {event_id} | Link: {link}'
)
text_output = (