|
ϵ½עᣬύѣøܣϴزIJޣ
Ҫ ¼ ſػ鿴ûʺţ¼ע

x
Google Calendar API㴴Google Calendarϵ¼ӽ쿪ʼʹAPIGoogle DriveļCalendar¼Appʵ֣Ӷ߿ԺͼԡAPIɵӻ¼ԤõPDFs¼
÷
Google DriveļϢӣͨGoogle Drive API
Java :
- GET [url]httPS://www.googleapis.com/drive/v2/files[/url]
- {
- ...
- "items": [
- {
- "kind": "drive#file",
- "id": "9oNKwQI7dkW-xHJ3eRvTO6Cp92obxs1kJsZLFRGFMz9Q,
- ...
- "alternateLink": "https://docs.google.com/presentation/d/9oNKwQI7dkW-xHJ3eRvTO6Cp92obxs1kJsZLFRGFMz9Q/edit?usp=drivesdk",
- "title": "Workout plan",
- "mimeType": "application/vnd.google-apps.presentation",
- ...
- },
- ...
- ]
- }
ƴ 2.ʹCalendar APIвʵִϢ¼
Java:
- POST [url]https://www.googleapis.com/calendar/v3/calendars/primary/events?supportsAttachments=true[/url]
- {
- "summary": "Workout",
- "start": { ... },
- "end": { ... },
- ...
- "attachments": [
- {
- "fileUrl": "https://docs.google.com/presentation/d/9oNKwQI7dkW-xHJ3eRvTO6Cp92obxs1kJsZLFRGFMz9Q/edit?usp=drivesdk",
- "title": "Workout plan",
- "mimeType": "application/vnd.google-apps.presentation"
- },
- ...
- ]
- }
ƴ
㲻ҪʲôرIJͿʵһ
Java:
- GET [url]https://www.googleapis.com/calendar/v3/calendars/primary/events/ja58khmqndmulcongdge9uekm7[/url]
- {
- "kind": "calendar#event",
- "id": "ja58khmqndmulcongdge9uekm7",
- "summary": "Workout",
- ...
- "attachments": [
- {
- "fileUrl": "https://docs.google.com/presentation/d/9oNKwQI7dkW-xHJ3eRvTO6Cp92obxs1kJsZLFRGFMz9Q/edit?usp=drivesdk",
- "title": "Workout plan",
- "mimeType": "application/vnd.google-apps.presentation",
- "iconLink": "https://ssl.gstatic.com/docs/doclist/images/icon_11_presentation_list.png"
- },
- ...
- ]
- }
ƴ Google Calendar API ļϵָϺͲοԻøϸڡ
ӢԭģAttach Google Drive files to Calendar events with the Calendar API
|
|