Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google api Gmail:Ruby gem谷歌api客户端坏了?_Google Api_Rubygems_Gmail_Google Api Client - Fatal编程技术网

Google api Gmail:Ruby gem谷歌api客户端坏了?

Google api Gmail:Ruby gem谷歌api客户端坏了?,google-api,rubygems,gmail,google-api-client,Google Api,Rubygems,Gmail,Google Api Client,没有人遇到过这种情况 我可以得到email消息对象(Google::api::GmailV1::message),但其他消息属性只返回Nil。仅返回id,线程\ id SCOPE = Google::Apis::GmailV1::AUTH_GMAIL_MODIFY service = Google::Apis::GmailV1::GmailService.new service.client_options.application_name = APPLICATION_NAME service

没有人遇到过这种情况

我可以得到email消息对象(Google::api::GmailV1::message),但其他消息属性只返回Nil。仅返回id,线程\ id

SCOPE = Google::Apis::GmailV1::AUTH_GMAIL_MODIFY

service = Google::Apis::GmailV1::GmailService.new
service.client_options.application_name = APPLICATION_NAME
service.authorization = authorize

user_msgs = service.list_user_messages('me', 
    {:include_spam_trash => false, :label_ids => ['INBOX'], :q => "is:unread"})

user_msgs.messages.each do |msg|
   puts "CLASS: #{msg.class}"   # Google::Apis::GmailV1::Message
   puts "MESSAGE ID: #{msg.id}"  # WORKS I get the email ID
   msg_part = msg.payload
   puts "MSGPART: #{msg_part.class}" # NIL !!!, All other attributes are also NIL
end
因此,基本上我确实获得了具有正确ID的电子邮件,但仅此而已,GmailV1::Message类的所有方法或属性都是Nil。我还尝试了修改范围,得到了相同的结果

仅返回Nil的属性:
  • 内部日期标签ID有效载荷原始大小估计


    还注意到,在他们的文档中链接的github项目在某些网站上打开了一个404页面。

    可能是因为谷歌现在强制开发者首先审查公开可用的应用程序:(见蓝色框中带星星的通知)