问题描述
参考,我已经制作了一个获取信息的应用程序从谷歌日历事件使用谷歌API。我使用了上面URL中给出的相同代码。
现在有一个包含ME和XYZ两个日历名称的日历。如果我使用我的电子邮件ID,那么我只会收到Calendar =ME事件的详细信息。
我已经在下面的代码中使用了
EventsResource.ListRequest request = service.Events.List(primary);
request.TimeMin = dtStart;
request.TimeMax = dtEnd;
request.ShowDeleted = false;
request.SingleEvents = true;
request.OrderBy = EventsResource.ListRequest.OrderByEnum.StartTime;
Events events = request.Execute();
如何获取所有事件详情?
返回指定日历上的活动。
HTTP请求
获取
您可以从文档中看到Events.list返回A日历的事件。如果您有多个日历,那么您还需要为该日历请求事件。
提示:您可能需要查看
这将返回用户有权访问的日历列表,然后您可以循环查看每个日历上的事件。
With reference of this I have made a application which gets information from google calendar event using google api. I have used the same code given in above URL.
Now there is one calendar with 2 calendar name like ME and XYZ. If I use my email Id then I only got the details of event with Calendar = "ME".I have used below code
EventsResource.ListRequest request = service.Events.List("primary");
request.TimeMin = dtStart;
request.TimeMax = dtEnd;
request.ShowDeleted = false;
request.SingleEvents = true;
request.OrderBy = EventsResource.ListRequest.OrderByEnum.StartTime;
Events events = request.Execute();
How to get all the events details?
As you can see from the documentation Events.list returns the events for A calendar. If you have more then one calendar then you will need to request the events for that calendar as well.
Tip: You might want to look at
This will return a list of the calendars the user has access to then you can loop though the events on each one of them.
这篇关于如何使用谷歌日历API从谷歌日历中获取所有事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!