Comments (5)
calendar.add_event(event)
returns a created event with the set id. So replace this line with
event = calendar.add_event(event)
And everything should work.
But if adding the attendee is the only update you do to the event, you can just add attendee before add_event
:
...
attendee = Attendee('[email protected]')
event = Event('Prueba',
start=(25 / Oct / 2022)[21:58],
minutes_before_email_reminder=20,
attendees=attendee)
calendar.add_event(event)
Also, glad to see that you are using beautiful-date
😊
from google-calendar-simple-api.
Thank you so so much, it works, and the reason for using the instruction attendee instead of just adding in event instruction is that I wanna make a function where a can only enter emails and be able to delete them as well as add them, and a think I cloud do that with a for, I don't know, what do u think?
from google-calendar-simple-api.
and btw, I love beautiful-date, its so easy to use, and very useful
from google-calendar-simple-api.
I used this code to do what I want to do, so it's here if u want to give me ur opinions or for whoever wanna do the same as me
from calendar import Calendar
from gcsa.event import Event
from gcsa.google_calendar import GoogleCalendar
from gcsa.recurrence import Recurrence, DAILY, SU, SA
from gcsa.attendee import Attendee
from beautiful_date import *
def classtogooglecal():
calendar = GoogleCalendar('[email protected]',credentials_path='credentials.json')
event = Event('Prueba',start=(25 / Oct / 2022)[21:58],minutes_before_email_reminder=20)
event = calendar.add_event(event)
emails = ["[email protected]","[email protected]"]
for i in range(len(emails)):
eachemail = emails[i]
print(eachemail)
attendee = Attendee(eachemail)
event.add_attendee(attendee)
calendar.update_event(event)
classtogooglecal()
from google-calendar-simple-api.
Happy that this resolved your issue.
I'll close the issue. If you have any other questions post them here or in the Discussions.
As for attendees, your approach is fine
from google-calendar-simple-api.
Related Issues (20)
- Unknown timezone error HOT 2
- Creating event doesnt generate event id HOT 1
- 'Credentials' object has no attribute 'refresh_token'. (Support service accounts) HOT 2
- Write some docs on `color`
- Issue when changing event type HOT 4
- Sign in with App Passwords? HOT 1
- Clarify get_events() docs HOT 4
- Work with the new credentials file names
- Circular Import Error HOT 2
- ModuleNotFoundError on raspberrypi HOT 7
- Add Timezone docs
- Don't use cache discovery HOT 1
- Unable to list events from non-primary calendar HOT 3
- Add Earth Hour as an example in recurrence
- Adding Multiple Attendees to an existing event HOT 3
- Allow "absolute" time reminders
- Support python 3.12
- Infer timezone from .start and .end HOT 2
- Allow `open_browser=False`
- Move `_LIST_ORDERS` to `EventsService`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-calendar-simple-api.