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
2
votes
1 answer

How to get an access to Google Drive API service account from web browser

I use "Service account" method for using Google Drive API. I need to get an access to my storage through Web browser to make a folder structure and have an ability to change/remove/add files quickly without calling API commands. Is there an ability…
2
votes
1 answer

Concurrent grouping operation in a hierarchical structure

Given a tree of objects in Drive Realtime API with a concurrent operation in two or more clients where existing children are moved into a new parent (think of a grouping operation in a graphical editor), what is the best datastructure to avoid a)…
2
votes
1 answer

Title is 'Untitled' when uploading or updating a file using Google Drive API javascript?

I have been working on G drive API and doing upload, download delete and update of files and folders using JavaScript for windows 8 . The two problems which I encountered are; When I upload a file or folder it gets uploaded with a title "UNTITLED"…
2
votes
1 answer

How can an existing large data model be loaded with the Realtime API?

I have a realtime data model with a lot of data in it. When I try to load it using the API call my onLoaded function does not get called. Similarly my error handling function does not get called even though one of the underlying API calls…
2
votes
1 answer

Google Drive API - Error 500 - Simple API Access

For months I've been using the Google Drive API for simple access to fetch metadata about publicly shared document IDs. All of a sudden about a week ago (April 16) it stopped working. I've tried repeatedly from different machines (PCs and Linux…
Rommel Santor
  • 1,021
  • 7
  • 10
2
votes
1 answer

How to build and use a collaborative data model with Realtime API?

I have tried to follow the step described at Build a Collaborative Data Model and I end up with the following code : function onLoad(doc){ var Book = function(){}; var model = doc.getModel(); gapi.drive.realtime.custom.registerType(Book,…
Alexandre Ardhuin
  • 71,959
  • 15
  • 151
  • 132
2
votes
1 answer

Authorization to google drive api using Ruby

I want to make a simple application (like a Service account -in google api console) which send a file to an google drive. I have got code like this: require 'rubygems' require 'google/api_client' require 'launchy' #extra gem 'oauth2' gem…
2
votes
0 answers

Insert permissions via a batch request with Google APIs Client Library for Python

I'm starting with the Google APIs Client Library for Python. I'm developing with the Drive API. I'm migrating my web application from the deprecated Document List API v3 to Drive API V2. When I add some permissions on a document via…
2
votes
1 answer

Google Drive API - list specific files in a specific folder using Objective-C

I'm working on a Google Drive integration for iOS and I've hit a snag—I need to check for the existence of a file in a folder, but I keep getting a "500 Internal Error" response no matter how I seem to put together the request. I think this should…
Billy Gray
  • 1,747
  • 4
  • 18
  • 23
2
votes
1 answer

Using just javascript to submit information to Google Drive spreadsheet

I am basically looking for a way to use just javascript to submit information to a Google Drive spreadsheet. Changing the value of a specific cell is what I am after. Anyone know if this is possible? Thanks.
2
votes
2 answers

How do I use the Google drive API key to access drive content from android application?

I can't access Google drive. I created an API KEY in Google API console and enabled Google Drive API and SDK. Where do I set that API KEY in code? Drive builder does not have a setJsonHttpRequestInitializer method. Where can I set the KEY?Is there…
2
votes
1 answer

Google drive add meta data to file

I would like to use the googledrive api to search for files. I would like to add metadata to it. Example: File: computers1.pdf Brand: brand1 File: computers2.pdf Brand: brand2 File: computers3.doc Brand: brand2 As you…
DavidVdd
  • 1,020
  • 3
  • 17
  • 40
2
votes
1 answer

Create new Google Drive file with text content (javascript)

I can use javascript Google API to authentifie my webapp and create new file in Google Drive, as it's explained in this post : function createNewFile() { gapi.client.load('drive', 'v2', function() { var request = gapi.client.request({ …
1
vote
0 answers

Get notification when new file is added to google drive folder along with file details like location/file url

I had the developer push notifications for my webhook to get notifications when a new file is added to google drive as per the document. Document URL: HTTPs://developers.google.com/drive/api/guides/push#making-watch-requests I'm successfully…
1
vote
1 answer

Failed to get the driveId in the callback of the google picker in shared drive

I am trying to get the shared drive id in the callback of the google picker. The response I am getting is attached in screenshot These are the scopes for getting the drive data Following is the code for creating picker let view = new…