Unable to search for specific coloured star (superstars) using Advanced Search in Gmail API.

£可爱£侵袭症+ 提交于 2019-11-30 07:41:17

问题


This is what we used. https://developers.google.com/gmail/api/v1/reference/users/messages/list

In order to GET emails with a red star, this is what we requested.

GET https://www.googleapis.com/gmail/v1/users/me/messages?q=has%3Ared-star&key={YOUR_API_KEY}

The result was 0. Other criteria such as is:starred, has:attachment worked just as expected, are we doing something wrong?


回答1:


You cannot use the names of the flags in the Gmail API. You have to use the following codes:

has:yellow-star <=> l:^ss_sy
has:blue-star <=> l:^ss_sb 
has:red-star <=> l:^ss_sr 
has:orange-star <=> l:^ss_so
has:green-star <=> l:^ss_sg
has:purple-star <=> l:^ss_sp
has:red-bang <=> l:^ss_cr
has:yellow-bang <=> l:^ss_cy
has:blue-info <=> l:^ss_cb
has:orange-guillemet <=> l:^ss_co
has:green-check <=> l:^ss_cg
has:purple-question <=> l:^ss_cp

Source: http://googlesystem.blogspot.se/2008/07/gmail-superstars.html



来源:https://stackoverflow.com/questions/31157723/unable-to-search-for-specific-coloured-star-superstars-using-advanced-search-i

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!