Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
270 views
in Technique[技术] by (71.8m points)

Create Google Calendar Event with URL and predefined Event Id

I would like to create a Google Calendar event with a URL having a predefined eventId, so that if user want to modify the event later I can redirect him to the Event using predefined eventId stored in database.

question from:https://stackoverflow.com/questions/65854862/create-google-calendar-event-with-url-and-predefined-event-id

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...