What I'm trying to achieve
I want to receive all events in the user calendar, sometimes within a certain window between two points in time, and sometimes everything. These events must be ordered at the start of the event as instantaneous time.
Problem i am facing
I am having problems using OData v4 query parameters $filterand $orderbyto filter and order the Start and End events. The problem is that with the v2.0 API these attributes are objects consisting of DateTimeand a TimeZone, and that TimeZoneshould be taken into account when filtering / organizing with DateTime.
This fragment is taken from official documents:
{
"@odata.id": "https://outlook.office.com/api/beta/Users('ddfcd489-628b-40d7-b48b-57002df800e5@1717622f-1d94-4d0c-9d74-709fad664b77')/Events('AAMkAGI28tEyDAAA=')",
"@odata.etag": "W/\"nfZyf7VcrEKLNoU37KWlkQAA/LpDWw==\"",
"Id": "AAMkAGI28tEyDAAA=",
"Subject": "Scrum",
"Start": {
"DateTime": "2015-11-02T17:00:00",
"TimeZone": "Pacific Standard Time"
},
"End": {
"DateTime": "2015-11-02T17:30:00",
"TimeZone": "Pacific Standard Time"
},
...
}
Start/DateTime End/DateTime, , . Start/DateTime:
https://outlook.office365.com/api/v2.0/users/user@example.org/events/?$filter=End/DateTime%20gt%202016-12-11T00:00:00&$orderby=Start/DateTime
Start , , , .
, , UTC, , . , "Pacific Stardard Time", , , , UTC.
API v1.0
1.0 API Start End () datetimeoffset, StartTimeZone EndTimeZone , , Start End , , StartTimeZone EndTimeZone.
/calendarview /events
/calendarview, . , ( ) , . , /events.