캘린더에 새 일정이 만들어지면 Google 캘린더에서 내 시스템으로 푸시 알림을받는 데 성공했습니다. 푸시 알림은 POST 본문에 데이터가없는 및 POST 헤더는 다음과 같습니다 달력에서 생성 된 새로운 이벤트 세부 사항은Google 캘린더에서 일정 세부 정보를 얻는 방법
[Host] => xxxxxx.xxxx.com
[Content-Type] => application/json; charset=UTF-8
[Accept] => */*
[X-Goog-Channel-ID] => xxxxxxx-xxxxxxxx-8824-f0c2166878be
[X-Goog-Channel-Expiration] => Thu, 04 Dec 2014 04:27:13 GMT
[X-Goog-Resource-State] => exists
[X-Goog-Message-Number] => 11897215
[X-Goog-Resource-ID] => xxxxxxxxxx-xxxx-pSbC27qOUfg
[X-Goog-Resource-URI] => https://www.googleapis.com/calendar/v3/calendars/[email protected]/events?key=AIzaSyC_0nytiZWHfabrpWiExxxxxxxxxxx&alt=json
[Content-Length] => 0
[Connection] => Keep-alive
[Accept-Encoding] => gzip,deflate
[User-Agent] => APIs-Google; (+https://developers.google.com/webmasters/APIs-Google.html)
? 어떻게받을 수 있습니까?
온라인 어떤 정보와 구글 문서에 대한 정보는 없음 (시간 동안 검색 한) : 이벤트 세부 사항은 https://developers.google.com/google-apps/calendar/v3/push
?
UPDATE : 이것은 구글 캘린더 API에 내가 전송 채널 정보입니다
service = new Google_Service_Calendar($client);
$channel = new Google_Service_Calendar_Channel($client);
$uuid = gen_uuid();
$channel->setId($uuid);
$channel->setType('web_hook');
$channel->setExpiration('1919995862000');
global $sugar_config;
$address = $sugar_config['site_url'] . "/index.php?entryPoint=updateFromCal";
$channel->setAddress($address);
$watchEvent = $service->events->watch($bean->google_cal_id_c, $channel);
: 나는이 코드를 사용하여 내 캘린더에 시계를 설정
[address] => https://mydomainXXXX/index.php?entryPoint=updateFromCal
[expiration] => 1919995862000
[id] => xxxxxxxxxxxxxxx--4558-ac19-b82e0ca32206
[kind] =>
[params] =>
[payload] =>
[resourceId] =>
[resourceUri] =>
[token] =>
[type] => web_hook
[modelData:protected] => Array
(
)
[processed:protected] => Array
(
)
를 내가 응답에서 동일한 리소스 ID를 얻습니다. 새 이벤트는 캘린더에서 만듭니다. 방금 만든 이벤트의 이벤트 ID를 얻을 수없는 이유는 무엇입니까? 내가 뭘 잘못 했니? 이벤트 나 채널을보고 있습니까?
내가받는 응답은 여전히 위에서 언급 한 것과 동일하며 항상 동일한 리소스 ID를 사용합니다.
푸시 알림 자체에서 푸시 알림을 트리거 한 이벤트 세부 정보를 수신하기로되어 있습니까? 그렇지 않은 경우, 어떤 이벤트 변경으로 트리거되었는지 어떻게 알 수 있습니까? – Rodniko
@rodnika 불행히도 없습니다. 아래 내 대답을 참조하십시오. 즉, 변경된 이벤트를 얻으려면 동기화가 필요합니다. – FullStack
가능한 중복 http : // stackoverflow.co.kr/questions/18308751/google 관련 문의 - 푸시 알림/ – FullStack