Prepare calendar query template
This commit is contained in:
parent
84b660a7ef
commit
e1e0afd6b6
|
@ -8,6 +8,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/cookiejar"
|
"net/http/cookiejar"
|
||||||
"strings"
|
"strings"
|
||||||
|
"text/template"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -123,3 +124,27 @@ const folderIdRequest = `<?xml version="1.0" encoding="utf-8"?>
|
||||||
</m:GetFolder>
|
</m:GetFolder>
|
||||||
</soap:Body>
|
</soap:Body>
|
||||||
</soap:Envelope>`
|
</soap:Envelope>`
|
||||||
|
|
||||||
|
var calendarQuery = template.Must(template.New("calendarQuery").Parse(`<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
||||||
|
<soap:Header>
|
||||||
|
<t:RequestServerVersion Version="Exchange2013_SP1" />
|
||||||
|
</soap:Header>
|
||||||
|
<soap:Body>
|
||||||
|
<m:FindItem Traversal="Shallow">
|
||||||
|
<m:ItemShape>
|
||||||
|
<t:BaseShape>IdOnly</t:BaseShape>
|
||||||
|
<t:AdditionalProperties>
|
||||||
|
<t:FieldURI FieldURI="item:Subject" />
|
||||||
|
<t:FieldURI FieldURI="calendar:Start" />
|
||||||
|
<t:FieldURI FieldURI="calendar:End" />
|
||||||
|
<t:FieldURI FieldURI="calendar:UID" />
|
||||||
|
</t:AdditionalProperties>
|
||||||
|
</m:ItemShape>
|
||||||
|
<m:CalendarView StartDate="{{ .StartDate }}" EndDate="{{ .EndDate }}" />
|
||||||
|
<m:ParentFolderIds>
|
||||||
|
<t:FolderId Id="{{ .FolderId.Id }}" ChangeKey="{{ .FolderId.ChangeKey }}" />
|
||||||
|
</m:ParentFolderIds>
|
||||||
|
</m:FindItem>
|
||||||
|
</soap:Body>
|
||||||
|
</soap:Envelope>`))
|
||||||
|
|
Loading…
Reference in New Issue