Ruby on rails 如何在Ruby on Rails中使用pubsub服务对象调用watch()
我正在使用GoogleAPI客户端gem将google服务集成到我的Rails应用程序中。在PubSub的范围内,我可以在我的a/c中创建主题和订阅,但在调用watch()方法时遇到了问题。有人能告诉我通过如下服务对象调用watch方法的流程吗 以下是获取服务对象的脚本Ruby on rails 如何在Ruby on Rails中使用pubsub服务对象调用watch(),ruby-on-rails,ruby,gmail-api,google-cloud-pubsub,Ruby On Rails,Ruby,Gmail Api,Google Cloud Pubsub,我正在使用GoogleAPI客户端gem将google服务集成到我的Rails应用程序中。在PubSub的范围内,我可以在我的a/c中创建主题和订阅,但在调用watch()方法时遇到了问题。有人能告诉我通过如下服务对象调用watch方法的流程吗 以下是获取服务对象的脚本 pubsub_service = Google::Apis::PubsubV1::PubsubService.new pubsub_service.client_options.application_name = APPLI
pubsub_service = Google::Apis::PubsubV1::PubsubService.new
pubsub_service.client_options.application_name = APPLICATION_NAME
pubsub_service.authorization = authorize
您需要将主题的发布权限授予服务帐户gmail api-push@system.gserviceaccount.com. 有关如何执行此操作,请参阅: