Getting “Show me” Available/busy value in Google (Calendar Events) .Net API

后端 未结 2 881
迷失自我
迷失自我 2021-01-20 00:39

Does anyone know how do get the \"show me\" value using Google .NET API? I know how to get mosts of the EventEntry details I just cant get this one out.

it is the on

相关标签:
2条回答
  • 2021-01-20 01:27

    I created an extension method that handles this:

    /// <summary>
    /// Determines whether or not the EventEntry is set as Busy.
    /// </summary>
    /// <param name="entry">The Google EventEntry.</param>
    public static bool IsBusy(this EventEntry entry)
    {
        return entry.EventTransparency.Value.Equals("http://schemas.google.com/g/2005#event.opaque");
    }
    

    Usage:

    EventEntry eventEntry = ... 
    bool isBusy = eventEntry.IsBusy();
    
    0 讨论(0)
  • 2021-01-20 01:28

    I did a direct request to the calendar atom feed after changing that value for an event to see what element changed in the event xml and it looks like it is the Transparency element. Looking at the source for the .net google data api client library shows that it is accessible through the EventEntry.EventTransparency property.

    0 讨论(0)
提交回复
热议问题