Enabling advanced Drive API - lmmx/devnotes GitHub Wiki

From the official docs:

To use an advanced Google service, follow these instructions:

  • In the script editor, select Resources > Advanced Google services....
  • In the dialog that appears, click the on/off switch next to the service you want to use.
  • At the bottom of the dialog, click the link for the Google Developers Console.
  • In the new console, again click the on/off switch next to the service you want to use.
  • Return to the script editor and click OK in the dialog. The advanced service you enabled will now be available in autocomplete.
  • Drive will now be a shortcut to the otherwise HTTP-accessed Drive API
    • no fiddling with OAuth, just Drive.{autocomplete suggestions appear}

Getting comments (Drive.Comments.list) is now a case of:

var comments_list = Drive.Comments.list(document_id);