You can use the events.insert
method as specified there: https://developers.google.com/calendar/v3/reference/events/insert
You can pass a custom Id on the requestBody
of your query that you can use later, alongside your calendarId, to edit your event through the update
or patch
method.
Follow the guidelines when generating your custom Id:
Provided IDs must follow these rules:
- characters allowed in the ID are those used in base32hex encoding, i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in
RFC2938
- the length of the ID must be between 5 and 1024 characters
- the ID must be unique per calendar
- Due to the globally distributed nature of the system, we cannot guarantee that ID collisions will be detected at event creation time.
To minimize the risk of collisions we recommend using an established
UUID algorithm such as one described in RFC4122. -If you do not
specify an ID, it will be automatically generated by the server.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…