Bulk-fetching emails in the new Gmail API

后端 未结 2 1361
深忆病人
深忆病人 2020-12-06 04:19

I\'m using the python version of the newly released Gmail API by Google.

The following call returns just a list of message ids:

service.users().messa         


        
2条回答
  •  Happy的楠姐
    2020-12-06 05:09

    Here is the solution that worked for me:

    batch = BatchHttpRequest()
    for msg_id in message_ids:
        batch.add(service.users().messages().get(userId='me', id=msg_id['id']), callback=mycallbackfunc)
    batch.execute()
    

提交回复
热议问题