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

Fetch data from excel sheet in cloud programmatically

I am new to programming and cloud. I have below code which fetch data from a local drive: import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import…
Aboriginal
  • 374
  • 1
  • 3
  • 13
1
vote
2 answers

Use goo.gl URL shortener when a Google Sheet is open

My goal is to turn automatically the (very) long share links generate by Google drive for his documents in the short url: goo.gl/code I found the beautiful script from Jacob Jan Tunistra here, but that post is now closed. Jacob's code works like a…
Vince
  • 11
  • 2
1
vote
2 answers

Turn off unneeded Google Drive permission

In my app, I have requested users' permissions for their google sheets. However, there are 2 showing up. I don't think I need 1. because 2. is good enough. How can I turn it off or change to access only the spreadsheets opened or created with this…
angelokh
  • 9,426
  • 9
  • 69
  • 139
1
vote
1 answer

How to store unsampled reports from Google Analytics API to Google Drive?

I read this instruction on how to retrieve data for unsampled reports from Google Analytics API to Google Drive: https://developers.google.com/analytics/devguides/config/mgmt/v3/unsampled-reports#introduction As far as I understand, here are the…
Sophia
  • 55
  • 7
1
vote
0 answers

Design a structure for a File Uploader service (eg. google drive)

Design a structure for a File Uploader service (eg. google drive) .It is a service where multiple person can upload data at same time and it also lists the top five uploaders (who uploaded maximum number of files). This question was asked in an…
1
vote
2 answers

How to copy a google drive document from one folder to another using JavaScript API

I have two folders Folder1 and Folder2 in my Google drive. I have created a google drive document doc1 in Folder1. Later i need to copy this document to Folder2. How can i achieve this. I tried the below link but its creating the copy on the same…
1
vote
2 answers

Realtime API - how to render collaborative lists?

I've been trying recently to make a web app using Google Realtime API. However, I'm stuck on pretty basic things, while trying to implement collaborative lists. Here's a code example I've found (https://realtimeplayground.appspot.com/): var app =…
Xnn04
  • 91
  • 8
1
vote
0 answers

How to send django Inmemoryuploadfile (image file)to google drive without saving the image in local directory

I'm working on a project to integrate Google Drive to a Django web application to view and upload files to Google Drive. I was using Drive REST API for this requirement. Using the API, I tried uploading all type of files to GD (Google Drive). All…
1
vote
0 answers

Is it possible to annotate my embedded Google Document?

I would like to place my google documents into my website that consumes 7 column widths. The remaining 5 column widths would be used to display my annotations that I have for certain phrases, key points and concepts contained in my Google Document.…
1
vote
1 answer

Is there any way to start a compound operation in response to an event in another compound operation?

In the code below, an item is added to a collaborative list within a compound operation. In a VALUES_ADDED event handler on the list, another compound operation is started. When I run the code, I get the following error message: Exception: Uncaught…
Christopher Best
  • 466
  • 4
  • 14
1
vote
1 answer

Modeling collaborators' cursors in Google Drive Realtime API

I have a CollaborativeString. I'd like to display each Collaborator's cursor position as they are editing it. I can model a cursor using an IndexReference into the string. And I can allow each Collaborator to maintain their own cursor model…
Nick Retallack
  • 18,986
  • 17
  • 92
  • 114
1
vote
1 answer

In google realtime, is there a way to know that a compound operation is complete?

I can know that a particular event is part of a compound operation, even a particular operation... tags.addEventListener(gapi.drive.realtime.EventType.VALUES_SET,handleEvent); function handleEvent(serialized) { if…
HeyHeyJC
  • 2,627
  • 1
  • 18
  • 27
1
vote
1 answer

How best to store a number in google realtime model, and get atomic change events?

Sounds pretty simple, however... This number holds an enumerated type, and should be a field within a custom realtime object. Here's its declaration in the custom object registration routine: MyRTObjectType.prototype.myEnumeratedType = …
HeyHeyJC
  • 2,627
  • 1
  • 18
  • 27
1
vote
1 answer

Can I generate a Preview for a Google Drive (custom Realtime) file for use in Drive?

How to generate preview of documents saved in Google Drive? asks effectively the same question as this. However... The answer was 'no' Its an old question and Google Drive SDK has changed a lot since then. It doesn't (explicitly) relate to…
HeyHeyJC
  • 2,627
  • 1
  • 18
  • 27
1
vote
1 answer

Not able to fetch Google OAuth 2.0 access token

I have tried to get an access token using the REST API by passing the parameters which are shown in screenshots below, but I face the error Required parameter is missing: grant_type. I have tried with cURL and the Advanced Rest API in a Chrome…