Google calendar api 如何检测google日历中的更改

Google calendar api 如何检测google日历中的更改,google-calendar-api,Google Calendar Api,当谷歌日历被修改后,您是否收到来自日历的任何信号 如果是,方法是什么?请帮帮我:) public IList CalendarLoad(string username=“”、string userid=“”、string userpassword=“”) { 添加(CalendarService.Scope.Calendar); 用户凭证; 使用(FileStream stream=newfilestream(“client_secrets.json”、FileMode.Open、FileAcc

当谷歌日历被修改后,您是否收到来自日历的任何信号

如果是,方法是什么?请帮帮我:)

public IList CalendarLoad(string username=“”、string userid=“”、string userpassword=“”)
{
添加(CalendarService.Scope.Calendar);
用户凭证;
使用(FileStream stream=newfilestream(“client_secrets.json”、FileMode.Open、FileAccess.Read))
{
凭证=GoogleWebAuthorizationBroker.AuthorizationAsync(
GoogleClientSecrets.Load(stream).Secrets,scopes,username,CancellationToken.None,
新的文件数据存储(“Calendar.VB.Sample”)。结果;
}

您可以在日历更改时接收更新,而不是定期轮询日历。

您的代码是否返回错误?
 public IList<Event> CalendarLoad(string username="", string userid="", string userpassword="")
    {
        scopes.Add(CalendarService.Scope.Calendar);
        UserCredential credential;
        using (FileStream stream = new FileStream("client_secrets.json", FileMode.Open, FileAccess.Read))
        {
            credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
                    GoogleClientSecrets.Load(stream).Secrets, scopes, username, CancellationToken.None,
                    new FileDataStore("Calendar.VB.Sample")).Result;
        }