caldav: add expand request to client
This commit is contained in:
@@ -154,7 +154,9 @@ func encodeCalendarReq(c *CalendarCompRequest) (*internal.Prop, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
calDataReq := calendarDataReq{Comp: compReq}
|
||||
expandReq := encodeExpandRequest(c.Expand)
|
||||
|
||||
calDataReq := calendarDataReq{Comp: compReq, Expand: expandReq}
|
||||
|
||||
getLastModReq := internal.NewRawXMLElement(internal.GetLastModifiedName, nil, nil)
|
||||
getETagReq := internal.NewRawXMLElement(internal.GetETagName, nil, nil)
|
||||
@@ -213,6 +215,17 @@ func encodeTextMatch(tm *TextMatch) *textMatch {
|
||||
return encoded
|
||||
}
|
||||
|
||||
func encodeExpandRequest(e *CalendarExpandRequest) *expand {
|
||||
if e == nil {
|
||||
return nil
|
||||
}
|
||||
encoded := expand{
|
||||
Start: dateWithUTCTime(e.Start),
|
||||
End: dateWithUTCTime(e.End),
|
||||
}
|
||||
return &encoded
|
||||
}
|
||||
|
||||
func decodeCalendarObjectList(ms *internal.MultiStatus) ([]CalendarObject, error) {
|
||||
addrs := make([]CalendarObject, 0, len(ms.Responses))
|
||||
for _, resp := range ms.Responses {
|
||||
|
Reference in New Issue
Block a user