在过去的几天里,我试图从Google-calendar的一个事件中读取属性
所以目前我只想从我的日程表中获取事件ID。
代码:
using System;
using Google.GData.Extensions;
using Google.GData.Calendar;
namespace ConsoleApplication1
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
EventQuery query = new EventQuery();
query.Uri = new Uri("https://www.google.com/calendar/feeds/my@e-mail.com/public/basic");
query.NumberToRetrieve = 10;
query.StartTime = System.DateTime.Now;
query.EndTime = System.DateTime.Today.AddDays(10);
CalendarService service = new CalendarService(appName);
service.setUserCredentials(userName, password);
EventFeed calFeed = service.Query(query);
foreach (EventEntry feedEntry in calFeed.Entries)
{
Console.WriteLine("Event ID: " + feedEntry.EventId);
Console.ReadLine();
}
}
}
}我试着用feedEntry.Title.Text获取标题..。但它总是“忙碌”
所以我的问题是:
如何从我的活动中获取信息?
发布于 2014-08-19 21:21:02
答案是:
query.Uri = new Uri("https://www.google.com/calendar/feeds/my@e-mail.com/public/basic");必须是:
query.Uri = new Uri("https://www.google.com/calendar/feeds/my@e-mail.com/private/full");发布于 2014-08-23 17:04:27
您应该完全放弃这种方法。Gdata是一个过时的Calendar API,将在11月关闭:http://googleappsdeveloper.blogspot.co.at/2014/07/upgrade-now-to-calendar-apiv3.html
在日历应用编程接口v3 https://developers.google.com/google-apps/calendar/中使用Events.List
https://stackoverflow.com/questions/25378824
复制相似问题