Is there a single API endpoint for Google Drive comments across multiple files?GET/POST requests Google Drive APIDeleting a Google Drive file using JS clientUploading a new file revision using Google Drive ApiTransfer file ownership with google drive APIMake calls to Drive API inside of a Google App Engine Cloud EndpointsSorting a list of files by modifiedTime (Google Drive API)Google Drive Rest Api Files export limitationGoogle drive api Export-complete syntaxGoogle Drive API: No Parents with drive.files.getHow to use google drive file list api with drive API Key without oAuth2.0?

Vibration on the guitar when playing two strings

List: Behavioural characteristics of key Ito processes used in finance

…down the primrose path

How many years before enough atoms of your body are replaced to survive the sudden disappearance of the original body’s atoms?

Why should I "believe in" weak solutions to PDEs?

What date did Henry Morgan capture his most famous flagship, the "Satisfaction"?

What are the function of EM and EN spaces?

Writing computer program code for free in an interview?

Traveling from Germany to other countries by train?

Is there a way to improve my grade after graduation?

Why does putting a dot after the URL remove login information?

In MTG, was there ever a five-color deck that worked well?

Ancients don't give a full level?

Write The Shortest Program To Check If A Binary Tree Is Balanced

Why do proponents of guns oppose gun competency tests?

Ubuntu show wrong disk sizes, how to solve it?

Based on what criteria do you add/not add icons to labels within a toolbar?

What's going on with an item that starts with an hbox?

Generate a random point outside a given rectangle within a map

How and where to get you research work assessed for PhD?

What is the corner house number?

Why is the Vasa Museum in Stockholm so Popular?

Premier League simulation

What is an air conditioner compressor hard start kit and how does it work?



Is there a single API endpoint for Google Drive comments across multiple files?


GET/POST requests Google Drive APIDeleting a Google Drive file using JS clientUploading a new file revision using Google Drive ApiTransfer file ownership with google drive APIMake calls to Drive API inside of a Google App Engine Cloud EndpointsSorting a list of files by modifiedTime (Google Drive API)Google Drive Rest Api Files export limitationGoogle drive api Export-complete syntaxGoogle Drive API: No Parents with drive.files.getHow to use google drive file list api with drive API Key without oAuth2.0?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















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.



Now, to get that data, there's a Google Drive API endpoint to get a list of Drive files for a given user, example:
GET https://www.googleapis.com/drive/v3/files?orderBy=modifiedTime%20desc&pageSize=20&fields=*



There's also a Google Drive API endpoint to get a list of comments on a given file. Example: GET https://www.googleapis.com/drive/v3/files/fileId/comments. Each comment has a replies property with an array of replies to that comment.



Right now what I'm doing is:



  • Getting the user's 20 most recently Google Drive files (first endpoint)

  • For each of the 20 Drive files, getting the list of comments for that file (second endpoint), dumping it in a commentsAndReplies array.

  • 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.

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 comments property so I only have to make one fetch call - but no such luck.



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.










share|improve this question






























    0















    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.



    Now, to get that data, there's a Google Drive API endpoint to get a list of Drive files for a given user, example:
    GET https://www.googleapis.com/drive/v3/files?orderBy=modifiedTime%20desc&pageSize=20&fields=*



    There's also a Google Drive API endpoint to get a list of comments on a given file. Example: GET https://www.googleapis.com/drive/v3/files/fileId/comments. Each comment has a replies property with an array of replies to that comment.



    Right now what I'm doing is:



    • Getting the user's 20 most recently Google Drive files (first endpoint)

    • For each of the 20 Drive files, getting the list of comments for that file (second endpoint), dumping it in a commentsAndReplies array.

    • 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.

    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 comments property so I only have to make one fetch call - but no such luck.



    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.










    share|improve this question


























      0












      0








      0








      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.



      Now, to get that data, there's a Google Drive API endpoint to get a list of Drive files for a given user, example:
      GET https://www.googleapis.com/drive/v3/files?orderBy=modifiedTime%20desc&pageSize=20&fields=*



      There's also a Google Drive API endpoint to get a list of comments on a given file. Example: GET https://www.googleapis.com/drive/v3/files/fileId/comments. Each comment has a replies property with an array of replies to that comment.



      Right now what I'm doing is:



      • Getting the user's 20 most recently Google Drive files (first endpoint)

      • For each of the 20 Drive files, getting the list of comments for that file (second endpoint), dumping it in a commentsAndReplies array.

      • 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.

      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 comments property so I only have to make one fetch call - but no such luck.



      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.










      share|improve this question














      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.



      Now, to get that data, there's a Google Drive API endpoint to get a list of Drive files for a given user, example:
      GET https://www.googleapis.com/drive/v3/files?orderBy=modifiedTime%20desc&pageSize=20&fields=*



      There's also a Google Drive API endpoint to get a list of comments on a given file. Example: GET https://www.googleapis.com/drive/v3/files/fileId/comments. Each comment has a replies property with an array of replies to that comment.



      Right now what I'm doing is:



      • Getting the user's 20 most recently Google Drive files (first endpoint)

      • For each of the 20 Drive files, getting the list of comments for that file (second endpoint), dumping it in a commentsAndReplies array.

      • 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.

      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 comments property so I only have to make one fetch call - but no such luck.



      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.







      javascript google-drive-api






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 27 at 3:50









      StephenStephen

      157 bronze badges




      157 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          1















          Is there a single API endpoint for Google Drive comments across multiple files?




          No there is not. Most of Google drive is file based that being all interactions must include the file which you would like to see the data on.



          For example file.comments



          https://www.googleapis.com/drive/v3/files/**fileId**/comments


          In order to see the comments on a file you must send the API the file you wish to see the comments on.






          share|improve this answer
























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55369518%2fis-there-a-single-api-endpoint-for-google-drive-comments-across-multiple-files%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1















            Is there a single API endpoint for Google Drive comments across multiple files?




            No there is not. Most of Google drive is file based that being all interactions must include the file which you would like to see the data on.



            For example file.comments



            https://www.googleapis.com/drive/v3/files/**fileId**/comments


            In order to see the comments on a file you must send the API the file you wish to see the comments on.






            share|improve this answer





























              1















              Is there a single API endpoint for Google Drive comments across multiple files?




              No there is not. Most of Google drive is file based that being all interactions must include the file which you would like to see the data on.



              For example file.comments



              https://www.googleapis.com/drive/v3/files/**fileId**/comments


              In order to see the comments on a file you must send the API the file you wish to see the comments on.






              share|improve this answer



























                1












                1








                1








                Is there a single API endpoint for Google Drive comments across multiple files?




                No there is not. Most of Google drive is file based that being all interactions must include the file which you would like to see the data on.



                For example file.comments



                https://www.googleapis.com/drive/v3/files/**fileId**/comments


                In order to see the comments on a file you must send the API the file you wish to see the comments on.






                share|improve this answer














                Is there a single API endpoint for Google Drive comments across multiple files?




                No there is not. Most of Google drive is file based that being all interactions must include the file which you would like to see the data on.



                For example file.comments



                https://www.googleapis.com/drive/v3/files/**fileId**/comments


                In order to see the comments on a file you must send the API the file you wish to see the comments on.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 27 at 7:58









                DaImToDaImTo

                50k12 gold badges80 silver badges267 bronze badges




                50k12 gold badges80 silver badges267 bronze badges





















                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55369518%2fis-there-a-single-api-endpoint-for-google-drive-comments-across-multiple-files%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                    Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript