I'm building a Java application that involves Google Docs API. I'm using the old API (Google Docs API) because the new one is much more complicated, and I spent hours trying to make it work.
Anyway, I used the example attached to the API, and got it working, as I can get the list of files, download/upload/delete a file.
How can I get the available storage (remaining space in the cloud storage)?
The new Drive API v2 includes the amount of total storage and available storage in the About feed: https://developers.google.com/drive/v2/reference/about
Related
Google has rolled out a useful tool of compare docs.
https://9to5google.com/2019/06/11/google-docs-compare-documents/
I need to access through an API because I'm comparing many documents. I searched through the API reference but didn't find it. Did i just miss it or is it not available?
Answer:
This feature is not available via the Docs API.
More Information
Fundamentally, the Google Docs API lets you create and modify documents.
From the documentation:
The API allows you to do tasks such as the following:
Automate processes
Create documentation in bulk
Generate invoices or contracts
It is not an API which has methods that directly replicate the methods available in the user interface.
Workaround:
The Revisions resource of the Drive API might be an approximate solution for you, as it allows revisions of documents to be accessed and downloaded via export links.
As Google Documents have some level of version control implementation, it might be possible to use this to make document comparisons. Unfortunately however, there is no direct way of comparing changes, and as per a recent Issue Tracker case it seems that due to the zip nature of .docx files, not even exporting and comparing MD5s can be a direct solution for this.
Feature Request:
You can however let Google know that this is a feature that is important for the Docs or Drive API and that you would like to request they implement it. You can use the aforelinked Google's Issue Tracker to report issues and make feature requests for their development services.
The page to file a Feature Request for the Google Docs API is here and the Google Drive API is here
References:
Introduction | Google Docs API | Google Developers
Revisions | Google Drive API | Google Developers
Issue Tracker Links:
Google Docs export returns non-stable (i.e. different) bytes content for each ex
Docs API Feature Request | New Issue - Issue Tracker
Drive API Feature Request | New Issue - Issue Tracker
I am new to Google Cloud Platforms and not quite sure with the whole architecture but what I am trying to achieve is to save some data to Google Cloud from an iOS application and do some analytics work on this data using Google Cloud Products, such as: Dataproc and Datalab. From what I read so far I would need to create a dataset in Google Cloud BigQuery and create a table in it. I have done this using the Google Cloud Web UI but now I want to populate the table from my iOS app. I can't seem to find how to do that.
The most painless route would be to wire up Firebase Analytics and then turn on its daily log export to Big Query, as described by Google in the walkthrough Importing Firebase Analytics Data into BigQuery. Google maintains the entire analytic export stack for you then, seeing as they also maintain Firebase. The downside is that the analytics export happens only daily.
Alternatively, you'd be looking at using the Big Query REST API to upload data, as documented by Google in their Loading Data with a POST Request how-to guide. The iOS tooling for that would be your usual NSURLSession and NSURLDataTask APIs, or whatever abstraction you prefer that's built atop them.
Google does maintain a collection of iOS-native APIs, but unfortunately, Big Query is not included amongst the supported APIs as of May 2017. There are native Big Query clients for Go, C#, and Java, amongst others. So you could use your own API for upload to a server you control, and then use one of those client APIs serverside to implement the actual Big Query integration, if you wished.
I'm attempting to use Google Sheets as a back-end for an iOS app. The spreadsheets in question are private, so will require Oauth 2.0 for interactions.
So far I have come across three different ways to access spreadsheet data, but I'm not sure which one is the right one.
GData library
Google API Client
Google Apps Script
Has anyone here found success with any of these options, and if so how?
Rather than any of the options you've listed, you should be looking at the
Apps Script Execution API, which is a supported component of the Google Apps Script environment. It was introduced just over a month ago, in response to the growing demand for ubiquitous access to Google Apps.
As for the "how" - the Quick Start should get you started.
I'm still new to GAE, and I would like to have more wisdom about couple of things.
I searched in documentation, but I think I'm just too stupid to understand some things from documentation.
How can I combine Google Cloud SQL with endpoints? Is there such possibility?
How can I use endpoints to upload videos to google platform?
You should be able to use anything you can do on a non cloud endpoints api to cloud endpoints like google cloud sql. But since it's on preview you might encounter bugs/changes when it goes out of preview. You should create a Cloud SQL tests models on regular app engine app then try to use it on cloud endpoints, so you can minimize debugging for errors.
https://developers.google.com/appengine/docs/python/cloud-sql/
You will need to use a blobstore api:
https://developers.google.com/appengine/docs/python/blobstore/
on your endpoints have a method that creates the upload url and use that to upload from your app then on the uploadHandler it will trigger once the whole file has been uploaded, process your blobInfo key store it appropriately.
I've recently migrated our webapp from GDocs to GDrive and I've noticed that even the files.list call takes about 3x longer (~2.5 seconds) than the corresponding Docs call.
This doesn't seem to depend on the size of the response (in fact Docs' XML is larger than Drive's JSON in my test). I've also experienced the same behaviour when doing simple requests via Google's OAuth Playground, so I'd rule out any local connectivity or library issues.
Is there any way to speed up the API calls?
Check the Google Drive SDK documentation for performance tips:
https://developers.google.com/drive/performance
Tips include using gzip and partial response/update.