title: Is there a single API endpoint for Google Drive comments across multiple files?
body: <p>I'm building a small app that, among other things, displays a chronological feed of all of the comments and replies on files on their work Google Drive account. I'll later build some custom filters so that for example, users can see just the comments and replies in which they were @mentioned.</p>
  
  <p>Now, to get that data, there's a Google Drive API endpoint to get a <a href="https://developers.google.com/drive/api/v3/reference/files/list" rel="nofollow noreferrer">list of Drive files for a given user</a>, example:
  <code>GET https://www.googleapis.com/drive/v3/files?orderBy=modifiedTime%20desc&amp;pageSize=20&amp;fields=*</code></p>
  
  <p>There's also a Google Drive API endpoint to get <a href="https://developers.google.com/drive/api/v3/reference/comments/list" rel="nofollow noreferrer">a list of comments on a given file</a>. Example: <code>GET https://www.googleapis.com/drive/v3/files/fileId/comments</code>. Each comment has a <code>replies</code> property with an array of replies to that comment.</p>
  
  <p>Right now what I'm doing is:</p>
  
  <ul>
  <li>Getting the user's 20 most recently Google Drive files (first endpoint)</li>
  <li>For each of the 20 Drive files, getting the list of comments for that file (second endpoint), dumping it in a commentsAndReplies array.</li>
  <li>For each of the (usually 30-40+ total comments), run a forEach to get all of the replies per comment, dumping each reply into the commentsAndReplies array.</li>
  </ul>
  
  <p>This seems a bit excessive for a simple use case like mine. I've looked through the documentation and I couldn't find anything better for my use case - for example, I thought buried in the Google Drive individual file metadata may be a <code>comments</code> property so I only have to make one fetch call - but no such luck. </p>
  
  <p>Is there some Google Drive endpoint I'm missing to be more efficient, or some other way I could be more efficient? I'm going to try to incorporate some diff-type checks on reload so I don't have to make all these API requests every time the user reloads (I incorporated some batching using map and Promise.all to throttle my API requests but I'm still occasionally getting 403 API rate limit errors) but I feel like I may be missing something.</p>