Re: [Evolution-hackers] [evolution-data-server: WebDAV] Get list of all calendars for user



On Thu, 2015-05-14 at 13:31 +0200, Alexis Maiquez Murcia wrote:
-Is there any way to retrieve a calendars list with libedataserver
for WebDAV-based users?

        Hi,
there was added this very recently in the code [1], only the
development version contains it, thus it'll be part of the
evolution-data-server 3.18.0.

There is one special issue with the Google server related to shared
calendars added by the user in the Google's Web UI. To have them
advertised also with the WebDAV discovery the users should enable them
for it first. Erick, a gnome-calendar developer, found this here:
http://stackoverflow.com/questions/25669144/google-caldav-access-to-shared-calendars
which mentions a direct URL for the setting here:
https://www.google.com/calendar/syncselect

Please note that it's a special behaviour of Google, it has nothing to
do with evolution-data-server or any other client using WebDAV/CalDAV.
Of course, Google's API doesn't need any such setting.

-Is there any specific way to connect to Google Calendar through 
libedataserver and sync those calendars too? (the WebDAV method is 
considered insecure by google)

I'd not say they consider the CalDAV method insecure, it's the
authentication type, plain/password, which they consider insecure and
may abandon in the future. Evolution-data-server's CalDAV calendar
backend can use OAuth2 token, but evolution itself doesn't know how to
get to them in other way than by asking GNOME Online Accounts for it.
That means, if your application will be able to provide OAuth2 token to
the evolution-data-server, then you can use it and it'll work. I'm only
afraid that you'd need to write some external module for evolution
-source-registry, similar to [2], to be able to do it.

The CalDAV URL also changes when using the OAuth2 token, it's located at:
  apidata.googleusercontent.com/caldav/v2/<user-email>/events/
instead of
  google.com/calendar/dav/<user-email>/events/

        Hope it helps,
        Milan

[1] https://git.gnome.org/browse/evolution-data-server/tree/libedataserver/e-webdav-discover.h
    https://git.gnome.org/browse/evolution-data-server/tree/libedataserverui/e-webdav-discover-widget.h
[2] https://git.gnome.org/browse/evolution-data-server/tree/modules/google-backend
    https://git.gnome.org/browse/evolution-data-server/tree/modules/gnome-online-accounts


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]