Skip to content

Commit

Permalink
msgraph GetEventsBetweenDates
Browse files Browse the repository at this point in the history
  • Loading branch information
fmartingr committed Jul 25, 2023
1 parent 8e117eb commit b6b3a84
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions server/remote/msgraph/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ func (c *client) TentativelyAcceptEvent(remoteUserID, eventID string) error {
return nil
}

func (c *client) GetEventsBetweenDates(_ string, start, end time.Time) ([]*remote.Event, error) {
return nil, errors.New("not implemented")
func (c *client) GetEventsBetweenDates(remoteUserID string, start, end time.Time) ([]*remote.Event, error) {
paramStr := getQueryParamStringForCalendarView(start, end)
res := &calendarViewResponse{}
err := c.rbuilder.Users().ID(remoteUserID).CalendarView().Request().JSONRequest(
c.ctx, http.MethodGet, paramStr, nil, res)
if err != nil {
return nil, errors.Wrap(err, "msgraph GetEventsBetweenDates")
}

return res.Value, nil
}

0 comments on commit b6b3a84

Please sign in to comment.