diff --git a/vdirsyncer/storage/dav.py b/vdirsyncer/storage/dav.py index 23766c3..69c9092 100644 --- a/vdirsyncer/storage/dav.py +++ b/vdirsyncer/storage/dav.py @@ -14,7 +14,8 @@ from requests import session as requests_session from requests.exceptions import HTTPError from .base import Item, Storage -from .http import USERAGENT, prepare_auth, prepare_verify +from .http import HTTP_STORAGE_PARAMETERS, USERAGENT, prepare_auth, \ + prepare_verify from .. import exceptions, log, utils @@ -250,18 +251,9 @@ class DavSession(object): class DavStorage(Storage): - ''' + __doc__ = ''' :param url: Base URL or an URL to a collection. - :param username: Username for authentication. - :param password: Password for authentication. - :param verify: Verify SSL certificate, default True. This can also be a - local path to a self-signed SSL certificate. - :param verify_fingerprint: Optional. SHA1 or MD5 fingerprint of the - expected server certificate. - :param auth: Optional. Either ``basic``, ``digest`` or ``guess``. Default - ``guess``. If you know yours, consider setting it explicitly for - performance. - :param useragent: Default ``vdirsyncer``. + ''' + HTTP_STORAGE_PARAMETERS + ''' :param unsafe_href_chars: Replace the given characters when generating hrefs. Defaults to ``'@'``. diff --git a/vdirsyncer/storage/http.py b/vdirsyncer/storage/http.py index 190c1e8..fa37ded 100644 --- a/vdirsyncer/storage/http.py +++ b/vdirsyncer/storage/http.py @@ -44,11 +44,7 @@ def prepare_verify(verify): return verify -class HttpStorage(Storage): - ''' - Use a simple ``.ics`` file (or similar) from the web. - - :param url: URL to the ``.ics`` file. +HTTP_STORAGE_PARAMETERS = ''' :param username: Username for authentication. :param password: Password for authentication. :param verify: Verify SSL certificate, default True. This can also be a @@ -59,6 +55,15 @@ class HttpStorage(Storage): ``guess``. If you know yours, consider setting it explicitly for performance. :param useragent: Default ``vdirsyncer``. +''' + + +class HttpStorage(Storage): + __doc__ = ''' + Use a simple ``.ics`` file (or similar) from the web. + + :param url: URL to the ``.ics`` file. + ''' + HTTP_STORAGE_PARAMETERS + ''' A simple example::