OAuth2/Google CalDAV - List of calendars for user

巧了我就是萌 提交于 2019-12-22 11:26:16

问题


I used to request caldav servers to give all defined calendars for a given user. That works with fruux/ownCloud(Sabre) and also GCalendar the classic method. The request is this:

method: PROPFIND  headers:Depth: 1  
urlstr:https://www.google.com/calendar/dav/{theUserName}@gmail.com/  
contentType:application/xml  
content:
<d:propfind xmlns:d="DAV:" xmlns:cs="http://calendarserver.org/ns/" xmlns:c="urn:ietf:params:xml:ns:caldav">  
  <d:prop>  
    <d:resourcetype />  
    <d:displayname />  
    <cs:getctag />  
    <c:supported-calendar-component-set />  
  </d:prop>  
</d:propfind>  

Moving to Google OAuth2 has different calls, the ulrstr: would something like https://apidata.googleusercontent.com/caldav/v2/{calid}/user
Here the 'calid' has to be a specific calendar [1] There iis said:

Where calid should be replaced by the "calendar ID" of the calendar to be accessed

The intension is to get all calendars for a user's account! So those calls will NOT help.

Any suggestion how to get them in the Google/CalDAV/V2 world?

Günter

See also: [1] https://developers.google.com/google-apps/calendar/caldav/v2/guide

来源:https://stackoverflow.com/questions/18004654/oauth2-google-caldav-list-of-calendars-for-user

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!