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
0 answers

Model has no method 'isInitialized' in google drive realtime api

I tried to add tests for the isInitialized method of a realtime model but the method appears not to be defined. Method…
1
vote
1 answer

Google Drive SDK Realtime / Multiple Cursors (IndexReference?)

I'd like to implemente a user experience similar to Google Docs using realtime API. I wonder what is the best approach to track cursors / selections from all collaborators. It looks as if IndexReference would be the way to go but how can I track if…
dflorey
  • 1,828
  • 3
  • 19
  • 31
1
vote
1 answer

Call to realtime.loadAppDataDocument fails when realtime.load works?

After calling realtime.loadAppDataDocument I receive the error: XMLHttpRequest cannot load https://drive.google.com/load? access_token=ya29.AHES6ZRoDqY0PmpHlbUjniB8wIl……
Jake Bolam
  • 388
  • 3
  • 10
1
vote
3 answers

google drive api change owner / transferowner

I want to update the permission of some files in google drive using google drive api v2. everything works fine, file list, permission insert, .... only with permission update i have a problem but only if i want to change the owner! There is a…
1
vote
1 answer

Passing parameters to initialize function

Looking at realtime playground example. For custom object, there this call: custom.setInitializer(Movie, Movie.prototype.initialize); and Movie.prototype.initialize handler takes two parameters name, director Where or how do these parameters get…
dev.e.loper
  • 35,446
  • 76
  • 161
  • 247
1
vote
0 answers

Google Drive Realtime API OAuth2 Refresh Errors (Part 2)

This is a follow up to Google Drive Realtime API OAuth2 Refresh Errors. Since the update to the realtime API was pushed on Wednesday I've been seeing some additional issues with refreshing OAuth tokens. After the OAuth token expires, the realtime…
1
vote
0 answers

How to Get Google Drive Files with out any credential in asp.net

I am able to get Google drive files in asp.net but i want to show a my google drive data in my website. for this what need to use? I searched on Google and find a link which will general a Refresh token and auth. tokel for 1 hour i don't know how to…
user1926138
  • 1,464
  • 7
  • 34
  • 53
1
vote
1 answer

Google Realtime API - when to persist changes to database?

Scenario: I have multiple browser clients whose internet connection varies from very fast to super slow. Because of that they might not see same state of a document. I'm using Google shortcut file since the document is actually being stored in…
dev.e.loper
  • 35,446
  • 76
  • 161
  • 247
1
vote
1 answer

EvalError when trying to load realtime data model

I'm trying to get realtime data model with gapi.drive.realtime.load method in my Chrome Packaged App : gapi.drive.realtime.load(fileId, onLoad) but I'm caught an EvalError: Uncaught EvalError: Refused to evaluate a string as JavaScript because…
1
vote
1 answer

Google Realtime API - share settings on shortcut file

This is a follow up to Google Realtime API - what is the role of a shortcut file in google drive? What is the effect of share settings on a shortcut file? Does a user need to share this shortcut file with other collaborators? In my case, my web…
dev.e.loper
  • 35,446
  • 76
  • 161
  • 247
1
vote
1 answer

Google Realtime API - what is the role of a shortcut file in google drive?

In the quickstart demo, a shortcut file is created in Google Drive. I figure that this shortcut file facilitates the transfer of messages somehow. Can someone explain where this shortcut file points to and it's purpose in Realtime collaboration…
dev.e.loper
  • 35,446
  • 76
  • 161
  • 247
1
vote
0 answers

Getting warnings when using the "list" method of Google Drive API using PHP

We are using the Google Drive API for PHP in our web application, and although listing, inserting and deleting work just fine, we keep getting these warnings when using the list() method: $google_return = $GoogleAPI['Drive']->files->list(); causes…
SheepEater
  • 11
  • 3
1
vote
1 answer

Tracking ChangeEvent source in collaborative maps

I have a collaborative map, with collaborative maps as values. When an event happens on the value maps, I want to know to which key (of the outer map) the event belongs. Anyone can suggest a clean way of achieving this? CMap(key, cmapb(k,string)) ,…
Giannis
  • 5,286
  • 15
  • 58
  • 113
1
vote
1 answer

parse error while creating folder on google-drive in qt

I want to create folder at root(so I have not included id field) of google drive but I get error code 400,parse error. My code: void googled::createfolder(QNetworkReply* reply){ QUrl url("https://www.googleapis.com/drive/v2/files"); …
saurabh
  • 110
  • 3
  • 12
1
vote
1 answer

Invalid multipart request with 0 mime parts google drive upload

I am trying to upload image to google-drive in qt/c++. My code: void googled::newuploadSettings(QNetworkReply *reply){ QByteArray m_boundary; m_boundary = "--"; m_boundary += QString("42 + 13").toAscii(); QByteArray data =…
saurabh
  • 110
  • 3
  • 12