0

Google 캘린더와의 인터페이스에 google-api-client-ruby gem을 사용하려고합니다.google-api-client-ruby calendar 사용 방법

이벤트를 볼 채널을 성공적으로 설정했지만 이벤트를 보지 못하도록 stop_channel 메소드를 사용하는 데 어려움을 겪고 있습니다. 이 채널 오브젝트를 같은

소스 코드는 보이지만, I는 채널 객체를 생성하고 stop_channel 방법에 전달하면, 내가 얻을 :

Error - Google::Apis::ClientError: required: Required

내 코드를 ..

channel = Google::Apis::CalendarV3::Channel.new(address: "https://www.google.com/", id: 1, type: "web_hook") 
begin 
    calendar_service.stop_channel(channel) 
rescue => error 
    puts error 
end 

내가 잘못했거나 보석이 작동하지 않습니까?

답변

1

오류 Google::Apis::ClientError: required: Required은 요청이 유효하지 않으며 수정하지 않고 재 시도하지 말아야 함을 의미합니다.

또한 stop_channel 방법을 사용하는이 sample code을 보았습니다.

def stop_channel(channel_id, resource_id) 
    channel = Google::Apis::CalendarV3::Channel.new(
     id: channel_id, 
     resource_id: resource_id 
    ) 
    service.stop_channel(channel) 
end