How to get comments from Google Docs using the Google API - google-docs-api

I want to get comments from Google Docs using the Google Drive API.
Does anyone know if the Google Drive API (or other Google Apps Application APIs) supports retrieve commenting?
Thanks.

Comments are included for documents via download as text (using the DocumentsList API), although it may be difficult to distinguish comments from the regular text.
Comments for spreadsheets are included when the item is downloaded as html (again, using the DocumentsList API), but not included when downloaded in other formats.
Comments for presentations, drawings, and non-Google types are not readily available.

Comments are not available via the API yet, but this is a common feature request that we are already evaluating. Stay tuned for updates soon.

Related

Google Docs Viewer

is free or commercial Google Docs Viewer?
google Viewer API: https://docs.google.com/viewer
my example file: https://dornsife.usc.edu/assets/sites/298/docs/ir211wk12sample.xls
together
<iframe src="https://docs.google.com/viewer?url=https://dornsife.usc.edu/assets/sites/298/docs/ir211wk12sample.xls" title="preview my file on nav "></iframe>
Does it have documentation?
could like to use in my web app but I need documentation or price or limited use?
The only API from Google which interacts with a file in your Drive is Google Drive API and sadly, there is no such thing as Docs Viewer API.
In fact, the "Docs Viewer" is merely a URL which allows you to preview a document while passing the link of a file to it.
I have taken the opportunity to report this on Google's Issue Tracker here and I suggest you star it as any updates regarding this will be posted there.

API for Creating/Editing Google Slides

Does Google offer a REST or Javascript API for creating and editing slides? I've been able to figure out how to interact with sheets and most of the other services offered as part of Docs/Drive, but haven't had any luck with Slides.
If there is no API, I'd be willing to create files directly myself, but I haven't been able to find any documentation on a Slides file format.
The Google Slides API was launched on 11/9/2016. It provides the ability to read, create, and edit Google Slides presentations.
I was looking into this too. Looks like it's been a requested feature since at least 2012, follow Issue Tracker Link
Right now the best I know of is to automate making a powerpoint file (e.g. use this library for python) and then upload it to google drive where it will autoconvert. Obviously there are many limitations to this strategy, but in a quick test it worked fine for something simple.
I would also love if Google provided an API that allows making slides like the various API calls for microsoft office.

Is it possible to read a Google Spreadsheet from (server-VM-run) Dart code?

I'd like to read data from a Google Drive Spreadsheet in Dart code (running as a console app in the VM, not in the browser). I'm somewhat confused by the names of the API; Sheets is part of Google Drive, but all the Google Drive API docs I can find relate to integrating the UI of Drive into your app.
There's also this question on SO, but it's over 2 years so I'm hoping that it's no longer correct, and there is an API.
I found this Dart Google API library, but it says:
THIS LIBRARY IS DEPRECATED
Please use the Google API Dart libraries in http://pub.dartlang.org, the Dart package manager
Search for 'google' or the API of your choice. For example:
http://pub.dartlang.org/packages/google_drive_v2_api
However I'm struggling to find which package I'm supposed to use. The Drive API one doesn't have a lot of info, and there doesn't appear to be one with "Sheets" or "Docs" in the name.
You need to use the Spreadsheet API https://developers.google.com/google-apps/spreadsheets/.
There isn't a Dart lib for it, but it's a well formed REST API so very easy to program against.
Sheets is not exactly part of Google Drive, it is part of the Google Docs productivity suite that is stored in Google Drive. Google Drive is the general cloud storage layer. The Drive API is for interacting with files of all types that are stored in Drive. You can interact with Sheets files using that API to modify metadata or import or export to/from other formats like csvs. That is possible to do from Dart (I'm not sure if there is a Dart-specific client library, but this API is just rest calls so its always possible.)
If you want to interact with a Sheet at a lower level to do things like modify a single cell, you can use AppScript, however that cannot be done from Dart.
Usually for Google APIs support generators that create access libraries for every language.
For example https://pub.dartlang.org/packages/google_drive_v2_api.
You can generate them yourself (also for your own endpoints) using https://pub.dartlang.org/packages/discovery_api_client_generator but for most APIs there are packages already in pub.dartlang.org.

When to Call Something "Docs" and When to Call it "Drive"

So, a quick background. I make productivity apps (specifically CRM and Project Management). And I love the docs, spreadsheet and presentation products made by Google. Not surprisingly, my products have done a lot of "things" with Google Docs for a long time:
Create "native" (ie. Docs/Spreadsheets/Presentations) documents
Use native documents as templates
Link and modify permissions of any file in Docs/Drive
Upload any arbitrary file
etc.
What I'm confused about is what does Google want me to do on the labels on the buttons in my app. Right now, they all say "Google Docs". You're linking any arbitrary file to a presentation, you're linking it from "Google Docs". You're exporting a spreadsheet of time sheet entries, you're exporting it to "Google Docs". You upload a PDF, you uploaded it to Google Docs. Etc.
What I'm confused about is that, and correct me if I'm wrong, but I don't think it is a complete switch over to "Drive." I still see labels on the Google site for Google Docs. So, this is what I think the breakdown is:
If it is a Google "native" file, then it is Docs, else it is Drive. Thus, if your uploading any arbitrary file, that button should refer to drive. But if you are exporting a spreadsheet of data to the Google Spreadsheets format, then that is Docs.
Is this right at all? Does Google have some information somewhere?
Disclaimer: personal opinion
I would use Drive everywhere, except when specifically talking about the collaborative word processor provided in Google Drive, that is the Google Doc.
I would also make sure that all my integrations use the new Google Drive API.
There is reasonably good guidance here: https://developers.google.com/drive/branding
Google Docs and Google Drive are two seperate products from Google. They can work together, but they are still their own individual products and should be called their respective names when being used

Integrating Google Docs API

I'm just beginning with programming, but i wanted to know if it's possible to use google docs api to make documents on another site using the google docs text editor?
Is there some sort of way i can put the google docs text editor onto a website so that we can use that for document creation instead of tiny mce?
Basically the functionality needed would be documents created, openly shared, a postable version of it (take html code) -- so it can go on the document display page, and
Of course there would be google login and everything, but i just wanted to see if this would work.
No, that is not possible, sorry.

Resources