2011-07-19 9 views
2

現在、Google Appsカレンダーを作成しているアプリケーションがあり、そのカレンダーを一般公開できるようにする必要がありますデフォルトであると思われる組織)。Googleカレンダーの共有設定を「このカレンダーを公開する」ように設定する

私は現在、カレンダーを作成するために実行し、次のコードを持っている:

public CalendarEntry CreateCalendar(string title, string summary, string timezone, bool ispublic) 
{ 
    CalendarEntry calendar = new CalendarEntry(); 
    calendar.Title.Text = title; 
    calendar.Summary.Text = summary; 
    calendar.TimeZone = timezone; 


    Uri postUri = new Uri("https://www.google.com/calendar/feeds/default/owncalendars/full"); 
    CalendarEntry createdCalendar = (CalendarEntry) _calendarService.Insert(postUri, calendar); 

    return createdCalendar; 
} 

この方法で作成したすべてのカレンダーは、組織にのみ表示カレンダーを作成します。公開されるように設定するにはどうすればよいですか?

答えて

0

GoogleカレンダーAPIによれば、Access Control Lists (ACLs)はあなたのソリューションのように見えます。表示されているPATCHメソッドを試してみてください。

2
  AclRule aclRule = new AclRule() 
      { 
       Role = "owner", 
       Scope = new AclRule.ScopeData() 
       { 
        Type = "user", 
        Value = email.ToString() 
       } 
      }; 
      _service.Acl.Insert(aclRule, calendarId).Execute(); 
+1

説明を追加すると便利でした – RamPrakash

関連する問題