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.
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'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.
what Tin Can API can do other than storing the state of the agent and how can we retrieve the publicly stored statements from Tin Can API
Thanks in advance
You can do a lot with the Tin Can API (Experience API). The point of the xAPI is to store user experiences, anything from I completed a course to I started watching a video. I've seen or worked on things as simple as using the xAPI to send SCORM tracking to an LRS, to support mobile, tracking sensor data from field exercises, to storing information collected in games and simulations. And the Experience API gives you the ability, like you said, to get data back out in a standard way, to support reporting and evaluation of data.
There are groups working with the Experience API to do interesting things. https://groups.google.com/a/adlnet.gov/forum/#!forum/xapi-design
There is also a spec working group forum where you can get more resources and answers: https://groups.google.com/a/adlnet.gov/forum/#!forum/xapi-spec
There are also resources and articles talking about what you can do with the Experience API. http://www.adlnet.gov/tla/experience-api/
and http://en.wikipedia.org/wiki/Tin_Can_API
There are some open source projects on ADL's GitHub page that also show how you can use the Experience API. https://github.com/adlnet
For sending and retrieving info from an LRS in web browsers there's a JavaScript library: https://github.com/adlnet/xAPIWrapper .. it's been built and minified..you can just include the xapiwrapper.min.js in your page and use the readme examples to get started.
For reporting and querying data you can look at the new project: https://github.com/adlnet/xAPI-Dashboard
There's a starting Java library to make talking to an LRS easier in Java, which could be used for regular Java apps or for Android apps: https://github.com/adlnet/jxapi
They're also starting a JQuery Mobile Plugin: https://github.com/adlnet/xapi-jqm
And even an example of using the Experience API with MedBiquitous and Common Core competencies to identify learner's progress toward becoming competent in some aspect: https://github.com/adlnet/xci
As for your question about getting statements from an LRS, you would just do a GET request to the statements endpoint. The spec currently says that requests must include the Experience API version header: https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md#62-api-versioning . And you will probably need to authenticate as a client using the LRS. This is generally done by registering on the LRS and getting some sort of credentials. This will vary based on the LRS you use, but they all have instructions on how to use and send the credentials. https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md#64-security
ADL's hosted example LRS opened up the GET statements endpoint so that people new to the Experience API could hit it and see statements without needing to figure out the request rules: https://lrs.adlnet.gov/xapi/statements
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
We're currently integrating Google Drive/Docs access in our mobile Apps and use the Google Document List API for this purpose. Are there any restrictions on the number of requests allowed for single API key?
I can't find any information in the Google API Console as the Document List API is not listed there. I can only activate the Google Drive API (which does not yet support functionalities we need).
The Documents List API does not use API keys in the same way as the newer APIs such as Drive. We (Google) do not give exact quota details for this API, but in general the value is extremely high. You may encounter 503 responses which indicate that you should perform exponential backoff. If, despite this, you are hitting an absolute ceiling, you should contact us and we will investigate, and look to increase your quota.