Questions tagged [google-drive-realtime-api]

As of November 2017 Google deprecated the Realtime API, and it is unavailable for new projects. It will stop working on December 11th 2018. It provided collaboration as a service for files in Google Drive via the use of operational transforms. The API was a JavaScript library hosted by Google that provided collaborative objects, events, and methods for creating collaborative applications.

The Realtime API lets you, the developer, design a shared data model that looks just like a local, in-memory data model. You write code to manipulate maps, lists, and your own custom JavaScript data model objects. When your code makes a change to the data model on behalf of some user, the data model automatically changes for all the users on the document.

These collaborative data model objects work just like local in-memory data model objects, with one exception. Unlike a local JavaScript data model, a collaborative Realtime API data model may change as a result of edits that were made by someone other than the current user. As a result, applications need to attach listeners to a collaborative document so that the UI may be updated to reflect remote changes.

The Realtime API is based on the same collaboration technology used by Google Docs. Whenever a collaborative data model is modified, the change is applied immediately to the local, in-memory copy of the document. The API then silently sends a representation of the change to the server (called a "mutation") so that the change can be recorded in the document and communicated to other collaborators. The mutations have been carefully designed so that conflicts between collaborators can always be automatically resolved, so users will never have to see a message about edit conflicts.

Realtime data models are "eventually consistent." That means that if all collaborators stop editing, eventually everyone will see the same data model. However, we make no guarantees about when all the collaborators will see the changes or what order the changes will be delivered in.

See https://developers.google.com/drive/realtime

520 questions
1
vote
2 answers

Google Realtime undocumented feature: 'toJson'?

There is a method 'toJson' on the Google Realtime model object, as returned from Document.getModel() doc.getModel().toJson() Seems to take two parameters, but there is no documentation available from Google developers or elsewhere. How should it be…
HeyHeyJC
  • 2,627
  • 1
  • 18
  • 27
1
vote
1 answer

Google Drive Realtime API callbacks in .NET?

Trying to implement a collaborative model using the google drive realtime API for .NET on an existing C# / VB.NET project. Google's .NET Drive sample is working just fine, but I can't find any way to receive a callback or event notifying me of…
HeyHeyJC
  • 2,627
  • 1
  • 18
  • 27
1
vote
1 answer

Drive SDK not listing all my files

I am trying to list all the files in my drive (about 10) but the following will only list 1 (and that isn't even a real file of mine).... the code: from httplib2 import Http from oauth2client.client import…
1
vote
1 answer

Google Drive Api - Document without authorization

I am building an app where two different users will edit the same document online, using only plain text. For this I am using the google-api-php-client-master hosted on github. There are some examples, but I don't understand what I need to do to…
1
vote
1 answer

Google Drive Realtime item instanceof gapi.drive.realtime.CollaborativeList errors

For about 6 months we have been using without fail item instanceof gapi.drive.realtime.CollaborativeList to detect if a property was a CollaborativeList. This started failing last week and we checked gapi.drive.realtime and it does not appear that…
sdolphin
  • 138
  • 1
  • 6
1
vote
0 answers

Syncing an excel sheet from a PC to Google Drive every minute

I'm working on a real time energy monitoring project. I have a program written in Visual Basic which fetches readings from the energy meters and logs the readings in an excel sheet every minute. I want to sync this file to Google Drive every…
Vishwas Pawar
  • 183
  • 2
  • 16
1
vote
0 answers

Get the parent folder of a file

I'm using CreateFileActivityBuilder() to create a file. I want to create a second file in the same directory of the first file (without using CreateFileActivityBuilder()). How can I get the parent folder of a file if I have the DriveId of the file?
1
vote
2 answers

Handling DocumentClosedError for Google Drive Realtime JS app

Google Drive Realtime API has a nice set of errorTypes that you can listen for, so you can handle each case individually: https://developers.google.com/drive/realtime/reference/gapi.drive.realtime.ErrorType Unfortunately, this list doesn't include…
1
vote
2 answers

Unable to upload a file to Google Drive

I want to be able to upload a file inside my hard disk to Google Drive using program as follows: from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive gauth = GoogleAuth() drive = GoogleDrive(gauth) this_file =…
1
vote
2 answers

Google Drive API returning 403 when trying to download file - no information about error given

So, I have a ruby on rails project, I'm using the google-api gem and I'm trying to download a file from an account that I previously gave permission to my project to access and manage my google drive files. I have the refresh token and the access…
1
vote
0 answers

Google Drive SDK auth - Recovering from incorrect account selection

I am using using gapi.auth.authorize to authenticate someone before viewing a document. If they login with the wrong account, I will get a file not found error from the Drive API. When I catch this error, I want to log them out and force them to…
Venkat D.
  • 2,979
  • 35
  • 42
1
vote
1 answer

Google Drive OAuth Playground: Realtime Get API - Invalid Value Error

I trying to use the Google OAuth 2.0 playground to query for realtime updates on a Google Docs File ID. For every request using either the get or update Realtime api calls I receive an error and have tried sending in numerous file ids. Do you have…
1
vote
2 answers

Sharing Google Drive Realtime Documents

I have created a realtime document on Google Drive. When I attempt to share this file with someone who doesn't have my app installed, the file shares successfully, but when they click the file it says "Sorry, no preview is available". This realtime…
Eric Anderson
  • 3,692
  • 4
  • 31
  • 34
1
vote
1 answer

Why The Google Drive Realtime API model does not contain timestamps of every revision?

The Realtime API "get" REST method (https://developers.google.com/drive/v2/reference/realtime/get) could be very useful to reconstruct the history of a document, if only its response contained the timestamp at which every revision was generated. Is…
Skice
  • 461
  • 5
  • 18
1
vote
0 answers

Do Google Drive Realtime APIs support partial response?

I'm using the Java Google Client Library to access a Realtime API method (namely, the "get" one). It seems to me that, unlike the vast majority of the other Google APIs, Realtime API methods do not support partial responses. I tried…
Skice
  • 461
  • 5
  • 18