Google API를 사용하여 특정 Google 캘린더를 다른 사람과 공유 (사용자 추가 또는 삭제) 할 수 있습니까?Google 캘린더 API 공유 캘린더
나는 50 개 이상의 캘린더를 가지고 있으며 각각 데이터를 업데이트하는 사람이 다르므로 "업데이트 창"을 만들고 싶습니다. 월요일에만 이벤트를 업데이트 할 수 있습니다.
당신은 그 ACL에 대한 API 문서를 통해 이동하여Google API를 사용하여 특정 Google 캘린더를 다른 사람과 공유 (사용자 추가 또는 삭제) 할 수 있습니까?Google 캘린더 API 공유 캘린더
나는 50 개 이상의 캘린더를 가지고 있으며 각각 데이터를 업데이트하는 사람이 다르므로 "업데이트 창"을 만들고 싶습니다. 월요일에만 이벤트를 업데이트 할 수 있습니다.
당신은 그 ACL에 대한 API 문서를 통해 이동하여이 오래된 질문이다 그러나 여기 누군가가 그것을 사용하고자하는 경우 사용자와 일정을 공유하는 방법입니다 : 이입니다 이 :
을 돕고있다public function sharecalendarwithuser($calendar_id, $user_email, $role)
{
$rule = new Google_Service_Calendar_AclRule();
$scope = new Google_Service_Calendar_AclRuleScope();
/*
The type of the scope. Possible values are:
"default" - The public scope. This is the default value.
"user" - Limits the scope to a single user.
"group" - Limits the scope to a group.
"domain" - Limits the scope to a domain.
*/
$scope->setType("user");
$scope->setValue($user_email);
$rule->setScope($scope);
/*
The role assigned to the scope. Possible values are:
"none" - Provides no access.
"freeBusyReader" - Provides read access to free/busy information.
"reader" - Provides read access to the calendar. Private events will appear to users with reader access, but event details will be hidden.
"writer" - Provides read and write access to the calendar. Private events will appear to users with writer access, and event details will be visible.
"owner" - Provides ownership of the calendar. This role has all of the permissions of the writer role with the additional ability to see and manipulate ACLs.
*/
$rule->setRole($role);
$createdRule = $service->acl->insert($calendar_id, $rule);
}
희망 : ACL 여기 에 의해 수행되는 것은 PHP의 예입니다