forked from aksdb/CalAnonSync
Also include the changeKey
This commit is contained in:
parent
1e9293ac86
commit
84b660a7ef
|
@ -12,7 +12,8 @@ import (
|
|||
)
|
||||
|
||||
type FolderId struct {
|
||||
Id string `xml:",attr"`
|
||||
Id string `xml:",attr"`
|
||||
ChangeKey string `xml:",attr"`
|
||||
}
|
||||
|
||||
type CalendarItem struct {
|
||||
|
@ -53,7 +54,7 @@ func (e *EWSCalendar) prepareRequest(body io.Reader) (req *http.Request, err err
|
|||
return
|
||||
}
|
||||
|
||||
func (e *EWSCalendar) getCalendarFolderID() (id string, err error) {
|
||||
func (e *EWSCalendar) getCalendarFolderID() (id *FolderId, err error) {
|
||||
req, err := e.prepareRequest(strings.NewReader(folderIdRequest))
|
||||
if err != nil {
|
||||
return
|
||||
|
@ -87,9 +88,8 @@ func (e *EWSCalendar) getCalendarFolderID() (id string, err error) {
|
|||
switch t := t.(type) {
|
||||
case xml.StartElement:
|
||||
if t.Name.Local == "FolderId" {
|
||||
fid := FolderId{}
|
||||
err = d.DecodeElement(&fid, &t)
|
||||
id = fid.Id
|
||||
id = &FolderId{}
|
||||
err = d.DecodeElement(id, &t)
|
||||
// The first one is enough
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue