jeremyephron / simplegmail

A simple Gmail API client for applications in Python
MIT License
336 stars 73 forks source link

Add thread mode #66

Open rasa opened 2 years ago

rasa commented 2 years ago

This works:


#!/usr/bin/env python3

from simplegmail import Gmail

gmail = Gmail()

messages = gmail.get_messages(query='wxyz')
print("Found %d messages" % len(messages)) # returns 3 (only messages found in the search)

gmail.mode = gmail.THREAD_MODE
messages = gmail.get_messages(query='wxyz')
print("Found %d messages" % len(messages)) # returns 14 (all messages in the threads found from the search)