Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/algorithm/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 是否有可能开发一个asp.Net应用程序,在谷歌日历上创建事件?_C#_.net_Asp.net_Api_Google Calendar Api - Fatal编程技术网

C# 是否有可能开发一个asp.Net应用程序,在谷歌日历上创建事件?

C# 是否有可能开发一个asp.Net应用程序,在谷歌日历上创建事件?,c#,.net,asp.net,api,google-calendar-api,C#,.net,Asp.net,Api,Google Calendar Api,我正在从事一个人事asp.Net项目,该项目有一些基于日历的事件。我想的是,如果我能将这些事件同步到用户的谷歌日历上 是否可以创建一个在谷歌日历上创建事件的应用程序?是否有一种用于此的API?如果有,我会有一些限制吗?有一种用于此的API。我想你要找的是: EventEntry entry = new EventEntry(); // Set the title and content of the entry. entry.Title.Text = "Tennis with Beth"; e

我正在从事一个人事asp.Net项目,该项目有一些基于日历的事件。我想的是,如果我能将这些事件同步到用户的谷歌日历上


是否可以创建一个在谷歌日历上创建事件的应用程序?是否有一种用于此的API?如果有,我会有一些限制吗?

有一种用于此的API。我想你要找的是:

EventEntry entry = new EventEntry();

// Set the title and content of the entry.
entry.Title.Text = "Tennis with Beth";
entry.Content.Content = "Meet for a quick lesson.";

// Set a location for the event.
Where eventLocation = new Where();
eventLocation.ValueString = "South Tennis Courts";
entry.Locations.Add(eventLocation);

When eventTime = new When(DateTime.Now, DateTime.Now.AddHours(2));
entry.Times.Add(eventTime);

Uri postUri = new Uri("https://www.google.com/calendar/feeds/default/private/full");

// Send the request and receive the response:
AtomEntry insertedEntry = service.Insert(postUri, entry);

如果您将要更新的日历设置为公共日历,或者您邀请了其他人,那么他们可以订阅您的日历,并且您所做的任何更新都将显示在他们的日历上

检查此URL:在该URL上,您可以获得实际代码