Support Public Calendars' Event
thanks for the project that saves me some time to work on personal tool to export timetree data to google calendar,
as I trying to export data from public TimeTree calendar the data doesn't provide any alerts or recurrences
api endpoint https://timetreeapp.com/api/v2/public_calendars/{calendar_id}/public_events
File "/home/andcycle/.local/share/mise/installs/python/3.12.7/lib/python3.12/site-packages/timetree_exporter/formatter.py", line 208, in to_ical
for alarm in self.alarms:
^^^^^^^^^^^
File "/home/andcycle/.local/share/mise/installs/python/3.12.7/lib/python3.12/site-packages/timetree_exporter/formatter.py", line 132, in alarms
for alert in self.time_tree_event.alerts:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
@AndCycle Could you test if the pr works for public calendars?
@eoleedi looks good to me, thanks, there is some other attribute need some work, public event doesn't have uuid, I don't know filling it with id value is a proper solution or not
https://github.com/eoleedi/TimeTree-Exporter/blob/1264832ba7fd512bb3071556bf70d35b85477775/timetree_exporter/formatter.py#L193
as I looking into the RFC standard
https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.7.3
this should be last-modified
https://github.com/eoleedi/TimeTree-Exporter/blob/1264832ba7fd512bb3071556bf70d35b85477775/timetree_exporter/formatter.py#L193
as I looking into the RFC standard https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.7.3 this should be
last-modified
Indeed!
@AndCycle I believe the events in the public calendar are in API v2 format. We should define different TimeTreeEvent Classes for different calendar and API versions.
indeed, should have different class for them, thanks for lookup into this