google-drive-realtime-api

Was the Drive Realtime API changed today?

不打扰是莪最后的温柔 提交于 2019-12-06 10:58:03
问题 I have a Realtime API application in which the prototype of gapi.drive.realtime.CollaborativeString is modified to provide extra methods. Today (October 30, 2014) at about 10 AM EDT, the app suddenly stopped working. It turns out that accessing gapi.drive.realtime.CollaborativeString.prototype throws an error because gapi.drive.realtime.CollaborativeString, along with all the other Collaborative classes, is now undefined! I am currently working around this by adding the required methods to

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

前提是你 提交于 2019-12-06 06:05:50
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 be legit: // self.directoryDriveFile.identifier is a valid folder identifier retrieved on previous request GTLQueryDrive *query = [GTLQueryDrive queryForChildrenListWithFolderId:self.directoryDriveFile.identifier]; // add query to specify the file we're interested in (works in Java version...) query.q = [NSString stringWithFormat:@"title='%@' and

Google's File Insert v2 API fails to recognise MIME TYPE application/vnd.google-apps.document

大兔子大兔子 提交于 2019-12-06 01:25:22
This morning, I tried using Google APIs File Insert where I provided MIME TYPE as application/vnd.google-apps.document. I am getting the following response from Google API HttpError: <HttpError 400 when requesting https://www.googleapis.com/upload/drive/v2/files?uploadType=resumable&alt=json returned "Invalid mime type provided"> I replaced MIME TYPE application/vnd.google-apps.document with application/msword and the API started working. Has anything changed with Google API? Google reported there was an outage https://www.google.com/appsstatus#hl=en&v=issue&sid=4&iid

Showing documents from Google Drive on webpage

筅森魡賤 提交于 2019-12-06 01:18:50
Is it possible to show the documents from my drive on a webpage? I want the user to be able to click the document and download it, directly from my drive. How would I go about doing this? Thank you for your suggestions. For HTML/JavaScript solution, look at the following links: https://developers.google.com/drive/quickstart-js https://www.youtube.com/watch?v=09geUJg11iA https://developers.google.com/drive/web/auth/web-client Here's the simplest way using JavaScript, most of the complexity is in your WebApp authorization. The example below reads files IDs, names and description in a folder you

How to have multiple scopes with Google Calendar + Google Drive

情到浓时终转凉″ 提交于 2019-12-05 23:18:20
I am new to the Google APIs and want to know how I would be able to access 2 different APIs within the same files. I have SCOPES = 'https://www.googleapis.com/auth/calendar' but I also want SCOPES = 'https://www.googleapis.com/auth/drive.metadata.readonly' to be accessible from the same file. Does anyone have any idea how to go about doing this? Thanks! When you authenticate simply add both scopes. The user will be prompted to grant you access to both. SCOPES = 'https://www.googleapis.com/auth/drive.metadata.readonly https://www.googleapis.com/auth/calendar' You may have to put a comma between

Unable to upload huge file on google drive using python

守給你的承諾、 提交于 2019-12-05 07:29:45
问题 I am trying to upload files to Google drive by Google API using the following code import httplib2 from apiclient import discovery from httplib2 import Http from oauth2client import file, client, tools try: import argparse flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args() except ImportError: flags = None SCOPES =['https://www.googleapis.com/auth/drive','https://www.googleapis.com/auth/drive.file','https://www.googleapis.com/auth/drive.appdata', 'https://www.googleapis

How to style a Google Doc using Google Drive API?

那年仲夏 提交于 2019-12-04 21:08:06
Currently, I have a web application that basically consists in a simple form. When I submit this form, I generate a document that I send to Google Drive. It works. My problem is that I have no styling and I wonder how I can do that? I tried with HTML and CSS but if the HTML allows me to structure my document, the CSS does nothing. So, how could I do that? I guess you're uploading an HTML file, with convert=true, to create a Google Doc. Any "attached" CSS file will be ignored. There is some embedded element styling that will be honoured by the conversion process. Perhaps the best approach would

Drive SDK not listing all my files

青春壹個敷衍的年華 提交于 2019-12-04 20:18:01
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 SignedJwtAssertionCredentials client='my_client_id' client_email = 'my_client_email' with open("/path/to/file.p12") as f: private_key = f.read() credentials = SignedJwtAssertionCredentials(client_email, private_key, 'https://www.googleapis.com/auth/drive') http_auth = credentials.authorize(Http()) drive_service = build('drive', 'v2', http=http_auth) r = drive_service.files().list().execute()

Was the Drive Realtime API changed today?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 17:18:20
I have a Realtime API application in which the prototype of gapi.drive.realtime.CollaborativeString is modified to provide extra methods. Today (October 30, 2014) at about 10 AM EDT, the app suddenly stopped working. It turns out that accessing gapi.drive.realtime.CollaborativeString.prototype throws an error because gapi.drive.realtime.CollaborativeString, along with all the other Collaborative classes, is now undefined! I am currently working around this by adding the required methods to each CollaborativeString individually, but I would appreciate if someone on the Google Drive API team

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

五迷三道 提交于 2019-12-03 21:00:33
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 alternatives? private Drive getDriveService(String token) { HttpTransport ht = AndroidHttp.newCompatibleTransport(); JacksonFactory jsonFactory = new JacksonFactory(); Credential credentials = new GoogleCredential().setAccessToken(token); Drive.Builder b = new Drive.Builder(ht, jsonFactory, credentials); b.setHttpRequestInitializer(credentials);