I am using python-caldav and vobject Python libraries to connect to and parse calendar files from a private caldav server.
I cannot for the life of me figure out how to make a freebusy request using these libraries. I've searched through the documentation and have searched and searched for examples, but I cannot seem to find any information anywhere.
If anyone has any information, I would greatly appreciate it. Here is an example from caldav library using details I found in the repo.
url = "https://" + username + ":" + password + "@domain.com/"
client = caldav.DAVClient(url)
principal = client.principal()
calendars = principal.calendars()
calendar = calendars[1]
freebusy = calendar.freebusy_request(datetime(2018,7,12, 12, 0, 0), datetime(2018,7,13, 12, 0, 0))
It returns the following error:
caldav.lib.error.ReportError: 406 Not Acceptable
before you do any programming, check that the ics provider even provides freebusy info. You should be able to download the ics file from the url and open it in a text editor to see what it contains. When you know you have the freebusy in the ics file, then yu can start programmatically dealing with it.
The provider of the ics file from may have special url parameters, but many do not. For example with google calendar, calendar settings will determine whether the ics file contains freebusy or normal event data. There is nothing special about the ics url, or the request, it's the google calendar internal settings that determine what the file contains.