我正在使用 google-api-client gem 将 google 服务集成到我的 Rails 应用程序中。在 PubSub 的范围内,我可以在我的 a/c 中创建主题和订阅,但是在调用 watch() 方法时我遇到了问题。谁能给我通过如下服务对象调用 watch 方法的流程 https://developers.google.com/gmail/api/v1/reference/users/watch
以下是我获取服务对象的脚本
pubsub_service = Google::Apis::PubsubV1::PubsubService.new
pubsub_service.client_options.application_name = APPLICATION_NAME
pubsub_service.authorization = authorize