zimbra-api / soap-api

Zimbra SOAP client in PHP language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[\Zimbra\Mail] How to use getAppointment() in another folder?

opened this issue · comments

Hi,

Summary:
I need to know whether to use createAppointment() or modifyAppointment() on shared calendars.

My thoughts:
I'm assuming I'll get errors when not using them correctly since createAppointment() would try to create a duplicate UID and modifyAppointment() needs an Invitation ID which I currently don't know how to get on shared calendars).

I need to be able to use getAppointment() on shared calendars.

What I have done so far:
I've found out that shared calendars are folders and can be fetched with getFolder().
Now I need to get an appointment from a folder other than the default folder '10'.

It seems logical to have a parameter in getAppointment() to specify the folder, but neither \Zimbra\Mail\MailInterface nor Zimbra's SOAP API documentation show such a parameter.

I also haven't found any function like setFolder() or any other getAppointment()-like functions.

Question:
How can I fetch an appointment from a shared calendar?

Thanks in advance,
Fred

Found a solution.
Use function search() and build the query string like these examples:

  • "(in:folderName1 OR in:folderName2) appointmentSubject"
  • "in:folderName appointmentSubject"

Problem with this is if you use the OR example, you won't be able to tell which folder is which result set.
If you need to know which folder the result correspons to (like in my case), you can simply iterate through the folders you want to check and build a query string like 2nd example for each folder and check the results.