javascript - Gmail API query to retrieve unread messages sent after given time -
i using gmail api programatically retrieve email messages (using javascript) are: 1. unread 2. sent after given time
i know query retrieving unread messages : 'is:unread' , query retrieving messages sent after particular date 'in:sent after : yyyy/mm/dd'
but how combine above 2 queries single query?
also, if there documentation queries searching messages supported gmail api, please share same - don't seem find it.
query = is:unread or (is:sent , after:<time_in_seconds_since_epoch>)
let's wanted unread or sent messages after fri, 04 jan 2013 07:00:00 gmt, write:
query = is:unread or (is:sent , after:1357282800) https://www.googleapis.com/gmail/v1/users/me/messages?q=is%3aunread+or+(is%3asent+and+after%3a1357282800)&key={your_api_key}
the query identical search bar in gmail client, can find in advanced search documentation works, though things (like seconds since epoch-query above) undocumented.
Comments
Post a Comment