2016-10-20 2 views
2

"시계"요청을 사용하여 이메일을 게시/보조 API에 연결하고 있습니다. 그러나 아래의 코드 (Google에서 제공)를 사용하여 알림을 중지하려고하면 작동하지 않습니다. 나는 파이썬 클라이언트를 사용하고있다.Gmail 푸시 알림이 중지되지 않습니다.

credentials = get_credentials() 
http = credentials.authorize(httplib2.Http()) 
service = discovery.build('gmail', 'v1', http=http) 
result = service.users().stop(userId='me') 

내 참조 :

https://developers.google.com/gmail/api/guides/push

+1

https://developers.google.com/apis-explorer/#p/gmail/v1/gmail.users.labels.list이 질문을 주셔서 감사합니다이 페이지에 여기에 버튼을 실행 대응을 실행이었다 남아. 매우 도움이되었습니다. – HarshaXsoad

답변

5
result = service.users().stop(userId='me').execute() 

당신은 당신이 방법을 실행 호출하지 않는 한, 당신의 문은 아무것도 할 때까지, 방법을 실행 잊어 버렸습니다.

다음은 Google apis로 작업하는 방법에 대한 작은 안내서입니다. service.users().labels().list(userId='me').execute() 다음 구글 API Explorer에 가서 서비스의 Gmail에서 API는이

gmail.users.labels처럼, 거기에 당신이 서비스에 대한 설명을 볼 수 https://developers.google.com/apis-explorer/#p/gmail/v1/를 사용하려면 가정 해 봅시다 선택 https://developers.google.com/gmail/api/quickstart/python로 이동하여 코드를 관찰 .list 여기

Gmail은 서비스 객체는 파이썬 코드에서, 그리고 방법,

관련 문제