Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Public Calendars' Event #57

Open
AndCycle opened this issue Nov 12, 2024 · 6 comments
Open

Support Public Calendars' Event #57

AndCycle opened this issue Nov 12, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@AndCycle
Copy link

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
@eoleedi eoleedi linked a pull request Nov 12, 2024 that will close this issue
@eoleedi
Copy link
Owner

eoleedi commented Nov 13, 2024

@AndCycle Could you test if the pr works for public calendars?

@AndCycle
Copy link
Author

@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

@AndCycle
Copy link
Author

event.add("last-modify", self.last_modify)

as I looking into the RFC standard
https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.7.3
this should be last-modified

@eoleedi
Copy link
Owner

eoleedi commented Nov 15, 2024

event.add("last-modify", self.last_modify)

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!

@eoleedi eoleedi added the bug Something isn't working label Nov 15, 2024
@eoleedi
Copy link
Owner

eoleedi commented Nov 18, 2024

@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.

@eoleedi eoleedi removed a link to a pull request Nov 18, 2024
@AndCycle
Copy link
Author

indeed, should have different class for them, thanks for lookup into this

@eoleedi eoleedi changed the title Formatter failed to passing TimeTreeEvent with missing data Support Public Calendars' Event Nov 19, 2024
@eoleedi eoleedi added enhancement New feature or request and removed bug Something isn't working labels Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants